Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Mobile Safari cannot open page because address is invalid #1336

Open
1 task done
jeanregisser opened this issue Jun 28, 2023 · 5 comments
Open
1 task done

[bug] Mobile Safari cannot open page because address is invalid #1336

jeanregisser opened this issue Jun 28, 2023 · 5 comments
Labels
walletconnect Bug or issue with WalletConnect v2

Comments

@jeanregisser
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

RainbowKit Version

1.0.4

wagmi Version

unsure (version used by https://www.rainbowkit.com/)

Current Behavior

Tapping Argent, Trust Wallet or Omni shows "Safari cannot open the page because the address is invalid."
This is on https://www.rainbowkit.com/

RPReplay_Final1687945964.MP4

Expected Behavior

Tapping these wallets should open them reliably on iOS (Safari).

Steps To Reproduce

  1. Go to https://www.rainbowkit.com/ on Safari on iOS
  2. Tap "Connect Wallet"
  3. Tap Argent / Trust Wallet / Omni
  4. Notice the error popup from Safari

Note sometimes it works the first time, but then fails quite reliably.

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

This is quite annoying bug on the day WC v1 shuts own. Having no other options but to use the latest RainbowKit version which has this bug.

This was tested on iOS 16.5.1

@jeanregisser
Copy link
Author

From what I see, the problem may come from this line:

? new Promise<string>(resolve => provider.once('display_uri', resolve))

Where it's doing an async call to get the display_uri whereas previously with v1, the uri was directly returned.

I haven't checked the internals of this. More of a suspicion.

@DanielSinclair
Copy link
Contributor

@jeanregisser Do you have these wallets installed? This is currently the expected UX if a user does not have the wallet installed. There is also another case where Safari will block further attempts to deep link into an app if you hit Cancel on the "Open this page in x" alert until the next refresh or the page is opened in a new tab. Mobile Safari is death by a thousand cuts.

For WalletConnect v2, we are relying on native Deep Links instead of Universal Links (which would previously deliver a user to a fallback website if the wallet is not installed). Fetching a WalletConnect v2 pairing is slower, and iOS will block Universal Link redirects in our existing architecture, so we're pushing users through the native Deep Link popup for the time being. We will soon improve this UX and execute a rearchitecture to prefer Universal Links for some wallets, but wanted to ensure a stable transition to WalletConnect v2 first.

@jeanregisser
Copy link
Author

jeanregisser commented Jun 28, 2023

Hey, I do have these 3 wallets installed.

It's indeed what you said, I had unintentionally cancelled the first open and then all subsequent opens failed with the error.

Thanks 🙏

Looking forward to see universal links come back.

@DanielSinclair DanielSinclair changed the title [bug] Unable to open some WC based wallets reliably on iOS (Safari) [bug] Mobile Safari cannot open page because address is invalid Jun 28, 2023
@DanielSinclair DanielSinclair added the walletconnect Bug or issue with WalletConnect v2 label Jun 28, 2023
@mighty-phoenix
Copy link

Hey all.
Facing the same issue.
Any updates on this?
Thanks!

@magiziz
Copy link
Contributor

magiziz commented Apr 7, 2024

@mighty-phoenix Sorry for the delay here. We're working on a fix right now, please bear with us 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
walletconnect Bug or issue with WalletConnect v2
Projects
None yet
Development

No branches or pull requests

4 participants