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? |
Hi @ricmoo. How can i try this version, to test it from your solution? |
I was also experiencing the error on Mumbai. is that a coincidence? |
@danielojedapy , I installed it with npm install https://github.com/ethers-io/ethers.js main @ricmoo , I can confirm its solved the issue I had. |
@ricmoo , I can confirm its solved the issue I had. |
I am still having this issue with the latest version. |
I still have this issue with |
@qureshikaif Are you using the main branch from GitHub? What network are you on? |
I am currently on Mumbai Testnet environment with the Chain ID: 80001. Installed ethers js again with NPM but no luck. Transactions are still failing because the "V" argument is not passed in the signature. |
@qureshikaif You must install NPM with the URL provided above to try out the experimental branch with the fix. I have not published to NPM yet. |
It works now. Thanks. 👍 |
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).
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: