Cannot execute Moralis.enableWeb3() error on User denied signature for wallet connect

hi,
i’m having error while connecting to wallet Uncaught (in promise) Error: Cannot execute Moralis.enableWeb3(), as Moralis Moralis.enableWeb3() already has been called, but is not finished yet ,
the error occur when new user ( unconnected wallet ) open my dapp from any wallet and click connect wallet but when the popup to connect wallet the user click back and then click connect again the error occur and they cant connect until page reload.

I have also tried it on link https://walletconnectmoralis.netlify.app/ this also gives the same error for above mentioned condition

you could try to catch that error and refresh the page?

on catch I received the same error that i mentioned above

And can you refresh the page at that point?

yes i can refresh and once i refresh the page i’m able to scan the qr code again.but if i denied signature confirmation then i’m not able to do anything , connect wallet button gives Cannot execute Moralis.enableWeb3(), as Moralis Moralis.enableWeb3() already has been called, but is not finished yet error and no qr popup shown on button click

I mean, if you catch this case and refresh the page, it should work if you try again and next time you don’t deny it again?

yes then it works properly

How have you used enableWeb3() in your own code? You just need to handle this error e.g. only attempt to run enableWeb3() if it isn’t already enabled.

If you catch the error, you will still get the error (it doesn’t hide it or prevent it) but it won’t break your app.

The demo you linked is just for demonstration and doesn’t implement error handling.