-
Notifications
You must be signed in to change notification settings - Fork 195
DApp doesn't load on Android 6.0 #2344
Comments
A user reported this issue, on two of his devices:
I recommended he updates his webview package but his device did not allow him to update... |
@tomlinton @franckc sounds like babel-es6-polyfill would do the trick? |
@rtman I'm not very familiar with the mobile side of things but it would seem to me you are right. @tomlinton a) does Ryan's suggestion sound good to you ? b) Do you know if this issue is reproducible under the Android simulator so that if @rtman tries to fix it by using babel-es6-polyfill he can verify the fix works ? |
I have tried that (and a host of others). Yep you can reproduce it in an Android simulator. Or you can also use a workaround to install an older version of chrome (<= 44 in Android 6.0 from memory). |
Another approach I've tried with no success was setting the targets for @babel/preset-env via a browserlist query to something very wide, e.g. |
An idea popped into my head while I was walking today. Perhaps this is caused by the web3 package, it is marked as external in our webpack config so it won't get bundled, therefore none of the transforms/polyfill will apply. I'll try this out sometime when I get some time, but if anyone else wants to have a play go for it! |
Made a bit of progress with this by removing the external web3 config. Getting close to a fix. The issue now is that babel is not transpiling code from our other packages (due to monorepo). E.g. Here is what you need for a reproduction if anyone wants to play with it:
I think from here the babel config might need to be moved around, and Relevant issues: |
Taking this off of @tomlinton's plate 🍽 FAQ article here ❓ |
As reported by @franck. The DApp gives an endless loading indicator on Android 6.0. Console reveals
Unexpected token ...
.This is due to the older version of Chromium used in that version of Android (so its not Android specific, but old version of Chromium specific) not supporting es6 and I suspect the DApp is missing the correct babel transforms/preset.
The text was updated successfully, but these errors were encountered: