invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
418 stars 268 forks source link

[SELF-HOSTED] DOCKER - React Web UI Blank screen after White label Purshase and Containers Update . #580

Closed Toos00 closed 5 months ago

Toos00 commented 5 months ago

Running a self hosted docker version on ubuntu server 22.04. Recently purshased a white label licence, and realize that my containers was out of date. Run the update. Cannot acces to the default react web ui. Got a blank white screen. Tried on multiple browsers. Set the parameters "set_react_as_default_ap" in db back to 0 to give back acces to my customer. App and non default ui (flutter ?) works.

heres the console browser error :

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. react-qr-code-6f4cf557.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. use-memo-one-6e47bcff.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. @hello-pangea-f87c6a4b.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. rc-util-81e13e6b.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. @ant-design-b65cf700.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. rc-resize-observer-37caf5b0.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. rc-motion-e640dc00.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. @rc-component-0d4dcccf.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. rc-picker-80f00ef2.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. rc-pagination-e2d4da47.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. rc-field-form-cc9015e6.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. antd-4fc22bde.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. @tinymce-974de275.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. react-dropzone-bcfc14ce.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. react-string-replace-5896bba3.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. dompurify-be9362af.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. color-5cbbe474.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. lodash.curry-b0de7193.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. react-base16-styling-3519bac4.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. react-json-tree-05bd4511.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. react-turnstile-25ee3253.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. mitt-f7ef348c.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. @monaco-editor-f193edd5.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. monaco-editor-2fc5bf8a.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. @sentry-bfeb32cd.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. @sentry-internal-0a0f6292.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

Tried to downgrade back containers didnt fix anything.

Planning to export db and env to a brand new intance. letting you know.

turbo124 commented 5 months ago

in your nginx configuration try switching the priority of the index to index.html

Toos00 commented 5 months ago

Please, Can you be more specific ? in conf.d default.conf we got :

location / { root /usr/share/nginx/html; index index.html index.htm; }

So it seems to be already configured as you said.

But, in in-vhost.conf we got :

 root /var/www/app/public/;
index index.php;

This one cant be edited no matter what.. Might be this one ?

I never really dig into nginx container itslef but it seems to be build differently than installing nginx on a os. In the nginx.conf there's nothing really related to what you said. Btw, there's no site-enables available to tweak more precisely, folder or it might be on a different place than usual.

Doing my best in english. French guy here. thanks for your understanding.

turbo124 commented 5 months ago

just to confirm, which version did you upgrade from?

can you post a screenshot of the browser console in this state?

Toos00 commented 5 months ago

Hello,

i dont really know exactly from which version it was when i updated but my tag was :5 so probably from the last or the prevoius last update that was pushed into this tag.

for the screenshot it was all the erros that you are seeing in the first post.

Flash infos news: When i tried to replicate by switching back "react as default ap" to give you the screenshoot. All came back to normal, no more blank screen or errors... Its seems to be all good.

What a strange behavior... Didnt change anything expect the img tag that i changed for previous troobleshooting that is currently at :latest. Should i keep it or should i going back to the "normal" :5 ?

Was planning a migration from my office rack to a DC to start again with a brand new instance to update and see if the issue was still here... Guess it will give me a bit more time to do it if its working now...

Do you want to both still working on this and try to understand what happenned or we let it go untill it came back to someonelse or me ?

turbo124 commented 5 months ago

we can close this, please reopen if you see the issue again.

Toos00 commented 5 months ago

Here we go again ! Same issue with the last update... 5.9.9 from 5.9.1 Tried all that i already did last time nothing worked. Should i remove the latest tag ? And going back to the :5 ? To avoid unpleasant bug or change that are pulled up in the master branch of the latest ?

Same Error but just one this time: "Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. /bundle.js:1 "

Any ideas ? Thanks

Toos00 commented 5 months ago

Got it !! Its something related to cache ! i disabled the cache on web console running some testing and it works ! Let's found out why now ;) Cleared all web and app cache seems to fix it.