How to Fix Ghost Admin White Screen Loading Stuck

How to Fix Ghost Admin White Screen Loading Stuck

So, today I can't access the admin page of my blog (using Ghost) / dashboard. Like stuck on a white loading screen.

On my Firefox browser console, I got the error :

Uncaught ReferenceError: define is not defined

My Environment :

Technical Details
Ubuntu 20
Ghost version : 5
Ghost inside Docker
NGINX 1.22 as proxy

How to solve this error :

Fix the ownership of /var/cache/nginx with what user your NGINX running as.
For my case, i run nginx  as user www-data (as stated on /etc/nginx/nginx.conf) :

ls -lah /var/cache/

output :

root@sg:~# ls -lah /var/cache/
total 32K
drwxr-xr-x  8 root     root     4.0K Jun 19 14:56 .
drwxr-xr-x 11 root     root     4.0K Apr 30  2018 ..
drwxr-xr-x  2 root     root     4.0K Sep 27  2018 apparmor
drwxr-xr-x  3 root     root     4.0K Jun 25 19:14 apt
drwxr-xr-x  2 root     root     4.0K Jun 24 14:47 debconf
drwx------  2 root     root     4.0K Jun 24 14:46 ldconfig
-rw-r--r--  1 root     root        0 Apr 30  2018 motd-news
drwxr-xr-x  7 root root 4.0K Jun 19 17:11 nginx
drwxr-x---  2 root     root     4.0K Jun 19 11:08 tailscale

Change the ownership to www-data

chown -R www-data:www-data /var/cache/nginx

That's it! hope it helps.

Source :

ReferenceError: define is not defined on admin page
@koldLight doing a google search for “nginx net::ERR_INCOMPLETE_CHUNKED_ENCODING” it sounds like it could be a permissions problem on your server. When nginx proxies a file over a particular size it can write it to disk as a temporary file, if the permissions on it’s directory are incorrect then it…