-
-
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
Error: invalid object key - from #862
Comments
Quick question. Are you using the most recent version of v5? This part has undergone a lot of turmoil the last few days. Regardless, I’ll look into this shortly. |
Yes, I’ve tried the error is also on beta 190. Expected that 190 might have caused this because I read a point major refactor in contract code. So, yesterday I tried a quiet a few versions to find that it also gives error on beta 141. v5 earlier than beta 141 gives some stack error about word lists so I couldn’t get it working. |
I am seeing this too. beta-189 works fine. |
I can confirm that I am seeing this on "ethers": "^5.0.0-beta.189", |
Thanks. Yeah, looking into it now... :) |
Found the issue, just building out the reproduction script right now. |
This should be fixed in 5.0.0-beta.191. Try it out and let me know. :) |
Seems to have fixed it for me - thanks |
Thanks for the fix @ricmoo. However, it's weird to me that Just curious here about this why old versions are not giving error. Is this due to internal packages which makes older versions of packages install latest internal packages? |
Yeah, there was a major internal refactor of Contract, which is what caused it. The older versions had a massive “runMethod” function, which wrapped 5 completely different things (which happen to have a lot of overlap) and made a lot of use of the TypeScript any. It was kinda fragile and hard to visually inspect the correct thing was happening. The new code is now 5-ish separate functions which call each other and expose the various stages directly. |
Oh! Just realized what you meant. So, ethers is a large collection of internal modules. Since the contract module was the problem and since ethers will pick up the most recent version of contract, older versions will pick that up. To lock the sub-module versions, you can use a package-lock and npm ci (instead of npm install). Does that make sense? I can give better examples if you want. :) |
Closing this now, but if you have any further issues, please re-open. Thanks! :) |
Thanks for the explanation, it cleared the doubts I had. And I'm sorry if you thought I didn't reply quickly. Actually, 2 days ago we had a cyclone here and electricity was out due to damage and it just got fixed. My last message happened to be the last one I did during the calamity just before the power outage. Now it's alright here but TBH all this time offline I was eagerly waiting for coming online again to check the reply. And I'm thankful for the time you give to come up with quick fixes. |
@zemse No worries. You never need to reply. I just worry sometimes about closing an issue too early on people. If something seems resolved I'll close it eventually. Right now I'm going through a little more aggressively than usual, because I'm planning tome v5 out of beta in a week, and am trying to clear out the issues a bit so I can make sure I haven't missed any features or issues people have had. Glad you're safe, and make sure you stay safe. That's more important than adding "issue resolved" metadata to an issue. ;) |
Deploying the contract
Then the below line throws
Error stack:
The line throws on
ethers v5
, while it works forethers v4
.To reproduce with the files:
The above line will prepare you a quick simple project with
ethers v5
(that does the above) to reproduce the error.@ricmoo This might be related to #321. Looks like the contract along with
JsonRpcProvider
is injecting afrom
, and thecheckProperties
is not happy with thefrom
. Can you please have a look?The text was updated successfully, but these errors were encountered: