-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Uncatchable “missing v” when sending transaction #4513
Comments
It seems like this isn’t a WalletConnect issue, but maybe a MetaMask issue (for part 2). Still investigating. I currently only have data points for MetaMask through WalletConnect. There is a “hacky” solution I can imagine if necessary. Since only the v is missing, what ethers could do for EIP-1559 transaction transactions, at least, is use ecrecover to compute The doesn’t help for EIP-155 transactions though, unless the chain ID is incorporated, which starts feeling more hacky. I’d ether fix this upstream, as it seems like a wallet bug, but seeking feedback on some other ideas too. ;) |
I am using ethers v6.9.0 and web3modal v3.4.0 + metamask extension |
it happens after several times of sending a transaction. code snippet:
it never catches the error |
I'm not able to reproduce it, I was able to do txs with both MetaMask and Rabby.
So does it mean it happens randomly? |
yes. It is a random error. I would be great at least if we can catch it. |
Catching it is coming. :) |
Same error here (but transaction sent successfully), randomly happening about 90% of the time, using ethers.js 6.9.0 with @metamask/sdk-react-ui 0.14.1 and MetaMask Chrome Extension async function mintToken() {
const provider = new BrowserProvider(sdk!.getProvider());
const contract = new Contract(tokenInfo!.address, [{
"inputs": [
{
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}], await provider.getSigner());
const tx = await contract.mint(foundNonce!); // this promise rejected
console.log('mint tx', tx);
} the error message is
just debugged for a couple hours for this problem until I saw this issue :´( |
I noticed that the error occurs when I send a transaction with the same data than the previous one. maybe the code does not regenerate the signature because the data is the same.. not sure |
yes. that is the way to reproduce the error. send the same transaction two times in a row |
@llopez awesome! Could you try with a different wallet? It would be nice to know if this is a MetaMask issue or the issue is somewhere else |
I am experiencing the same problem now
here:
await usdc.approve when I click for Aproval on metamask, the error shows, and nothing more happens. waiting forever. |
I just had this issue, was working fine till yesterday. Wallet: Metamask |
It appears that the issue I'm encountering is specific to MetaMask. When using other wallets like Coinbase, WalletConnect (WC), or Ruby, this problem does not occur. I've attempted using different RPC endpoints with MetaMask, but they all seem to fail, although occasionally it does work correctly. It's worth noting that my testing was exclusively on various testnets, including Ethereum's Sepolia, Binance Smart Chain's Testnet, and Mumbai. |
I get this error when I'm using ethers.js@6.8.1 with metamask@11.7.0 on testnet Sepolia. P.S. I'm curious why here try to get signature from value, can anyone give me a clue about it? ethers.js/src.ts/providers/format.ts Line 242 in 6ee1a5f
|
Hello guys i have same issue i build a nft marketplace app about 1 month ago everything works fine but now i start to create new one i have this issue i test my old app my old app have the same issue. I realised that it gives error but smart contract funtions go on to work very fine. If i try to use transaction i randomly get this error but i remove transaction on my code just run smart contract function i dont have any problem about 24 hours i try to find a solution for it. Now i am happy i not alone. If i have a solution for it as soon as possible i will share with u. Have good a luck |
Hi again try to use coinbase wallet everything works fine till metamask solve this problem i will use coinbase |
We ran into the same issue when ethers is trying to resolve transaction data with metamask before metamask has received enough confirmations from the network. Apparently metamask returns the transaction without complete signature data. original
my change
|
@wenjoy The reason that Ethers is very much a “don’t trust, verify" mindset, which is why there is a problem right now; the node is returning corrupt (missing the I do have an idea for a fix if this isn’t fixed upstream soon, which is to “just try” both yParity of 0 and 1, and whichever matches the from address, use it to populate the The uncatchable part is entirely my fault though, and I’m still working on it. My current fix is still showing some weirdness in my tests I’m trying to track down. |
Hey @ricmoo - is there anything in particular that you'd recommend to mitigate this issue in the meantime? It seems like this is an error coming from metamask, so, I imagine this won't be addressed for a little bit. |
has anyone opened an issue in MM repo? |
this also helped me. Thanks |
@ricmoo “ |
works on |
any ideas why this error occurs only google chrome? it works as expected in egde and firefox Do not work on:Google Chrome Version 119.0.6045.199 (Official Build) (arm64) and Version 120.0.6099.109 (Official Build) (arm64) Works on:Firefox 121.0 Microsoft Edge Version 119.0.2151.97 (Official build) (arm64) |
This has been published to NPM as v6.9.1. The fix for uncatchable errors is fixed for good (problem 1 listed above). However, there is still an underlying issue with MetaMask (problem 2 listed above), but this version also has a stop-gap solution to help mitigate the problem from manifesting. Hopefully at some point in the (distant) future, this code will be removed or possibly extended to be more robust against data that can technically be recovered from. Thanks! :) |
@irfanonk The issue is with specific versions of MetaMask when the mobile and extension had part of their code bases merged. The mobile version had a small issue which was never caught until merged into the extension. The latest version of Ethers now has code to mitigate the issue though. Updating should fix any affected platform. |
I had the same problem with TrustWallet. |
@ricmoo I'm using 6.9.1 version directly from github. I've tested 10+ tx on goerli network everthing was good but then I got a same missing v error on a tx. PS: I think this is in catch part. Catch works but metamask issue still persist. |
Yes, when i use the release 6.9.1, the error is happen again. Actually, i'm using the current version of main from ether. |
I think the latest version (11.7.2) of MetaMask has fixed this issue. |
confirmed...after update MetaMask, it's working fine now... |
Closing this now. If anyone continues to experience any issues (after updating to the latest version of Ethers), please re-open or create a new issue. Thanks! :) |
…vide some retry-recovery for missing v (ethers-io#4513).
…vide some retry-recovery for missing v (ethers-io#4513).
…vide some retry-recovery for missing v (ethers-io#4513).
* docs: fixed typo in jsdocs for Wallet.createRandom (ethers-io#4461) * admin: added diff scripts for build page * admin: updated dist files * Added safe and finalized provider events (ethers-io#3921). * tests: bumped Node versions for testing (ethers-io#4451) * admin: style fix (ethers-io#4356) * More robust FallbackProvider broadcast (ethers-io#4186, ethers-io#4297, ethers-io#4442). * Account for provider config weight when kicking off a request in FallbackProvider (ethers-io#4298). * Fixed ParamType formatting causing bad tuple full and minimal ABI output (ethers-io#4329, ethers-io#4479). * Added Base network to AlchemyProvider (ethers-io#4384). * Add auto-detected static network support to providers and allow customizing socket provider options (ethers-io#4199, ethers-io#4418, ethers-io#4441). * Use provider-specified suggested priority fee when available, otherwise fallback onto existing logic of 1 gwei (ethers-io#4463). * admin: updated dist files * admin: update changelog after build-clean * docs: Fixed some grammar in getting-started (ethers-io#4486, ethers-io#4487, ethers-io#4488) * Fix uncatchable issue when sending transactions over JSON-RPC and provide some retry-recovery for missing v (ethers-io#4513). * admin: update dist files * Fix Base58 padding for string representation of binary data (ethers-io#4527). * admin: updated dist files * Limit decoded result imflation ratio from ABI-encoded data (ethers-io#4537). * admin: updated dist files * Better debugging output on fetch errors. * docs: added StaticJsonRpcProvider to migration docs * Fixed typo in Error string (ethers-io#4539). * Fix EIP-712 type aliases for uint and int (ethers-io#4541). * Added additional sepolia testnets. * Updated third-party provider network URLs (ethers-io#4542). * admin: updated dist files * Fixed normalization and abstracted EIP-712 Array parsing (ethers-io#4541). * admin: updated dist files * tests: added testing for correct thrid-party URLs * Updated thrid-part provider URLs for QuickNode. * tests: rename test suite to follow naming convention * admin: updated dist files * Normalize EIP-712 types before computing the payload (ethers-io#4541). * tests: add tests for EIP-712 payload aliases * admin: updated dist files --------- Co-authored-by: Richard Moore <me@ricmoo.com>
* Fix uncatchable issue when sending transactions over JSON-RPC and provide some retry-recovery for missing v (ethers-io#4513). * admin: update dist files * Fix Base58 padding for string representation of binary data (ethers-io#4527). * admin: updated dist files * Limit decoded result imflation ratio from ABI-encoded data (ethers-io#4537). * admin: updated dist files * Better debugging output on fetch errors. * docs: added StaticJsonRpcProvider to migration docs * Fixed typo in Error string (ethers-io#4539). * Fix EIP-712 type aliases for uint and int (ethers-io#4541). * Added additional sepolia testnets. * Updated third-party provider network URLs (ethers-io#4542). * admin: updated dist files * Fixed normalization and abstracted EIP-712 Array parsing (ethers-io#4541). * admin: updated dist files * tests: added testing for correct thrid-party URLs * Updated thrid-part provider URLs for QuickNode. * tests: rename test suite to follow naming convention * admin: updated dist files * Normalize EIP-712 types before computing the payload (ethers-io#4541). * tests: add tests for EIP-712 payload aliases * admin: updated dist files * (feat) ZIL-5458: Add emacs backups to .gitignore (feat) ZIL-5458: Don't validate canonical signatures --------- Co-authored-by: Richard Moore <me@ricmoo.com>
Ethers Version
6.9.0
Search Terms
Missing v, signature
Describe the Problem
This is related to two issues:
I’m working on a fix for 1 (which is exposing some other possible oddity) and communicating with other groups for 2.
If you are experiencing this issue, ca you please let me know which wallet you are using? It seems like MetaMask through Wallet Connect is having this issue at least. Curious if there are others.
Code Snippet
No response
Contract ABI
No response
Errors
No response
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: