Walletconnect not working on android

@Puertonikko @shirazshakeel86 Did WalletConnect with the demo I linked work for any of you?

The example you are sharing is based on react. Waiting for your response

Fundamentally the React code just uses the same Moralis JS SDK code, so it should be the same. But WalletConnect with this demo does bring up the signature request on my end via MetaMask (Trust Wallet also shows up as an option). Apologies if it is difficult to tap the button on mobile. The code is available in the page source.

If connect doesn’t even prompt a wallet connection (whether that is MetaMask or another wallet), that is another issue though, it may be related to your project or the user’s device.

For the demo you need to go directly to https://ethereum-boilerplate.github.io/ethereum-boilerplate/ for the first time, it’s a routing issue.

Now I have another challenge to figure out which is how to keep the user session active without requiring a new signature after a refresh

I think this depends on the end wallet that is being used.

1 Like

@alex no progress… as it doesn’t work on the android side

The WalletConnect Connect button doesn’t work in the demo I linked above on your Android phone? It brings up wallet apps on a physical (MetaMask) and emulated (Trust Wallet) Android device on my end.

Try uninstalling and reinstalling MetaMask or whichever wallet you’re using.

@alex I have tried reinstalling metamask, but it didn’t work. Moreover, can you tell me the purpose of chain id specified in authentication and enabling moralis in the following code

    await Moralis.authenticate({
      provider: 'walletconnect',
      mobileLinks: ['metamask'],
      chainId: 4,
      signingMessage: 'Login via Digital Dope',
    });
    await Moralis.enableWeb3({
      provider: 'walletconnect',
      chainId: 4,
      mobileLinks: ['metamask'],
    });

As, my moralis server is made in testnet for rinkeby. And can you tell me whether this chain id is used for metamask network specification or is it something else?

That chain id doesn’t depend on your server, is the chain id that you want for the wallet to be connected to.

I want my wallet to be connected with metamask through moralis on angular on my android device. Doesn’t depend on the chain id only need to connect metamask mainnet eth to android dapp angular @cryptokid

then you can specify the chain id specific to mainnet eth, that chain id is 1.

Can you try using another Android device and installing another wallet e.g. Trust Wallet.

@alex i tried the react-native boilerplate in my device and it works just fine. it detects the installed apps and connects easily, however, the angular app doesn’t do anything

The JavaScript only demo above didn’t work for you either (basic WalletConnect code that usually works) - did you try another device?

Hey I am using Wagmi (Vagmi on vue 3 as per my project) to implement WalletConnect and its working successfully on desktop but on Mobile devices like Android it Shows up modal with connect button which pops up select wallet app on mobile (because I have few wallets)
and when I click the app, it opens it but then nothing happens. No signing message.

I also see that the latest Moralis EVM api code example uses Wagmi. (Which is where i Discovered Wagmi for first time)

Anyways, out of 3 apps in my phone Coinomi is the only one that actually prompts for connection while rest app just open up doing nothing.
Although Coinomi just gets stuck on “Connecting” without any success.

Implementation of WalletConnect isn’t the issue, I think it’s either the compilation bundling or straight up WalletConnect issue itself.

Or the App themselves have issue.

I know that WalletConnect uses wc:// link to open & send data to apps to connect it, sign it etc. But it might be the cause of the issue. There is a copy link button under QR code in mobile version which we could use to investigate the issue by comparing the working WalletConnect and the bugged WalletConnect implementations.

Let me know what to do to solve it as well if you figured it out

Do you get the site connection request on the mobile wallet app (and which app is this)?

Try authenticating on mobile with this demo - it’s not using Moralis 2.0 but it’s just a basic check to see if WalletConnect works in general.

Sorry for the late reply, It seems the problem was that WalletConnect works only if its on HTTPS Secure connection if we require to connect with our Android or iOS Wallet Apps. The Dev servers were on HTTP protocal and hence the prompt never showed in apps. Ever since changing to HTTPS Dev, the problem is Fixed.

Solution: Use HTTPS protocol