-
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
Metamask doesn't work with ganache with typed message #8385
Comments
Is there any update on it @kumavis ? |
@kumavis is anyone here? |
due to a BUG in metamask (MetaMask/metamask-extension#8385), it can't work with any network where chainId != networkid Alas, due to a BUG in ganache (trufflesuite/ganache#515), the chaind is completely broken. The solution is using local GETH for tests, and setting the networkid to the same value of chainid... use "gsn-with-geth" to bring up a local geth (using docker) on port 8545, and GSN running on top of it. for completeness, we also have "gsn-with-ganache" - which works fine, but you can't use it with metamask...
Note that this bug means that getTypedData() method can't be used on network where chainid!=networkid - most notably is local testing on geth/ganache - but also Ethereum Classic |
due to a BUG in metamask (MetaMask/metamask-extension#8385), it can't work with any network where chainId != networkid Alas, due to a BUG in ganache (trufflesuite/ganache#515), the chaind is completely broken. The solution is using local GETH for tests, and setting the networkid to the same value of chainid... use "gsn-with-geth" to bring up a local geth (using docker) on port 8545, and GSN running on top of it. for completeness, we also have "gsn-with-ganache" - which works fine, but you can't use it with metamask...
I regret that we haven't been able to address this issue. We are looking into this, and will hopefully be able to ship a fix soon. Until we fix this, you should be able to omit the |
Any ETA for the fix? Its very problematic to create different contracts for local and remote testing |
@drortirosh #9552 should land tomorrow, and hopefully be included in a feature release this week. |
Is this fix already released? the latest published chrome extension is 8.0.10, dated 22-Sep-2020 |
It'll be fixed in version >=8.1, which has already shipped on Firefox, and will probably ship on Chrome early next week. |
NetworkId is compared to chainId in typed-message-manager.
See
metamask-extension/app/scripts/lib/typed-message-manager.js
Line 164 in d68f156
and
metamask-extension/app/scripts/controllers/network/network.js
Line 123 in d68f156
network is set to be the result of the rpc method "net_version" i.e. networkId, and it is compared to chainId, which on ganache-cli aren't the same.
Edit: The bottom line is that if chainId is provided in the message, Metamask will always throw on Ganache.
The text was updated successfully, but these errors were encountered: