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 · 16 comments · May be fixed by #2124
Open
1 task done

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

jeanregisser opened this issue Jun 28, 2023 · 16 comments · May be fixed by #2124
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
Collaborator

@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 🙏

@magiziz magiziz linked a pull request Jul 30, 2024 that will close this issue
@mattpilleul
Copy link

Hi! Any update on this issue? Still facing the problem in some of our apps

@magiziz
Copy link
Contributor

magiziz commented Aug 3, 2024

@mattpilleul We have a PR open which should be merged soon

@hzhu
Copy link
Contributor

hzhu commented Aug 5, 2024

Thank you @magiziz 🥰! Our users are encountering this issue frequently so we're looking forward to the fix 🤞🏽 .

@addmorebass
Copy link

Any ETA on this PR merge?

@magiziz
Copy link
Contributor

magiziz commented Aug 11, 2024

@addmorebass We're aiming to get this out either next week or the week after that.

@hzhu
Copy link
Contributor

hzhu commented Aug 21, 2024

Any ETA on this—given that two weeks has passed? This issue affects all RainbowKit apps—quite a few apps.

On Matcha, this means no MetaMask user can trade on iOS. Rolling back versions could be a solution for us, but that would undo previous work and peerDependencies upgrades. Some teammates have suggested dropping RainbowKit, but I'm not in favor of that either. I love 🌈 RainbowKit!

@addmorebass
Copy link

Bumping amongst the people to fix this bug please. I think it will make my ETH go up

@addmorebass
Copy link

Any ETA on this?

@0xboga
Copy link

0xboga commented Oct 1, 2024

Any ETA on this?
@magiziz +1

@c-s-alex
Copy link

c-s-alex commented Oct 1, 2024

I am having the same issue on multiple projects with this.

@nakedfool
Copy link

++++

having same issues too!

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

Successfully merging a pull request may close this issue.

10 participants