MetaMask / MetaMask/metamask-extension

Error: Failed to read the 'onMessage' property from 'Object': Extension context invalidated.

Open
#41,717 0 comments 0 reactions 0 assignees View on GitHub
external-contributor INVALID-ISSUE-TEMPLATE Sev2-normal team-extension-platform type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Sentry Issue: [METAMASK-YGX8](https://metamask.sentry.io/issues/7216461145/?referrer=github_integration)

```
Error: Failed to read the 'onMessage' property from 'Object': Extension context invalidated.
at connectWindowPostMessage (app/scripts/background.js:1702:20)
at handleOnConnect (app/scripts/background.js:567:5)
```

Contributor guide

Open the contributing guide

Research direction

Read app/scripts/background.js around connectWindowPostMessage (line 1702) and handleOnConnect (line 567), then trace the reported Sentry path. Determine the conditions that produce the extension-context error and verify that the extension no longer emits it when the context is invalidated.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.