Skip to content

Android application not loading on older devices #2581

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

Closed
mikeller opened this issue Aug 26, 2021 · 6 comments · Fixed by #2582
Closed

Android application not loading on older devices #2581

mikeller opened this issue Aug 26, 2021 · 6 comments · Fixed by #2582
Milestone

Comments

@mikeller
Copy link
Member

Reproduction:

  • start the android app.

Expected behaviour:

  • the loading screen (wasp in front of honeycomb) shows;
  • it switches to the landing screen.

Actual behaviour:

  • the landing screen stays on.

System information:

  • hardware: Nexus 7 tablet;
  • os: android 5.1.1;
  • application version: betaflight-configurator_10.8.0-debug-5cc28aae

Error:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.

image

@mikeller mikeller added this to the 10.8.0 milestone Aug 26, 2021
@TehllamaFPV
Copy link

Replicated on Samsung Galaxy J7 Crown, Android v9

@haslinghuis haslinghuis marked this as a duplicate of #2274 Aug 27, 2021
@haslinghuis haslinghuis reopened this Aug 27, 2021
@haslinghuis haslinghuis marked this as not a duplicate of #2274 Aug 27, 2021
@asizon
Copy link
Member

asizon commented Aug 27, 2021

@mikeller take a look here #2136

@mikeller
Copy link
Member Author

@asizon: #2136 was merged, and it is still broken, so there seems to be another problem.

@WalcoFPV
Copy link
Contributor

Reproduced on Samsung S7 edge running Android 9 and Chrome webview 74.0.3729.136
@asizon I think, it's not a Webview related issue. After updating Chrome (version 92.0.4515.159), I have still the issue.

@mikeller
Copy link
Member Author

@WalcoFPV: I suspect so too - it looks like the version of webview available on older versions of android is more restrictive as to not inferring text/javascript as the type for files loaded with type="module" that have no type.
So this seems to have been broken when we started moving parts of configurator to modules in 10.80.
According to apache/cordova-android#1142 (comment) there does not seem to be a straightforward fix for this, and the only workaround seems to be the use of extra tooling. I have tried to fix this in #2582 by adding the ionic webview - it seems to fix the issue on my Nexus 7, but not sure if this is a good fix.

@haslinghuis
Copy link
Member

As long there are no better alternatives it's ok. Also see ionic-team/cordova-plugin-ionic-webview#629

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants