MetaMask / MetaMask/metamask-extension
[Sentry] Error: Failed to get authorization header. Failed to get nonce: Failed to fetch
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
Sentry Issue: [METAMASK-YK1D](https://metamask.sentry.io/issues/7306039029/?referrer=github_integration)
```
NonceRetrievalError: Failed to get nonce: Failed to fetch
at new NonceRetrievalError (node_modules/@metamask/profile-sync-controller/dist/sdk/errors.cjs:7:1)
at throwServiceError (node_modules/@metamask/profile-sync-controller/dist/sdk/authentication-jwt-bearer/services.cjs:92:1)
at exports.getNonce (node_modules/@metamask/profile-sync-controller/dist/sdk/authentication-jwt-bearer/services.cjs:184:1)
at _SRPJwtBearerAuth_performLogin (node_modules/@metamask/profile-sync-controller/dist/sdk/authentication-jwt-bearer/flow-srp.cjs:154:1)
at _SRPJwtBearerAuth_loginWithRetry (node_modules/@metamask/profile-sync-controller/dist/sdk/authentication-jwt-bearer/flow-srp.cjs:193:1)
Error: Failed to get authorization header. Failed to get nonce: Failed to fetch
at exports.createSentryError (node_modules/@metamask/subscription-controller/dist/errors.cjs:52:1)
at _SubscriptionService_getAuthorizationHeader (node_modules/@metamask/subscription-controller/dist/SubscriptionService.cjs:267:1)
at _SubscriptionService_makeRequest (node_modules/@metamask/subscription-controller/dist/SubscriptionService.cjs:225:1)
at exports.SubscriptionServicegetSubscriptions (node_modules/@metamask/subscription-controller/dist/SubscriptionService.cjs:35:1)
at SubscriptionController.getSubscriptions (node_modules/@metamask/subscription-controller/dist/SubscriptionController.cjs:128:1)
...
(2 additional frame(s) were not displayed)
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Sentry report and trace the authentication flow through getNonce, _SRPJwtBearerAuth_performLogin, and SubscriptionService_getAuthorizationHeader. Determine why nonce retrieval fails to fetch and verify the subscription request path after the failure is addressed; the issue is resolved when this reported error no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100