MetaMask / MetaMask/metamask-extension

[Sentry] TypeError: Cannot convert undefined or null to object

Open
#33,039 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-sentry needs-triage regression-prod-12.17.2 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-XK0K

TypeError: Cannot convert undefined or null to object
  at Function.entries (<anonymous>)
  at forEach (app/scripts/controllers/permissions/selectors.js:41:29)
  at Array.forEach (<anonymous>)
  at exports.getPermittedAccountsByOrigin (app/scripts/controllers/permissions/selectors.js:34:29)
  at obj[prop] (/metamask/scripts/sentry-install.js:24:1)
...
(15 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 app/scripts/controllers/permissions/selectors.js, especially getPermittedAccountsByOrigin and the Function.entries call at line 41. Use the linked Sentry event to determine which value is null or undefined, then verify the selector no longer throws for that case and add or update coverage if the repository provides a relevant test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authorization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.