[chromium] [INFO:CONSOLE(0)] "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

2022-08-17T17:11:19.803+00:00

Steps to reproduce the problem:

  1. Using Xamarin Webview to load URL.
  2. Facing problems on Android APK < 30 with lower chrome version.
  3. Unable to load Webview.

Problem Description:
Trying to launch a Xamarin.Android WebView using url "file://android_asset/www/index.html".

Recently upgraded UI to Angular v13, hence index.html <script> contains type="module".

Getting the following error :

"[chromium] [INFO:CONSOLE(0)] "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.", source: file:///android_asset/www/polyfills.js" & other 3 modules.

This is a production app and needs to be fixed.

Please sugegst something.

Thanks.

Additional Comments:

Chrome version: 69.0.3497.100 Channel: Stable

OS:Android

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,287 questions
{count} votes