capacitor: Race condition in Android web server

We try to build a capacitor app with stencil and vanilla javascript. In an android emulator it works (with Android Webview v58). But on a real device with latest Version 64 it does not work because of the following error in chrome remote debugger: Failed` to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.

This issue is already discussed here: https://stackoverflow.com/questions/48113359/es6-modules-imports-in-apache-cordova-hybrid-app-throw-mime-type-error

Any idea how to solve this?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (14 by maintainers)

Most upvoted comments

Fixed!

Looks like a multithreading-problem. Just did some debugging and two threads are calling the handler at the same time which causes really ugly side effects like the wrong mime type.