Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Premature close #26326

Closed
Aliceonly opened this issue Aug 2, 2024 · 13 comments
Closed

[Bug]: Premature close #26326

Aliceonly opened this issue Aug 2, 2024 · 13 comments
Labels
external-contributor Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-extension-platform type-bug

Comments

@Aliceonly
Copy link

Aliceonly commented Aug 2, 2024

Describe the bug

When modify the network config and then metamask can't connect the network through the rpc url,
it leads metamask can't open and always get the Premature close
Cannot destructure property 'chainId' of '(0 , t.useSelector)(...)' as it is undefined.

Expected behavior

No response

Screenshots/Recordings

No response

Steps to reproduce

  1. Swith to a network metamask can't connect
  2. switch network
  3. can't open metamask anymore

Error messages or log output

Error#17: Premature close scripts/sentry-install.js:1
TypeError: Cannot destructure property 'chainId' of '(0 , t.useSelector)(...)' as it is undefined.
  at z (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-2.js:1:857888)
  at ga (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:61316)
  at Cs (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:106147)
  at Au (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:92055)
  at Ou (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:91980)
  at Tu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:89328)
  at vu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:86072)
  at al (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:113703)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:114902
  at xu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:89679)
  at dl (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:114887)
  at render (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/common-6.js:1:116810)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-6.js:1:54554

Detection stage

In production (default)

Version

latest

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

fatal

@Aliceonly
Copy link
Author

I try update serveral version but still have this bug

@Aliceonly
Copy link
Author

console log: MetaMask - RPC Error: Cannot destructure property 'chainId' of 'this.networkController.getNetworkConfigurationByNetworkClientId(...)' as it is undefined.

@Aliceonly
Copy link
Author

try call js api wallet_switchEthereumChain & wallet_addEthereumChain also get {
"code": -32603,
"message": "Cannot destructure property 'chainId' of 'this.networkController.getNetworkConfigurationByNetworkClientId(...)' as it is undefined.",
"data": {
"originalError": {}
}
}

@anaamolnar
Copy link

Hello, @Aliceonly, The team is working on identifying the root cause of this. In the meantime, could you trigger a network switch from chainlist.wtf to see if you can unblock the extension? Thank you!

@Sentini14
Copy link

Sentini14 commented Aug 5, 2024 via email

@Aliceonly
Copy link
Author

Hello, @Aliceonly, The team is working on identifying the root cause of this. In the meantime, could you trigger a network switch from chainlist.wtf to see if you can unblock the extension? Thank you!

not work. the extension totally blocked by the error. I even tried call the js api in console, not work

@Sentini14
Copy link

Sentini14 commented Aug 5, 2024 via email

@Sentini14
Copy link

How can I see my real public phrase key secret place

@desi desi added the Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. label Aug 12, 2024
@Gudahtt
Copy link
Member

Gudahtt commented Aug 14, 2024

I suspect that this crash will no longer happen in v12.0.1, but the circumstances leading up to that crash probably are still possible, and would still be considered a bug.

@Aliceonly could you clarify how you were able to reproduce this problem? I am having trouble with these steps. I have tried switching to an unavailable network, but I don't see any crash and MetaMask doesn't get stuck. I just see that the balance loads infinitely, or a loading overlay appears that eventually lets me switch back.

Also, let us know if this is still a problem on v12.0.1. Thanks!

@Aliceonly
Copy link
Author

I suspect that this crash will no longer happen in v12.0.1, but the circumstances leading up to that crash probably are still possible, and would still be considered a bug.

@Aliceonly could you clarify how you were able to reproduce this problem? I am having trouble with these steps. I have tried switching to an unavailable network, but I don't see any crash and MetaMask doesn't get stuck. I just see that the balance loads infinitely, or a loading overlay appears that eventually lets me switch back.

Also, let us know if this is still a problem on v12.0.1. Thanks!

thx for ur reply and supporting
I tried v12.0.1, the indefinite crush seems to be fixed

It seems metamask handles the error properly now, the error not lead to premature close now

image

the reproduction steps in v12.0.0:
I'm not sure this situation happens all the time, but it happened several times on me

  1. add a network with public rpc, and switch to it (it's Arbitrum Sepolia for me)
  2. now metamask maybe the balance loads slowly, or not connected yet
  3. go to settings and modify the network u r on to private rpc url (for me it's Alchemy RPC of arb sep)
  4. back to the account page, metamask no longer connects arb sep and crush infinitely

@Gudahtt
Copy link
Member

Gudahtt commented Aug 15, 2024

Thanks! Hmm, this sounds similar to #26072 but the repeated errors make me unsure. And with #26072 we never saw a crash, even before v12.0.1. We will investigate further.

@Gudahtt
Copy link
Member

Gudahtt commented Aug 15, 2024

OK, so I believe I know what's happening now. The crash was caused by #26320, that has been resolved.

The errors that caused the crash, and are still causing these console errors, are tracked already in these issues:

I will close this issue for now, as it should be resolved in the next release as we fix those remaining two issues. Thanks very much for the report though, and let us know if you still see this in v12.0.5 or later versions!

@Gudahtt Gudahtt closed this as completed Aug 15, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by severity Aug 15, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Aug 15, 2024
@Aliceonly
Copy link
Author

OK, so I believe I know what's happening now. The crash was caused by #26320, that has been resolved.

The errors that caused the crash, and are still causing these console errors, are tracked already in these issues:

I will close this issue for now, as it should be resolved in the next release as we fix those remaining two issues. Thanks very much for the report though, and let us know if you still see this in v12.0.5 or later versions!

thx u guys too, hope it's getting better & better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-extension-platform type-bug
Projects
Archived in project
Development

No branches or pull requests

6 participants