I am trying to use signed typed data. But when I am doing the signature I am getting the following error:
Error: urilib.resolve is not a function
at getJsonRpcError (errors.js:176:1)
at Object.internal (errors.js:42:1)
at provider.sendAsync (openloginJrpc.esm.js:686:22)
at async provider.request (openloginJrpc.esm.js:708:1)
To provide you with more details. I tried many differents approches and this one is happening with ethers v5. Even in your exemple bundle there is the exact same error with ethers v5.
Hi @guillaume, I tried out the given signMessage method with the vue-evm-modal example and I faced no issue whatsoever. I am curious did you run npm install after changing the ethers version? Or do you use yarn?
@guillaume Have you tried removing the node_modules folder and the package-lock.json and running a fresh npm install ? Let me know if this resolves the issue for you. I am puzzled because I am not able to re-create this error on my side with the said example and replacing the signMessage code with the one youāve mentioned.
@maharshi Ok it is weird I tried all of this and I still have the same error. This is really a bottleneck for us because I am missing only this function to go liveā¦
Did you think to change the import in Home.vue L103 with ethers RPC ?
import RPC from "./web3RPC";
Should become:
import RPC from ā./ethersRPCā;
And the repo is not working with v6 compilation fails⦠Though I am really stuck.
Okay @guillaume. I got the error. Thanks a lot for pointing it out and keeping our examples up to date. I have resolved it. I have resolved the errors with the ethers v6. It is advisable to be on the latest version of ethers to prevent the exposure to vulnerabilities.
I will be raising a PR for it and will let you know.
Could be great as well to have it working with v5 to allow all projects to have it working⦠I am planning to move to v6 but Iād like to have it up and running with v5 as wellā¦
@guillaume I understand that this error is seen with the signMessage method pasted by you. But I am starting to believe that this is an issue with the method signer.provider.send(method, params) and nothing on the web3auth side. Advising you to refer their documentation for the methods that are used to sign a message or you could try using the way we have used in our examples. Let me know if this works for you.