MetaMask / MetaMask/metamask-extension

[Sentry] Error: Failed to get authorization header. Failed to get nonce: Failed to fetch

Open
#40,605 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-sentry external-contributor INVALID-ISSUE-TEMPLATE regression-prod-13.19.0 Sev2-normal team-shield type-bug
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.