Closed shrugs closed 1 year ago
Mobile linking can use either deep links or universal links
Universal links are preferred because they prompt the user to install the app if its not present
Personally I've never tested this case where after installing it would continue to take you to the app store.
I would probably restart the app website again to see if that makes a difference
we did kill the site & the app multiple times. perhaps it's something at the OS level where it doesn't realize the new url scheme is registered by an installed app? haven't heard of that happening before, but idk
There are two issues here: First, it takes some time for iOS to update a sort of cache of deeplinks. Means that we need to wait a bit (+kill apps etc) before being able to use walletconnect after having installed a wallet.
Second, as I mention in #394, once we select a wallet on the WC mobile modal, it stores the choice in the local storage, this is why I guess the modal does not appear again. We must have a way to clear this selected wallet cache in case we want to use another wallet or if there is a problem with the one selected.
yeah, current workaround on my end is to ask someone to download rainbow first, before using the site with wallet connect on it. this'll work for me for now, but i wonder if there's a clever workaround on the library side
Can confirm I have experienced this many times with Rainbow on iOS 14.4.2 + iPhone X.
Whenever trying to sign in into OpenSea via WalletConnect (and Rainbow.me) it does nothing except to open the app. The modal never shows, even on a drag session.
Killing the app doesn't help, neither does invalidating browser cache to connect my wallet again.
It's like the deep links don't work at all.
I am experiencing this too; happy to help provide any info to help debug
I'm experiencing the same issue. Is there anyway I could disable this. I just need a popup with the QR modal.
Every time I create a session, the browser is asking me if i want to go to the app store (to the Metamask app).
I'm using the latest version of wallet connect client and qrcode modal, heres my code: ` import WalletConnect from "@walletconnect/client"; import QRCodeModal from "@walletconnect/qrcode-modal";
const connector = new WalletConnect({
bridge: "https://bridge.walletconnect.org",
qrcodeModal: QRCodeModal,
qrcodeModalOptions: {mobileLinks: []}
});
if (connector.connected) {
await connector.killSession()
}
connector.createSession();
connector.on("connect", async (error, payload) => {
if (error) throw error;
const { accounts, chainId } = payload.params[0];
const nonce = await getNonce('rinkeby', accounts[0])
const sig = await connector.signPersonalMessage([`Sign In to COOL_PROJECT`+nonce, accounts[0], ''])
});
`
Any update on redirecting to AppStore for SignMessage Request Issue?
any updates, i'm getting this issue too
I noticed, it happens on calling any rpc method to open app immediately after connection, on adding some user interaction it doesn't happen. For ex: Most of the dapps immediately invokes signMessage call, as a workaround just add some user interaction to invoke this call instead of invoking it directly after login.
I noticed, it happens on calling any rpc method to open app immediately after connection, on adding some user interaction it doesn't happen. For ex: Most of the dapps immediately invokes signMessage call, as a workaround just add some user interaction to invoke this call instead of invoking it directly after login.
Ahan that's the point. So what should we do to workaround that issue? Delay the sign function or something like that?
I noticed, it happens on calling any rpc method to open app immediately after connection, on adding some user interaction it doesn't happen. For ex: Most of the dapps immediately invokes signMessage call, as a workaround just add some user interaction to invoke this call instead of invoking it directly after login.
Ahan that's the point. So what should we do to workaround that issue? Delay the sign function or something like that?
a workaround can be asking user to click button to invoke rpc call.
I noticed, it happens on calling any rpc method to open app immediately after connection, on adding some user interaction it doesn't happen. For ex: Most of the dapps immediately invokes signMessage call, as a workaround just add some user interaction to invoke this call instead of invoking it directly after login.
I was trying to fix the same issue, and am glad I saw your connect, as the problem was initiating too many calls in row
I have the flow connect -> try switch chain -> if no chain exists, prompt add chain
And this flow results in going to app store for metamask for some reason..
After I split it so, I prompt the user to do every action on the web page, it works fine
The problem is of course horrendous UX, and the user is prompted back and forth continuously
Thanks!
Hi! I'm seeing the same issue of WalletConnect opening the store instead of MetaMask but only when I triggered the message sign call. Here is a recording of the issue
https://user-images.githubusercontent.com/390645/167661567-c4d7e7af-224e-48ae-b408-43e750dba504.mov
As @himanshuchawla009 mentioned by asking the user to click on a button to open the wallet I was able to workaround the issue and the app store no longer opens.
@pedrouid Maybe it would be helpful to have a better UX to compress the connect and sign in one step, so after a user connects his/her wallet it automatically signs a message provided one the connection is started.
Hi, same problem with MetaMask app as on the video in this comment . In case of splitting 'connect' and 'sign message' into two separate user actions (button clicks) it works as expected, but without new action from user iOS Safari opens AppStore . Have no clues why iOS Safari has different behaviour with and w/o extra click from user.
Hi! I'm seeing the same issue of WalletConnect opening the store instead of MetaMask but only when I triggered the message sign call. Here is a recording of the issue
RPReplay_Final1652193389.mov
Are you using Web3Modal?
@edsonPrimo nope, just wallet connect.
Not sure what happened, but when I clicked the Metamask icon it would take me to Metamask app, see https://github.com/clxyder/walletconnect-expo-example for a gif.
But now it sends me first to Safari, then the app store. Any help is appreciated.
Hi! I'm seeing the same issue of WalletConnect opening the store instead of MetaMask but only when I triggered the message sign call. Here is a recording of the issue
RPReplay_Final1652193389.mov
Exactly the same issue on my website project. I'm using Moralis as authentication. Moralis always trigger signMessage
immediately after connecting the wallet on MetaMask. And it always opens the App Store.
@pakokrew some updates
metamask has release 5.2, 2 weeks ago now - https://github.com/MetaMask/metamask-mobile/releases
According to metamask this has "fixed" DL opening the app store - https://github.com/MetaMask/metamask-mobile/pull/4167: [IMPROVEMENT] Adds support for 'dapp/' urls support on 'metamask://' and fixes DL opening to Apple Store
However, even with this 5.2 version and latest wallet connect, on multiple iOS versions, still get this issue. Can this please be treated as a priority?
In terms of re-creating the issue, it is tough. In one case the first time to use wallet connect with MM 5.2 immediately failed and just went to the app store. In another case, safari -> MM was working fine, and then suddenly started directing to the app store...
If this is not high priority development for WC, is there any known work-arounds other than using the browser inside MM that WC can suggest!?
We're experiencing the same issue on iOS, as Wallet Connect opens Safari + App Store instead of opening MetaMask. Any updates?
The solution for me was to ensure the web3 provider send request (RPC API) was the first network request after a user action.
I've deployed an example here forked from web3-react/example-next (v8) which consistently reproduces the issue when the checkbox is ticked on iOS by making a random async request first instead. Example diff here: https://github.com/xaun/web3-react/commit/694f7913ecc77191ff410c077881cd70e7b0f50e
So for example, I was fetching a nonce from an API before signing a transaction with "eth_signTypedData_v4"
on user click. Simply fetching the nonce before-hand (in an effect or what ever), and requesting "eth_signTypedData_v4"
immediately after a user action fixed the app store redirection, and linked directly to MetaMask.
I'm guessing this is something to do with mobile devices blocking redirections (deeplinks/universal links/or what not) that are not detected as derived from a user action.. something along the lines maybe? I'de love to know exactly why this behaviour occurs, as it's been a bit of a journey to figure out this "gotcha".
I noticed, it happens on calling any rpc method to open app immediately after connection, on adding some user interaction it doesn't happen. For ex: Most of the dapps immediately invokes signMessage call, as a workaround just add some user interaction to invoke this call instead of invoking it directly after login. This way is success,but when my page is embedded in cocos‘s webview,it can not work, still redirecting to the wallet webside, does anyone konw how to fix it?
I noticed, it happens on calling any rpc method to open app immediately after connection, on adding some user interaction it doesn't happen. For ex: Most of the dapps immediately invokes signMessage call, as a workaround just add some user interaction to invoke this call instead of invoking it directly after login.
This worked for me. Thank you
@shrugs is this still an issue?
@finessevanes i think we can safely close the issue, unless someone else has a repro
Hi! Just wanted to add that this issue can affect you even if you don't connect your wallet and trigger some other wallet action in the same user interaction. The issue is broader than that.
The iOS browser puts certain restrictions on deep links, which means that any wallet interaction must be triggered ASAP after the user initiates it. If you do a lot of other work in between the user clicking a button and attempting to open the wallet (estimating gas, receiving a nonce from a server, etc) you will get this issue.
The Wagmi team has written a good article on why this issue happens (and how you can solve it with Wagmi by using prepare hooks) https://wagmi.sh/react/prepare-hooks#ux-pitfalls-without-prepare-hooks
Anyway, this is not WalletConnect-specific, so the issue should still stay closed.
@himanshuchawla009 Hi! for me adding actions one by one triggering by buttons or any user interaction only solves the issue for android but not for ios device. It still redirects to app store when I click on button.
as part of onboarding new users via themanymatts, i use wallet connect with phones that don't yet have a wallet installed. the model correctly opens the app store (when selecting rainbow for example), but after installing & onboarding onto rainbow, clicking the rainbow wallet still redirects to the app store instead of opening the wallet directly.
following that, once i was able to get rainbow to open via the mobile linking url scheme (after some juggling of killing rainbow, the app store app, and reloading the webpage), the wallet connect modal didn't show up until after multiple tries.
if you have any thoughts on what might be causing this behavior, i can continue testing with people IRL. i was able to have a smooth experience by telling someone to download rainbow ahead of time (we then went through the wallet connect process 30m later, which may or may not be relevant)