Invalid signatures

I’m using MPC Core Kit with a JWT verifier on a Next.js 13 app under Next Auth using Google as my sign in provider. All works fine, except sometimes–especially if I haven’t used the tab for a while–I get an invalid signature when trying to sign a message or send a signed userop.

Here’s an example of the error sendUserOpToBundler failed Error: Invalid UserOp signature.

Usually, the issue resolves if I reload. And it always resolves if I sign out and sign in again. Any ideas what could be happening and how to correct? Is the timestamp of the token or nonce stale/old perhaps? Any ideas on how to check this?

  • SDK Version: @web3auth/mpc-core-kit@0.3.1
      const coreKitInstance = new Web3AuthMPCCoreKit({
        web3AuthClientId: WEB3AUTH_CLIENTID,
        web3AuthNetwork: WEB3AUTH_NETWORK.DEVNET,
        uxMode: "popup", 
      });
      await coreKitInstance.init();

  • Verifier Details:
          const web3authProvider = await coreKitInstance.connect({ 
            subVerifierDetails: { 
                verifier: "denim-mpc-devnet",
                typeOfLogin: 'jwt',
                clientId: WEB3AUTH_CLIENTID,                
                jwtParams: {
                    verifierIdField: "sub",
                    id_token:  session?.user?.id_token,
                    domain: "http://localhost:3000", 
                }
            }
          })

Error Message:

client.js:1 sendUserOpToBundler failed Error: processing response error (body="{\"error\":{\"code\":-32507,\"data\":null,\"message\":\"Invalid UserOp signature or paymaster signature\"},\"id\":44,\"jsonrpc\":\"2.0\"}", error={"code":-32507,"data":null}, requestBody="{\"method\":\"eth_sendUserOperation\",\"params\":[{\"sender\":\"0x8ae89588b845Cd9392a545E8c9ba509D814Dfb79\",\"nonce\":\"0x11\",\"initCode\":\"0x\",\"callData\":\"0x940d3c6000000000000000000000000007865c6e87b9f70255377e024ace6630c1eaa37f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000e6d24e69a35944fd15ef2948ca8e07067bd5d57a00000000000000000000000000000000000000000000000000000000005b8d8000000000000000000000000000000000000000000000000000000000\",\"callGasLimit\":\"0xf86e\",\"verificationGasLimit\":\"0x282d4\",\"maxFeePerGas\":\"0x1609a0\",\"maxPriorityFeePerGas\":\"0x4e83c\",\"paymasterAndData\":\"0x\",\"signature\":\"0xaa5e799546d4f8a47733e03e4dd2b33e16d353d354c601fcde115d9141f149b8005d9c49edc684ab66cdf375b496038c88004a5d5b384c986c97c4a0ef85540e1b\",\"preVerificationGas\":\"0xee21\"},\"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789\"],\"id\":44,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="https://v0-6-meta-bundler.onrender.com", code=SERVER_ERROR, version=web/5.7.1) at Logger.makeError (index.js:224:1) at Logger.throwError (index.js:233:1) at eval (index.js:261:1) at Generator.next (<anonymous>) at fulfilled (index.js:5:43)

@ajagoe Thanks for reaching out.

Your issue has been forwarded to our team and we will get back with further updates once more information becomes available.

@ajagoe As discussed during the community call, please switch to Mainnet instead of Devnet

I’m seeing the same intermittent invalid signature failures on Sapphire Mainnet as on Devnet. Any ideas?

@ajagoe Thanks for your feedback.

I will forward this information to the team and keep you updated on the findings.

Hi Andy,

Are you still facing this issue on the latest SDK version?

Vijay, this fix has not been merged into a release branch yet – it’s still in the add-third-share branch and release is unchanged at v0.3.1 since July. I have not tested the dev branch.

hi man, hopefully you get this message - have you been able to fix it?

we have a very similar setup to yours (custom google JWT, nextjs, web3mpccorekit@0.3.1) and are having the same issue of unstable signature correctness.

Wondering if you’ve been able to fix it somehow

Please join our upcoming community call - Web3Auth Community Call #4 · Zoom · Luma

@ofiryieldchain @ajagoe MPC core-kit v1.1.0 is released, check here. Please try it out and if it doesn’t fix your issues, chime into out community call where there will be engineers to resolve your doubts.