Skip to content

Latest commit

 

History

History
128 lines (94 loc) · 3.11 KB

File metadata and controls

128 lines (94 loc) · 3.11 KB

🔄 FORCE RELOAD - Clear Cache & Restart

The Problem:

Chrome is showing OLD code even after reload!

🔧 SOLUTION - Do These Steps IN ORDER:

Step 1: Remove Extension Completely

  1. Go to: chrome://extensions/
  2. Find "Smart Website Security & Privacy Guardian"
  3. Click REMOVE (not reload!)
  4. Confirm removal

Step 2: Clear Chrome Cache

  1. Press Cmd + Shift + Delete (Mac) or Ctrl + Shift + Delete (Windows)
  2. Select "All time"
  3. Check these boxes:
    • ✅ Cached images and files
    • ✅ Hosted app data
  4. Click "Clear data"

Step 3: Restart Chrome

  1. Completely quit Chrome (Cmd+Q on Mac)
  2. Wait 5 seconds
  3. Open Chrome again

Step 4: Load Extension Fresh

  1. Go to: chrome://extensions/
  2. Enable "Developer mode" (top right)
  3. Click "Load unpacked"
  4. Select folder: /Users/rohitprasad/Desktop/Work/Extension/smart-security-guardian
  5. Extension should load with NEW code!

Step 5: Verify It's Working

Open a new terminal and watch backend:

cd /Users/rohitprasad/Desktop/Work/Extension/smart-security-guardian/backend
tail -f server.log

Then:

  1. Visit: https://www.google.com
  2. You should see in backend log:
    Scanning: https://www.google.com
    

If you see that → ✅ CONNECTED TO BACKEND!


✅ CHECKLIST:

After reload, you should see:

In Popup UI:

  • Icons appear: 🔒 🛡️ 🎣
  • Text is colored (green/yellow/red)
  • Details show "✓ Valid (Grade: A+)" not just "Valid"
  • Hover over items = they slide slightly

In Service Worker Console:

  1. Go to chrome://extensions/
  2. Find your extension
  3. Click "service worker" link
  4. Look for:
    🔄 Using BACKEND API for scanning...
    ✅ Backend scan successful
    

In Backend Logs:

Scanning: https://www.google.com
ℹ️  CheckPhish: Skipped (optional service)

🐛 IF STILL NOT WORKING:

Check Service Worker Status:

  1. chrome://extensions/
  2. Find extension
  3. Look for "service worker" - should be blue/clickable
  4. If it says "inactive" → Click it to wake it up
  5. Reload the page you're testing

Force Service Worker Reload:

  1. Open service worker console
  2. Type: chrome.runtime.reload()
  3. Press Enter
  4. Refresh your test page

📝 QUICK TEST SCRIPT:

Run this to verify everything:

cd /Users/rohitprasad/Desktop/Work/Extension/smart-security-guardian

echo "1. Backend running?"
curl -s http://localhost:3000/api/health | grep -q "ok" && echo "✅ YES" || echo "❌ NO"

echo ""
echo "2. Files updated?"
[ -f "lib/backend-api.js" ] && echo "✅ backend-api.js exists" || echo "❌ Missing"
grep -q "USE_BACKEND" service-worker.js && echo "✅ USE_BACKEND configured" || echo "❌ Not configured"
grep -q "detail-icon" popup/popup.js && echo "✅ UI enhanced" || echo "❌ Not enhanced"

echo ""
echo "3. Permissions set?"
grep -q "localhost:3000" manifest.json && echo "✅ Backend permission added" || echo "❌ Permission missing"

echo ""
echo "NOW: Remove extension, clear cache, reload fresh!"

DO THE COMPLETE REMOVAL & RELOAD NOW! Chrome is caching the old code! 🔄