MetaMask / MetaMask/metamask-extension

[Bug]: Snaps - Race condition throws `npm:@metamask/message-signing-snap failed to start`

Open
#45,222 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ta-needs-engineer-escalation ta-triaged team-core-platform type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Describe the bug

Race condition throws npm:@metamask/message-signing-snap failed to start. Captured in our e2e tests.
I've also seen a similar ocurrence in Sentry (unsure if caused by the same issue): https://metamask.sentry.io/issues/6542297145/?project=273505&query=is%3Aunresolved%20%40metamask%2Fmessage-signing-snap%20failed%20to%20start&referrer=issue-stream&sort=recommended

Expected behavior

No error, and snaps correctly initialize

Screenshots/Recordings
Image
Steps to reproduce

https://github.com/MetaMask/metamask-extension/actions/runs/30977182986/job/92214562520

Error messages or log output

Where was this bug found?

Internal release testing

Version

main

Build type

No response

Browser

Firefox

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Severity

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked GitHub Actions e2e failure (run 30977182986) and reproduce the npm:@metamask/message-signing-snap failed to start error in Firefox on Linux. Trace the snap initialization sequence and compare it with the related Sentry occurrence; the work is done when snaps initialize without the race-condition error and the e2e scenario passes reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.