Proposal expired error when initializing the WalletConnectV2Adapter, but not connecting to it

Hi Team,

I came across some unexpected behavior while using the Web Modal SDK.

Behavior:

I get a Proposal expired error (from WalletConnectV2Adapter) after 5 minutes when connecting with an external wallet option that is not Wallet Connect. The modal then opens again, and if I try to login I get an Already connected error.

I get the same Proposal expired error if I just open the modal, click on the Connect with Wallet button and then close the modal. If I connect through the Wallet Connect option everything is fine.

After some investigation I suspect that clicking the Connect with Wallet button initializes a Wallet Connect session (also showing the QR code). Connecting with Wallet Connect then fulfills the session flow correctly, while selecting a different option (or just closing the modal) leaves the session unhandled, resulting in the Proposal expired error after the 5 minute timeout. Just wanted to mention my thoughts in case it would be of any help.

Steps to reproduce:

  • Open modal
  • Click on Connect with Wallet button
  • Connect with Metamask or just close the modal

After 5 minutes the Proposal expired error gets triggered from WalletConnectV2Adapter and the modal window opens again.

Expected behavior:

Error does not get triggered and the modal remains closed.

More details:

  • SDK Version: 6.1.3
  • Developed in: Next.js 13
  • Platform: Google Chrome browser on Windows 11
  • Browser Console Screenshot:

Proposal error

Web3Auth initialization and login code snippet:

I use the standard flow, as demonstrated in the documentation. I also tried configuring the WalletConnectV2Adapter myself, but the result remains the same.

Initialization:

const web3auth = new Web3Auth({
clientId: WEB3AUTH_CLIENT_ID,
web3AuthNetwork: “mainnet”,
chainConfig: {
chainNamespace: “eip155”,
chainId: “0x1”,
rpcTarget: “https://rpc.ankr.com/eth”,
},
});

await web3auth.initModal();

setWeb3Auth(web3auth);

Login:

const web3authProvider = await web3Auth.connect();

Thank you for your help in advance!

2 Likes

@nevaarne This is a known issue with WalletConnect V2. The product team is working on the fix and will release it ASAP with the v7 release.

2 Likes

Thanks for the info! Has a public time estimate maybe been put on this?

2 Likes

A week would be the best estimate. But please keep yourself updated by tracking the announcements section.

1 Like

Perfect, thank you very much!

2 Likes

Fixed in 6.1.7. Pls upgrade

1 Like

Has this been tested? The behavior remains the same for me.

Can confirm the issue has not been resolved

1 Like

We are still having this issue with 6.1.7.

Hey guys, so what’s the status on this error please ?

I also still have it and I am using :
“@web3auth/no-modal”: “^6.1.7”
“@web3auth/openlogin-adapter”: “^6.1.7”

@chai We are still having this issue on 6.1.7. Is there any updates on this?

@here Please try removing all the non-mainnet chains from the walletconnect initialization. Please let me know if this works for you.

Hello team.
I am using
“@web3auth/base”: “7.0.1”,
“@web3auth/metamask-adapter”: “7.0.1”,
“@web3auth/modal”: “7.0.2”,
“@web3auth/openlogin-adapter”: “^7.0.1”,
“@web3auth/wallet-connect-v2-adapter”: “7.0.2”
But I got same issue mentioned above.

@maharshi I tried using only the mainnet chain (0x1), but the behavior remains the same. Do you have a proper fix planned for this on your roadmap?

1 Like

Hi @afarley,
Are you using the @walletconnect/qrcode-modal? This is deprecated. Could you try using @walletconnect/modal ?
Here’s an example using the above.

@maharshi
Using:
“@web3auth/base”: “^7.0.1”,
“@web3auth/coinbase-adapter”: “^7.0.2”,
“@web3auth/metamask-adapter”: “^7.0.1”,
“@web3auth/modal”: “^7.0.3”,
“@web3auth/web3auth-wagmi-connector”: “^5.0.1”

We are still intermittently experiencing this issue. Haven’t found deterministic steps to reproduce. It disconnects logged in users so I would say really high priority. We updated to v7 especially because this was supposed to be fixed.

The error triggers without using WalletConnect (for example while logged in with OpenLogin).

Here is how we are using the WalletConnectV2Adapter:

    new WalletConnectV2Adapter({
      adapterSettings: {
        walletConnectInitOptions: {
          projectId: environment.walletConnectProjectId,
        },
      },
    }),

Edit: We are using web3auth/modal so qrcodeModal is not required as specified here.

Hello i’ve got the same issue.

    "@web3auth/base": "6.1.7",
    "@web3auth/modal": "6.1.7",

Exactly five minutes after login a user in my app using Metamask, the modal show up again. An error message in my console says :
error while creating new wallet connect session Error: Proposal expired
from walletConnectV2adapter.ts

This is preventing me and my team from going live.

Is there anything I can try, or give to the team to help resolve this issues. As I understand from previous answers upgrading to 7.X.X is not solving the matter.

Best of lucks to the W3A Team for sorting this out.

EDIT : I’ve tried with upgrading to 7.X.X and it still doesn’t work

1 Like

@vjgee you help me once, can you help me twice ? :blush:

I have flagged this to our team and will get back once there is an update.

1 Like

Hi @JulienRousset,
I haven’t been able to re-create this issue on our sample app here. The source code for the same is here. Please compare the code for some missing configuration or misconfigurations. This should solve your issue.