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

Error: Could not establish connection. Receiving end does not exist. #26232

Open
sentry-io bot opened this issue Jul 30, 2024 · 4 comments
Open

Error: Could not establish connection. Receiving end does not exist. #26232

sentry-io bot opened this issue Jul 30, 2024 · 4 comments
Labels
regression-prod-11.12.4 Regression bug that was found in production in release 11.12.4 Sev2-normal Normal severity; minor loss of service or inconvenience. team-extension-platform Extension Platform team type-bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented Jul 30, 2024

Sentry Issue: METAMASK-X99M

Error: Could not establish connection. Receiving end does not exist.

This issue has a high volume (~40K errors/day) and often triggers the "+100% raise of old Sentry issues over the past 24h " alert in #metamask-extension-release-monitoring Slack channel. We shall treat it as a sev2.

@Gudahtt Gudahtt added type-bug Something isn't working team-extension-platform Extension Platform team labels Jul 30, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Jul 30, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Jul 30, 2024
@Gudahtt Gudahtt added regression-prod-11.18.0 Regression bug that was found in production in release 11.18.0 regression-prod-11.12.4 Regression bug that was found in production in release 11.12.4 Sev2-normal Normal severity; minor loss of service or inconvenience. and removed regression-prod-11.18.0 Regression bug that was found in production in release 11.18.0 labels Jul 30, 2024
@Gudahtt
Copy link
Member

Gudahtt commented Jul 30, 2024

No obvious user impact, but labelling this as sev2 because of the high Sentry volume (this is currently the most frequent error by a significant margin).

@gauthierpetetin
Copy link
Contributor

We looked at this issue with @MetaMask/extension-platform during technical refinement today and didn't find a lot to investigate on while looking at what's in Sentry.

It's not a new issue as it was first seen 5 months ago. @seaona has seen this error several times, without being able to identify clear reproduction steps. She only encountered this on MV3 Extension, not MV2.

This issue seems related as well: #15970

Here's also a screenshot of the logs @seaona 's got in her console when the issue occurred: Screenshot from 2024-08-20 18-00-21

@NiranjanaBinoy NiranjanaBinoy self-assigned this Sep 30, 2024
@NiranjanaBinoy
Copy link
Contributor

Reproduction steps:

  1. Load the app
  2. open the service worker console.
  3. Now open the metamask app
  4. We can see Error: Could not establish connection. Receiving end does not exist. in the console, almost consistently.

@gauthierpetetin
Copy link
Contributor

Thanks for investigation @NiranjanaBinoy .
There's also this comment in the onDisconnectDestroyStreams function in the code that I'll add below in case it's useful:

If an error is found, reset the streams. When running two or more dapps, resetting the service
worker may cause the error, "Error: Could not establish connection. Receiving end does not
exist.", due to a race-condition. The disconnect event may be called by runtime.connect which
may cause issues. We suspect that this is a chromium bug as this event should only be called
once the port and connections are ready. Delay time is arbitrary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-prod-11.12.4 Regression bug that was found in production in release 11.12.4 Sev2-normal Normal severity; minor loss of service or inconvenience. team-extension-platform Extension Platform team type-bug Something isn't working
Projects
Status: To be fixed
Status: To be fixed
Development

No branches or pull requests

3 participants