Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox console shows "Attempt to postMessage on disconnected port" from Apollo extension #1007

Open
swrobel opened this issue Mar 22, 2023 · 2 comments

Comments

@swrobel
Copy link

swrobel commented Mar 22, 2023

Intended outcome:
No extraneous errors are shown in Firefox browser console

Actual outcome:
Every browser tab for a site that doesn't use Apollo (ex: github) shows this in the console:

Error: Attempt to postMessage on disconnected port [tab.js:1:3247](moz-extension://8d7e5e49-00fa-624f-b1ba-d10fd33b0a05/tab.js)
    sendPortMessage resource://gre/modules/ExtensionChild.jsm:312

How to reproduce the issue:

Load any page that doesn't use Apollo (this page will do) in Firefox with the Apollo Client Devtools extension installed

Desktop (please complete the following information):

  • OS: macOS 13.2.1
  • Browser: Firefox
  • Browser version: 111.0.1
  • Extension version 4.1.4
@jerelmiller jerelmiller added 🔍 investigate 🏓 awaiting-team-response requires input from the apollo team labels Mar 23, 2023
@phryneas
Copy link
Member

Thank you for the bug report, I can reproduce this.

Note for further reproduction: only happens when reloading the page while the DevTools are open.

@abarreir
Copy link

I've further investigated this issue, and the extension panel stops working after some idle time 100% of the time. A similar issue happened to vuejs devtools vuejs/devtools#1974, making the background script persistent in the manifest file fixed the issue.

I've tested the fix locally and can confirm the content script stops losing connection to the background script. Please note that the issue is not reproducible when inspecting the background script with firefox devtools, since this prevents the script from going idle :

bg-script-devtool-msg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants