MetaMask / MetaMask/metamask-extension

[Bug]: UI crash "This method only supports 0x-prefixed hex strings"

Open
#24,476 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

external-contributor regression-prod-11.15.3 Sev2-normal team-wallet-api-platform-deprecated type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Describe the bug

I am encountering an error in Remix while initializing an already deployed contract, and sending a transaction through MetaMask.

Network: Sepolia
System: macOS 14.1
Browser: Chrome version 124.0.6367.119 (official build) (arm64)
MetaMask: 11.15.3

Expected behavior

MetaMask encountered an error
Try again by reloading the page, or contact support here.
Error details
Message: This method only supports 0x-prefixed hex strings but input was: 0xusd coin
Code: Error
Stack:
Error: This method only supports 0x-prefixed hex strings but input was: 0xusd coin
at r.assertIsHexString (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-3.js:21:21821)
at r.toChecksumAddress (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-3.js:21:9005)
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-2.js:1:214645
at n.default (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-2.js:1:214659)
at ga (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:60103)
at As (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:104934)
at Ou (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:90842)
at Ru (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:90767)
at Tu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:88115)
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:46513
at n.unstable_runWithPriority (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:3:13158)
at Yi (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:46222)
at eo (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:46458)
at Ji (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:46393)
at xu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:88492)
at dl (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:113674)
at render (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:115597)
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-5.js:1:131028

Screenshots/Recordings
image
Steps to reproduce

Contract 0x47aA1553EC56923E3cDa665276E744f38DEA5062 :https://sepolia.etherscan.io/address/0x47aa1553ec56923e3cda665276e744f38dea5062
callback data:
0x000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000600000000000000000000000071d9cebe8ad480885c5f7df02a943919ad56b03a00000000000000000000000071d9cebe8ad480885c5f7df02a943919ad56b03a00000000000000000000000071d9cebe8ad480885c5f7df02a943919ad56b03a00000000000000000000000071d9cebe8ad480885c5f7df02a943919ad56b03a000000000000000000000000000000000000000000000000000000000000000855534420436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044c5553440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035553440000000000000000000000000000000000000000000000000000000000

Error messages or log output
MetaMask encountered an error
Try again by reloading the page, or contact support here.
Error details
Message: This method only supports 0x-prefixed hex strings but input was: 0xusd coin
Code: Error
Stack:
Error: This method only supports 0x-prefixed hex strings but input was: 0xusd coin
  at r.assertIsHexString (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-3.js:21:21821)
  at r.toChecksumAddress (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-3.js:21:9005)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-2.js:1:214645
  at n.default (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-2.js:1:214659)
  at ga (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:60103)
  at As (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:104934)
  at Ou (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:90842)
  at Ru (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:90767)
  at Tu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:88115)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:46513
  at n.unstable_runWithPriority (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:3:13158)
  at Yi (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:46222)
  at eo (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:46458)
  at Ji (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:46393)
  at xu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:88492)
  at dl (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:113674)
  at render (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:115597)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-5.js:1:131028
Version

11.15.3

Build type

None

Browser

Chrome

Operating system

MacOS

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 by reproducing the MetaMask UI crash in Remix using the Sepolia contract at 0x47aA1553EC56923E3cDa665276E744f38DEA5062 and the supplied callback data. Inspect how the contract initialization and transaction request are presented to MetaMask; done means the reported 0xusd coin error no longer crashes the UI and the transaction flow can proceed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, frontend
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.