Console: Uncaught Error: Extension context invalidated (extension was updated or reloaded)
A content script from an extension kept running after the extension was reloaded, updated or removed, so its link to the extension is broken.
Extension context invalidatedUncaught Error: Extension context invalidatedError: Extension context invalidated.Could not establish connection. Receiving end does not exist Meaning
Open tabs keep the old content script alive. When the extension updates, calls such as chrome.runtime.sendMessage throw this error until the page is reloaded. Users fix it with a refresh; extension authors should catch it and stop their script cleanly.
Common causes
- Extension updated or reloaded while the page stayed open (very common in development)
- Extension disabled or uninstalled
- Service worker (Manifest V3) restarted and state lost
- Long-lived port closed
- Orphaned content script calling
chrome.*APIs
⚡ Quick fix
- Reload the page (and the extension during development)
- Extension authors: wrap
chrome.runtimecalls intry/catchand detectchrome.runtime?.id - Re-inject the content script after an update
Detailed fix by platform
JavaScript
if (!chrome.runtime?.id) { cleanup(); return; }before calling extension APIs; wrapsendMessageintry { ... } catch (e) { if (/Extension context invalidated/.test(e.message)) cleanup(); }
Chrome
chrome://extensions→ reload the extension, then reload the open tabs
How to diagnose
- Timing — Did the extension update or reload?
- Tab — Is the page older than the extension?
- Code — Own extension?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Aw, Snap! Chrome: Aw, Snap! Something went wrong while displaying this webpage. Error code: STATUS_ACCESS_VIOLATION / SIGILL / Out of Memory
- captive portal Browser: This network requires you to sign in — captive portal (hotel, airport, café Wi-Fi) blocking HTTPS sites
- DevTools failed to load source map DevTools: Failed to load source map — Could not load content for https://…/app.js.map: HTTP error: status code 404
Most viewed in Browser
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026