Error connecting wallet on Telegram Web App.
DmyKov opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
RainbowKit Version
2.0
wagmi Version
2.5
Current Behavior
Telegram Mobile App - Android
Telegram Mobile App - iOS
Metamask Mobile App
Telegram Bot
When i try to connect Metamask via Telegram bot on Android Telegram App i get error page ( see screenshot) net::ERR_UNKNOWN_URL_SCHEME
Video - https://github.com/rainbow-me/rainbowkit/assets/117279331/86eb76cf-b153-4aee-8030-b08b2129e604
On iOS after click on Metamask icon on RainbowKit modal just do not happening nothing. I done get error page but Wallet do not open. Just nothing hapens.
I found closed issue with the same problem
#1531
And here nichitagutu/web3modal@a05574f some idea how to fix it. It seems that the problem is in the URL that WalletConnect useing to iniciate interaction with Metamask (or other wallet)
Also i tried to open your home page just clicking on the URL in any Telegram chat. URL opens with the browser implemented in Telegram and it work good. The problem is only in TWA Apps (Telegram Web Apps)
Expected Behavior
Success wallet connection
Steps To Reproduce
- Open Telegram bot with Telegram mobile App
https://t.me/dk_test_bot_bot - Click on "Start" button to activate the bot
- Click on "Test" button (bottom left) to run Telegram web app
- Try to connect Metamask on RainbowKit home page
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
Anything else?
Hello
any update? Did you reproduce the error?
i use telegram bot can not open (metamask, trust wallet, coinbase wallet) always failure in telegram bot for android and ios. Can you help me?
@DmyKov This seems to be an error with how deep linking works in telegram web app. Usually you would want to do this within a browser on your phone like safari, chrome or firefox and then get redirected to the app right after, but this is not the case with telegram web app.
Telegram uses embedded iframe which tries to redirect you to the app itself, but crashes and this is something that's out of our control. We've got a pretty similar issue here as well: #1531
What i would suggest doing is creating a web app where you can redirect users to and try to do your internal logic there instead of using telegram web app. Please feel free to raise another issue if you're facing with any other bugs 🙏