metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

[Bug]: Cannot destructure property 'chainId'

Open avenbreaks opened this issue 1 year ago • 7 comments

Describe the bug

Adding BNB Testnet BEP20 Network, possibly because the network is full, I tried adding the RPC API URL of other platforms such as Alchemy, Chainstack, Publicnode.

Expected behavior

No response

Screenshots/Recordings

image

image

Steps to reproduce

  1. Add Network
  2. Getting Error logs

Error messages or log output

Message: Cannot destructure property 'chainId' of '(0 , t.useSelector)(...)' as it is undefined.

Code: TypeError

Stack:
TypeError: Cannot destructure property 'chainId' of '(0 , t.useSelector)(...)' as it is undefined.
  at z (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-2.js:1:841315)
  at ga (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:60103)
  at Os (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:104934)
  at Au (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:90842)
  at Cu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:90767)
  at Tu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:88115)
  at yu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:84859)
  at al (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:112490)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:113689
  at xu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-5.js:1:88466)
  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:314517


### Version

11.16.5

### Build type

None

### Browser

Chrome

### Operating system

MacOS

### Hardware wallet

_No response_

### Additional context

_No response_

### Severity

_No response_

avenbreaks avatar Jun 04 '24 23:06 avenbreaks

Hi @avenbreaks , thanks for reporting this issue. Can you please provide more detail regarding steps to reproduce? When you tried adding RPC API URL of other platforms such as Alchemy, Chainstack, Publicnode, did it fail for every platform or only for some of them?

gauthierpetetin avatar Jun 06 '24 14:06 gauthierpetetin

Please specify all the RPC connection metadata you included in your wallet_addEthereumChain call for "BNB Testnet BEP20 Network"

vandan avatar Jun 06 '24 19:06 vandan

Hi @avenbreaks , thanks for reporting this issue. Can you please provide more detail regarding steps to reproduce? When you tried adding RPC API URL of other platforms such as Alchemy, Chainstack, Publicnode, did it fail for every platform or only for some of them?

GM, When I add RPC to Metamask and the extension suddenly crashes (cannot be reopened) it brings up a notification like the screenshot above.

for now I really can't open it.

avenbreaks avatar Jun 07 '24 12:06 avenbreaks

You were able to fix it? Same problem and nothing works.

SalaGaInCrypto avatar Jun 17 '24 08:06 SalaGaInCrypto

Encountering this issue as well

KanteLabs avatar Jun 18 '24 03:06 KanteLabs

The stack trace points to this line: https://github.com/MetaMask/metamask-extension/blob/c699439fbe523a9214ff58ce7fd681dfc47f9c50/ui/components/app/asset-list/asset-list.js#L58

Gudahtt avatar Jun 20 '24 23:06 Gudahtt

Could you link what network you're referring to here:

BNB Testnet BEP20 Network

Did you mean to refer to a particular asset on BNB Smart Chain Testnet chainId: 97 (0x61)

adonesky1 avatar Jun 28 '24 18:06 adonesky1

Hi,

I have the same issue, do you have a way to fix this (and that solution to not be to re-install extension)?

StefanVitor avatar Jul 10 '24 22:07 StefanVitor

Bumped to a Sev1 because some users seem unable to workaround without reinstalling

Gudahtt avatar Jul 30 '24 14:07 Gudahtt

I suspect that this was fixed by https://github.com/MetaMask/metamask-extension/pull/26327, which was included in v12.0.1

Gudahtt avatar Aug 12 '24 11:08 Gudahtt

Closing as fixed by #26327. No reports so far from v12.0.1.

Everyone in this thread, please update to v12.0.1 and comment here if you notice this problem remains. We can re-open if necessary. If you see a new error, please let us know and open a new issue for it. Thanks!

Gudahtt avatar Aug 12 '24 19:08 Gudahtt