TrustWallet - WalletConnect - an Unknown Error has Occured

We are having issues connecting the Wallet Connect using Trust wallet Specifically with the mobile app. We are having trouble connecting from mobile browsers as well. We have tried on multiple mobile wallets but we have issues
Please find the screen recording of the issue that we are facing.

can you provide more info?

if you try on a browser on desktop with wallet connect, does it work?

it is easier to look in a browser for errors in the browser console

(upload://85JubLXgPcTcKYb0iLHhuAOl1FD.jpeg)

This is the error that we are getting.

Using a ledger w/ wallet connect on browser works.
Using a ledger w/ wallet connect scanning the QR code works.
Using Trust Wallet & Safepal using the DApps doesn’t connect.
Using Trust Wallet & Safepal using a mobile browser doesn’t connect.
Using Trust Wallet scanning the QR code doesn’t connect.

It seems w/ mobile browser & dapp - something is hung in that the connection is never successful.

It seems to be an issue localized specifically to mobile wallets and yes, everything is up to date.

Yes, It works on the desktop. We are facing the issue with the app and mobile browser. Specifically iOS

Unfortunately it’s not a desktop issue.
We tried w/ several desktop browsers and connected w/o an issue.
Issue is localized to mobile - doing some investigation to see if it is iOS or Android specific or both.

When we tried, it was working on the Andriod.

what type of tech are you using? react, vanilla js, something else?

can you share the part of the code that does the authentication?

We use Vanilla js

const provider = {‘provider’:‘walletconnect’,‘chainId’: ‘56’};

let user;
let web3;
let account;

let chainId;

user = Moralis.User.current();
if (!user) {
user = await Moralis.authenticate(provider);
web3 = await Moralis.enableWeb3(provider);

account = user.get(‘ethAddress’)
}

Have not heard back.

Once again, here is the information requested:
We use Vanilla js

const provider = {‘provider’:‘walletconnect’,‘chainId’: ‘56’};

let user;
let web3;
let account;

let chainId;

user = Moralis.User.current();
if (!user) {
user = await Moralis.authenticate(provider);
web3 = await Moralis.enableWeb3(provider);

account = user.get(‘ethAddress’)
}

I don’t know why this code would not work. For trust wallet it may be other settings that you have to set to make it work completely (specific to trust wallet and localstorage), you may find them in a other forum threads. But this specific error, I don’t know where from it is.

The issue is not trust wallet specific.
Also exhibiting this in safepal.
Also exhibiting in rainbow

The connection fails when using iOS all the time outside of using a ledger.

What settings for localstorage are necessary - can you point us in the right direction?

This:

But it looks like this is not the issue that you have now.

Not at all - let me upload a video to show you what is happening.
But it is iOS specific, verified it working on Android as expected.

@cryptokid - please let me know your thoughts when you see the video.

Maybe you could provide a minimal code that replicates the issue?

Hello team,

The issue is been fixed. Our developer just made some alterations in the code, where he removed the ‘chainId’

const provider = {‘provider’:‘walletconnect’,};

We are still not sure why this issue occurred. But this is what we did to fix it.

3 Likes

Thanks for this. Been facing this issue too