Failed to load module script

Moin, ich hab irgendwie ein Problem mit meiner Cloud. Das Activity Fenster sowie das mit den Logfiles ist nur ein schwarzer Bildschirm. Laut Debugging Console am Browser ist der Fehler folgender

Hi, I somehow have a problem with my cloud. The activity window and the one with the log files is just a black screen. According to the debugging console on the browser, the error is as follows

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

was der Fehler ist, ist klar. Es wird text/javascript js mjs erwartet, es kommt aber application/octet-stream.

Nun, ich habe eine originale Nextcloud Nginx config. in der Datei /etc/ngnix/mime.types ist alles korrekt. in der nginx conf sieht der Entsprechende Part so aus.

It is clear what the error is. Text/javascript js mjs is expected, but application/octet-stream is returned.

Well, I have an original Nextcloud Nginx config. in the file /etc/ngnix/mime.types everything is correct. in the nginx conf the corresponding part looks like this.

types {
text/javascript js mjs;

Weiss aktuell nicht wo ich noch schauen soll.

Hi, I had the same problem a few days ago when I configured nextcloud and was cleaning up today to apply a new domain and nginx reverse proxy.
Fortunately, I managed to fix it a little while ago and got the activity page and log page outputting normally :blush:


text / javascript js mjs; → application/javascript js mjs;

Please fix it to
Don’t forget to empty the cache and reload in browser developer mode :ok_hand:

1 Like

Thanks, this brought me on the right track fixing a similar problem.

In my case the .mjs extension was not defined in nginx’s mime.types file at all:

root@21bfa541f67a:/etc/nginx# grep js mime.types
    application/javascript                           js;
    application/json                                 json;

I therefore included this in my server config file:

types {
    text/javascript mjs;

It also worked with application/javascript.

I realized that it’s worth checking the Nextcloud documentation for updates from time to time. The current iteration of their example nginx server config file does indeed contain this declaration, which I did not have in my own configuration until now.

FWIW, at the time of writing it says text/javascript js mjs, which causes a warning from nginx (because js is already defined in mime.types), but there is a pull request on Github to fix this.

1 Like