Grey page when loading app on a fresh install | JS decoding fail


I have had a lot of issues with v5 self hosted failing at some point to load with a page refresh and then simply displaying a grey page.

I first tried I had a conflict with Cloudflare, so I completely disabled it and I returned my NS to my domain registrar, just to make things easier to troubleshoot by making sure there would be no bad caching or unwanted proxying. My main www domain is also linked to QUIC.Cloud (another reverse proxy) so I made sure to pause this so that any subfolders would be routed directly from my server. It didn’t seem to change anything related to my issue.

I then switched from a subdomain install to subfolders (as my root/www domain is working fine) in trying to make things more simple and error less (one less SSL certificate, etc.). This didn’t work either - and I now get maybe one “workable” install every two or three tries (I’m doing it through Softaculous), that is an install that allows me to load the login page.

Right now I have 4 installs on different folders, (/erp, /erp2, /erp3, erp4), and only two of them load at all, and I can’t tell for how long, since so far all my installs that worked also started to exhibit the grey page problem at some point. I thought of doing a few fresh installs at the same time to help monitoring everything as much as possible and comparing one to the other… but now most fresh installs done with Softaculous will get a grey page.

For some reason in my previous experiments the grey pages, whenever they occurred, eventually “fixed themselves” after sitting idle for a few hours and then being reloaded with a cache flush, but it doesn’t seem to be the case anymore.

Yesterday, as I was working on a (temporarily) perfectly workable installation, I started getting popups asking me if Invoice Ninja v5 was installed, so after saving my changes I refreshed the page, thinking it was a cache issue, and then I got a completely white (!) page that time… After that I could not get the app to work anymore. I really have no idea of what is happening overall; my domain has been running Wordpress with virtually no server related problems for over a year (also installed through Softaculous), so I thought that configuring Invoice Ninja would be a breeze… but so far it’s been hell :grimacing:

The only way I managed to bypass the grey loading screens on my PC is by deleting the data under accounts in the database, which then force loads the app setup. Everytime I did this, I managed to properly connect the db and everything else seemed ok, but after saving the settings I always got an ERR_TOO_MANY_REDIRECTS error with with index.php stuck in a loop.

My server is running Litespeed Entreprise and PHP 7.4, if that makes a difference. I could not find relevant errors (to my eye) in either error_log files or laravel.log.

All error_log in every install folder seem to have this notice PHP Notice: Constant PASSWORD_DEFAULT already defined in /home/*****/public_html/erp3/update_pass.php on line 17 but that doesn’t seem related.

Also, I don’t know why I didn’t do that earlier, but I recently started paying attention to the browser dev tools when trying to load the Invoice Ninja, and it seems that it’s hanging at main.foss.dar.js. Here is the error text GET net::ERR_CONTENT_DECODING_FAILED 200.

My host is currently investing the issue on their side and they too get the grey page issue, with no idea about a fix so far (they’ve been at it for several hours). I just tried on my phone too and I have the same issue with the mobile web version of the app, but the v5 Android app seems to bypass the issue (since it is probably directly accessing the database).

All in all, I’m stuck. Sorry for the long post, I just wanted to make things as clear as possible. Any help would be much appreciated.


A grey page implies a problem with the admin portal (the client app running in the browser), not a server issue. You can clear the local application cache by adding ?clear_cache=true to the end of the URL, you’ll then need to reload login page and login again.

Please check for any errors in the browser console the next time it happens.

Hi @hillel, thanks for your suggestion!

I tried clearing the cache before several times, I forgot to mention it.

A grey page implies a problem with the admin portal (the client app running in the browser), not a server issue.

Maybe the issue is indeed happening in the client, as it is the during the parsing of the files that the page hangs, but could the issue be originating from the server? The tech guys over at my host could not make the problematic installations work either on their end (they also get the grey pages), and on my end I have tried several browsers in incognito mode and I ran ?clear_cache=true multiple times. So far here is the breakdown:

  • /erp : doesn’t work, even with ?clear_cache=true - and for some reason every reinstall with that subfolder name fails, even with a clean uninstall - this is what prompted me to start trying to install Invoice Ninja in other subfolders side by side
  • /erp2 : works so far, also works after ?clear_cache=true
  • /erp3 : doesn’t work, even with ?clear_cache=true
  • /erp2 : works so far, also works after ?clear_cache=true

So in summary, what didn’t load before ?clear_cache=true still doesn’t load after running it, and I’m still getting the following error when trying to access the glitched login pages GET net::ERR_CONTENT_DECODING_FAILED 200.

Any idea why main.foss.dart.js would fail to get decoded?


Sorry, it’s the first time I’ve seen ERR_CONTENT_DECODING_FAILED

I could try searching and sharing random links but I’m not sure how helpful that would be.

Haha, sure, no problem, thanks anyway! I’ll investigate further on my end and report back if I end up finding a fix.

1 Like

cc @david and @ben in case they have any ideas…

1 Like

OK so I found out that there seems to be an issue with the way the server handles the compression of the client files on some installs: I tried installing the browser extension ModHeader - Chrome Web Store (

This plugin can modify headers on the fly, so I ran gzip;q=0,deflate;q=0 and now my /erp install works fine! Not a true fix, but still, a progress. /erp3 still shows the grey page even with the modified header, and the two other installs show a grey page with the mod… I’ll keep trying more stuff, but it seems like there some random gzip problem on the backend.

1 Like

Just a quick update: I tried adding RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1] to the .htaccess file in /public for the problematic test installs and now they load every time with no blank/grey pages. I still have to find out why gzip would work in some subfolders and not in some others.

Thanks for update and sharing the solution!