Ethereum Boilerplate: Metamask Authentication not working on Mobile, Wallet connect not working either

I don’t know yet why you get those cors errors there, I know that those urls will be accessed only when trying to authenticate with wallet connect and now when using metamask

are you connected to some vpn, or can you try from a different IP?

you could get CORS errors in case of timeout, or when those requests are blocked somehow

@cryptokid

I tested it out on a brand new server as well as changing IP (hotspot) nothing seems to work :confused: No i dont use any VPNs. I just downloaded the ethereum boilerplate from the github repo and changed the provider to wallet connect.

E142A61D-DF96-44F6-BFD4-E7E4BAEE8B61_4_5005_c

This is what I get now

and if you use it with metamask it works well?

If I do not put in a provider (so it defaults to metamask) and I use the a chrome browser with metamask installed it works, but does not work in a browser without metamask, which would be the case on a mobile phone or in incognito mode

ok, you could test it with metamask now, it should work with wallet connect, but I don’t know exactly why you get that error

@cryptokid

The issue is that I need to push a DApp to production, and most users do not use desktop but rather their phones. So it needs to work well on mobile. Do you have an example of the use of wallet connect within the ethereum boilerplate that works?

@LocoTheDev may know more than me about that ethereum boilerplate

1 Like

@LocoTheDev Hi! do you have any suggestions on why the boilerplate ethereum template’s wallet connect does not work on mobile correctly nor on an incognito chrome window

Wallet connect should work properly on eth boilerplate. I think it doesn’t work on incognito mode because of the session that needs to be stored locally

@LocoTheDev

What about on mobile?

@LocoTheDev @cryptokid @Yomoo I literally tried everything, used another computer, created another Moralis account with a new server, it still does not connect… I am using Trust Wallet from my phone and connecting through the Wallet Connect QR code scan. I dont know how to solve the issue other than not use Moralis and implement a different solution. Could you please look into the issue?

The issue is that the user is logged in, but none of the components update

Hey @achello !

I wasn’t able to answer you earlier, sorry. I just installed a fresh version, I’ll test it right now! I’ll let you know if I find something :raised_hands:

@Yomoo thank you for looking into it. you simply have to download the github repo and change the provider to wallet connect on the Account component and connect to a trust wallet account via QR code. None of the components are updating,please let me know if you have the same issue

@Yomoo I raised the issue on the github repo

2 Likes

Regarding your reply:

Thank you! The boilerplate now is designed only for WC. We will add WC in the next versions.

Do you mean it is designed only for Metamask only?

@Yomoo @cryptokid do you know if this issue still persists?

This is marked as SOLVED but it’s only a work around for react:

I’ve had many issues with Wallet Connect in the past and are just trying to revive it.
Getting the same CORS issue mentioned by others:

Tried with ‘CORS Everywhere’ browser add-on but no avail, might it be a setting on the server side?

I literally stopped using anything Moralis related because of this issue, it’s easier just to do things on your own by not using Moralis than wait for them to fix the issues. It’s been several months now and it’s ridiculous it takes them so long, just because they are doing too many things at the same time.

I did some more digging and it’s definitely related to the moralis RPC endpoint. Using an Infura ID works:

WalletConnectWeb3Connector.js #169:

if (typeof WalletConnectProvider === 'function') {
  ///this.provider = new WalletConnectProvider(config);
  new WalletConnectProvider({
   infuraId: "xxxxxxxxxxxxxxxxx",
  });
}

Still getting heaps of issues with WC, trying to buy an NFT results in revert ‘you cannot buy from yourself’ hahaha. Terrible WC, has been from the start. (see Signer issues when using Wallet Connect or Magic Link together with MetaMask)

But let’s start by fixing the RPC endpoint issue.
I get a similar CORS error by the way if I use an invalid infura key, so it’s probably related to auth and not to actual CORS.