-
Notifications
You must be signed in to change notification settings - Fork 5k
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]: Cannot get the latest value after switching the network #25097
Comments
I can confirm this. Our app heavily relies on network switching and this issue is making it unusable with MetaMask. This was working a few days ago. |
Please check as soon as possible, thanks. |
Hey @coding-ice thanks for your report here. We have a fix for this issue that is rolling out with version 11.16.7 Edit: Actually you are reporting that you are seeing this on 11.16.7... We'll take a look! |
Can you explain what you mean by "Cannot get the latest value"? Do you mean if you call |
Reproducible via running RPC requests in the browser console. More info in this comment wevm/wagmi#3998 (comment) // start with extension on mainnet, then request accounts:
> await window.ethereum.request({ method: 'eth_requestAccounts' })
[...]
> await window.ethereum.request({ method: 'eth_chainId' })
'0x1'
> await window.ethereum.request({ method: 'wallet_switchEthereumChain', params: [{ chainId: '0x89' }] })
> await window.ethereum.request({ method: 'eth_chainId' })
'0x89'
// switch in extension ui, then run the following:
> await window.ethereum.request({ method: 'eth_chainId' })
'0x89' // should be 0x1 |
We have been able to reproduce this bug, and are currently investigating. We will post an update soon. |
We have found the problem, and are preparing a fix. We'll have this released as soon as we can. |
ok,thanks a lot~ |
I met this problem too.I thought there are somewhere cached in my browser. a hack to resolve this problem
|
please we are also having the same problem |
Thank you for your patience. A fix will be released with 11.16.8. Should be going live today! |
The fix for this has been published as part of the 11.16.8 release You may need to manually update your metamask install to access this fix. https://support.metamask.io/managing-my-wallet/using-metamask/how-to-update-the-version-of-metamask/#:~:text=Chrome%2Dbased%20browsers%3A%20Click%20the,manually%20install%20it%20from%20here. |
For the future, bugs like these should be tagged as sev-critical. Most libraries perform chainId checks to assert the user is on the right chain before executing a transaction. |
I have found it to work properly. Thank |
Absolutely is a critical bug that caused real users to lose funds. We had a case of a user losing ETH because of this. A synchronicity bug like this is one we fear most, because of the behaviour when a method call is made to a non-contract address with ETH, it will succeed in sending the ETH and will be lost permanently. Damage here could've been substantial. Any ideas on what we could do to safe guard against bugs like these in future? |
…uePreference guard (#4388) ## Explanation Our previous SelectedNetworkController fix that [added a guard to permission state changes](#4368) was not sufficient. This PR properly addresses the underlying issue of setting networkClientId for domains when the `useRequestQueuePreference` flag is false by moving the guard into the `setNetworkClientId()` method itself ## References * Fixes: MetaMask/metamask-extension#25097 ## Changelog <!-- If you're making any consumer-facing changes, list those changes here as if you were updating a changelog, using the template below as a guide. (CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or FIXED. For security-related issues, follow the Security Advisory process.) Please take care to name the exact pieces of the API you've added or changed (e.g. types, interfaces, functions, or methods). If there are any breaking changes, make sure to offer a solution for consumers to follow once they upgrade to the changes. Finally, if you're only making changes to development scripts or tests, you may replace the template below with "None". --> ### `@metamask/selected-network-controller` - **FIXED**: `setNetworkClientId()` will now result in a noop if `useRequestQueuePreference` is false ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate --------- Co-authored-by: Alex Donesky <[email protected]>
I have lost my 0.332eth when I use Across procotol to bridge my eth from zks to other chain use metamask wallet? Who will compensate me? Can I ask metamask refund me? My address is 0x41e3A8766E0FF11eEF0c4D8eBe35a4F8d9772765,last transation hash is 0x912eff9e32127a10acfe325b2a9bcb8a848e401cdf08103ba5f21e9f2e446c24. |
|
It would help if you also looked into the rabby and metamask sync issue. Rabby has more connection control and it affects interacting with metamask when we have to |
14 ETH lost on arbitrum, in only one scenario. Granted this is not solely on metamask, but it highlights what is at stake. Many clients attach a There should also be a warning when sending ETH with call data to a non existent contract. This again would have raised flags and prevented loss. |
You have fixed this issue but who will refund my loss? I can't get my money back now! |
Many bugs for Metamask nowadays. I regconise these problems also:
Please take care these problems as soon as possible. We still believe in you! |
Describe the bug
Cannot get the latest value after switching the network
link: https://stackblitz.com/edit/vitejs-vite-9rayvh?file=src%2FApp.tsx
Expected behavior
correct version:
11.14.5 - x
No response
Screenshots/Recordings
No response
Steps to reproduce
Error messages or log output
No response
Version
11.16.7
Build type
None
Browser
Chrome
Operating system
MacOS
Hardware wallet
No response
Additional context
No response
Severity
No response
The text was updated successfully, but these errors were encountered: