-
Notifications
You must be signed in to change notification settings - Fork 557
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
Illegal invocation
after using wallet_requestSnaps
#1345
Comments
Versions:
|
It happens after update MetaMask Flask in Chrome to 10.28.2-flask.0, previous version was working correctly. |
This may be a known bug with usage of |
Could you help? |
Any updates here? |
Hi @alanorwick , what is the value of snapId in your example? Is it a variable? |
I have the same issue with my snap since the flask 10.26->10.28.2-flask.0 update. It works with an empty snap (same permissions, processRpcRequest empty) and breaks as soon as I add a reference to This issue seems also related: MetaMask/metamask-extension#18590 @Montoya The @FrederikBolding I built Flask 10.28.3-flask.0 and got the same error. When I try the same with the develop branch, it just loads forever after accepting permissions. @pragmatos I built it with |
Similar to @zwilling my snapId is coming in as |
Looking into this to verify whether this is fixed on develop. Will respond back when I have more information |
I'm seeing Will look into the |
I cannot reproduce the |
I tried Between Extension has errors Any ideas? |
@pragmatos Properties such as
See this patch as an example: https://github.com/MetaMask/test-snaps/blob/021bfda5f30f1f229dee0f18dc3731bb15ca1875/.yarn/patches/luxon-npm-3.1.0-16e2508500.patch You may need to patch your dependencies if they are modifying props such as |
@FrederikBolding With bare minimal dependencies I'm seeing Can't confirm it resolves after running the patch as well. Still working through applying the patch via yarn for the nested dependency. |
It's clear. But I use dependencies with |
@pragmatos you may have to patch |
Thanks for checking @FrederikBolding . Trying to compile a minimal example reproducing it, I noticed that the issue is not caused by @metamask/utils. Instead it is caused by the library from where I imported a constant which is passed to the utils function. Will further investigate it. I also have luxon in my dependencies. |
@alanorwick Hmm, it is not intended for all snaps to need to patch Also, what are you using for bundling? Because |
@FrederikBolding from what I can tell We use |
So with only these dependencies I can build and connect fine:
After adding v5.4.3 of Ethers I see the Illegal Invocation again. If I upgrade Ethers to 6.3.0 I see an error on If I had to guess where v5.4.3 would error it would be on the |
A fix is part of Flask |
Flask version |
Fixed it, thank you. |
Function we are calling:
Error we are seeing:
The text was updated successfully, but these errors were encountered: