MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
12.04k stars 4.92k forks source link

Error: Unable to detect valid token data #27513

Open sentry-io[bot] opened 1 month ago

sentry-io[bot] commented 1 month ago

Sentry Issue: METAMASK-XC3A

Error: Unable to detect valid token data
  at r.getAssetDetails (ui/helpers/utils/token-util.js:260:11)
  at getAndSetAssetDetails (ui/hooks/useTransactionDisplayData.js:160:36)
  at e (ui/hooks/useTransactionDisplayData.js:171:5)
  at obj[prop] (/metamask/scripts/sentry-install.js:24:1)
  at action (ui/store/actions.ts:1638:5)
...
(25 additional frame(s) were not displayed)
sentry-io[bot] commented 1 month ago

Sentry Issue: METAMASK-XC3K

Gudahtt commented 1 month ago

It looks like we should be anticipating this error, and catching it in each place getAssetDetails is called.

It's a little unclear to me whether it makes sense to catch and log this error with getAssetDetails, or at each calcite (does the caller need to know if it failed, or can we supply a default return?). But we should probably be catching this somewhere.

Unless it's unexpected for this to ever be called for an "unrecognized asset". Which might be true, but I didn't think that was the case.