-
Notifications
You must be signed in to change notification settings - Fork 372
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 report - Make TokenScript work on Dapp Browsers (ImToken & TrustWallet) #7109
Comments
@abhishes007 - can you please check whether this is an issue in our iOS wallet or not? |
The issue is observed only iOS - imToken Wallet Workflow:
Issue:
Recordings: iPhone - imToken App Version : 2.14.1.4651 iPhone-imToken-xDAIConverIssue.MP4Android - imToken App Version: : 2.14.1.4651 Android-imToken-xDAIConverIssue.mp4cc: @AW-STJ |
@abhishes007 @micwallace you or others working on this? |
@bobjiang If newer tokenscript are loading (like smartcats) then it's likely some issue with these specific tokenscripts. @abhishes007 When you get a chance can you confirm smartcats is working in Imtoken on iOS? |
@micwallace I tried SmartCat actions and they seems to be stuck and same goes for CatKombat too. iPhone-TS-imTokenBrowser-SCR-Issue.MP4 |
I would say that xDAI TokenScript does not work as expected. It loads up even when there is no xDAI on wallet. And it does not work, hence this issue is flagged by both ImToken and TrustWallet. Its a very old TS that was developed by James Sangalli, we would need to change it and also investigate the behaviour to confirm that it works as expected. Hence the things to correct:
https://www.loom.com/share/6ca4d452facc4f7f9bfffd68ddb3993f?sid=8a6450bf-62a2-4bad-b447-4b7c8c243b0d |
@abhishes007 @bobjiang Maybe this is to do with iframe srcdoc not working in iOS webview. The thing is that I change iframe from base64URL to srcdoc because base64URL did not work in Imtoken Android. I will push an update to staging that uses base64URL on iOS only, but can't guarantee it will work. @bobjiang Smartcats did work in iOS previously didn't it? If it did maybe this is something that has recently changed in TS engine |
@abhishes007 Do you know if there's a way to remote debug webviews on iOS? The browser console may have some clues to what is going on. |
@micwallace, I am not sure of how we can access the console on iPhone for the browsers, also the browsers in question are inside the wallet (imToken, TrustWallet) apps which makes it more difficult. If you have any specific steps that I can try on my end then I will be happy to help and see if it works. |
@abhishes007 For imToken you can add a parameter to the URL to enable in-browser console: https://imtoken.gitbook.io/developers/products/webview Although when I tried this on Android it wasn't working |
@abhishes007 If this doesn't work, let me know. I can probably install vconsole in TS viewer directly: |
@bobjiang I tried it on TrustWallet and for me the SmartCat actions as well as the xDAI TS screens seem to be loading well unless, I am missing something - Recording is attached. iPhone-TrustWallet-TS-Working.MP4 |
@bobjiang With help from Abishes we've narrowed down the problem to the browser not being able to load any srcdoc or blob content within the iframe. It's likely that a setting on the imToken webview disallows loading of this content and we are unable to fix the issue on our end. It was a similar issue to Android but I was able to get around it by using srcdoc instead of blob content (which is a better better anyway). But in the iOS version srcdoc is also disabled. To demonstrate the issue to imToken team, I've setup a simple page to test the various ways local content can be loaded within an iframe: https://viewer-staging.tokenscript.org/assets/iframe-local-src-test.html Can you please reach out to imToken and ask them to enable srcdoc for their webview? |
let me ping the imToken guys. |
@bobjiang - any updates from ImToken? Also were you able to reach out to them and move the listing conversations forward. |
name: Bug Report
about: Using imToken, visit https://viewer.tokenscript.org/, click DAI stablecoin, and click convert to xDAI
this is a blocking issue, without fix it, we cannot list tokenscript viewer on imToken.
Describe the bug
blank page after click "convert to xDAI"
Steps to reproduce (REQUIRED)
video attached.
imToken-token-script-viewer.mp4
Expect
all pages are open correctly.
Observed
6b. ...
Screenshots
If applicable, screenshots (preferred to video) to help explain your problem, a wallet address or transaction hash if applicable/possible
Version or build number number
Version number (if app store), build number (if TestFlight)
Additional context (Error Messages, etc.)
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: