[SOLVED] Walletconnect mobile - does not have a registered handler

Hi, i’m trying to make use of maralis for my webpage. My code that detect user has metamask. if it doesn’t, it will make use of walletconnect as provider (mainly for mobile user).

it works as expected on desktop with metamask. When I try to authenticate via mobile with walletconnect. I have this “does not have a registered handler” error on chrome inspection windows. Can someone please assist. Following is my function that handle authentication: -

async function authenticate() {

        const ethereum = window.ethereum;
        if ( !ethereum || !ethereum.on ) {
            try {
                user = await Moralis.Web3.authenticate({signingMessage:"authenticate", provider: 'walletconnect'});
                web3 = await Moralis.Web3.enable({provider: 'walletconnect'});
                logged_in(true);
            } catch (error) {
                console.log('authenticate failed', error);
            }
        } else {
            try {              
                Moralis.authenticate({signingMessage:"authenticate"}).then(function (muser) {     
                    user = muser;
                    logged_in(true);
                });                     
            } catch(error) {
                console.log('authenticate failed', error);
            }
        }
    }

image

I think you are using legacy syntax, we don’t use Moralis.Web3 anymore, you can just Moralis.authenticate with the same argument as above and you don’t need to enable anything :raised_hands:

thanks for help…
i’ve changed following code base on your advise

When I tried to authenticate via trust wallet. No more error on webpage inspection window. but I got this error on my mobile “Wallet not supported”.

Any idea why is that so?

that’s really weird :thinking: did you try with other wallet connect as well and see how it goes? whether you get the same error or not

I managed to connect via mobile metamask and successfully made a transfer.

Now I see some troubling errors on webpage inspection windows: -

  1. Non ethereum enabled browser
    image

  2. …has been blocked by CORS policy
    image

any idea what causes these errors?

Hmmmm not entirely sure, so wait you are connecting the wallet from your mobile or browser? coz I thought you only use walletconnect in mobile and metamsk in web

you are right… i open i[ the webpage on desktop. then use my mobile to scan QR generated on desktop to do authentication and transfer

hmmm interesting :thinking: never tried to do that myself, I think I should try test it myself

1 Like

I finally managed to figured out. there is no issue with moralis side.

I tried using different wallet’s browser (no chrome) to access my webpage. no issue to authenticate and transfer at all. it has been tested on metamask, trust wallet, token pocket. All seamless…

2 Likes

Excese me, what browser are you using? Im trying use Unity webGl on Chrome mobile.