#Directus Backend does not load anymore, stuck at Loading....

26 messages · Page 1 of 1 (latest)

grim phoenix
#

I have a strange problem since yesterday. My Directus 9 backend is no longer accessible. The Directus console doesn't say anything about it but when opening the admin dashboard it only shows "Loading..." in the browser tab title. The only thing that is displayed is inside the Chrome console this error

Uncaught SyntaxError: Invalid or unexpected token (at index.5552d1ba.entry.js:1:170517)

Does anyone here know how to fix this, if this is a known phenomenon?

#

The problem seems to exist only when I access the backend via my Docker connected proxy domain. If I use the default domain of the server and attach the port, then I can open the dashboard without problems. The backend no longer works on the proxy domain and is stuck on loading, but the API itself still seems to be accessible. However, the problem occurred only since yesterday and before the server ran 2 weeks without problems. There was no change to the existing extensions and according to Directus console all extensions continue to run normally, there are no errors and they do their job (a few sheduled events to update the data).

sleek hill
#

This looks to me like either Directus is down or the proxy is doing something unintended 🤔

#

Uncaught SyntaxError: Invalid or unexpected token (at index.5552d1ba.entry.js:1:170517)
You would see this when the app is cached in the browser but the server is not returning JS for this request

grim phoenix
#

So it is online in any case. and also accessible without the proxy. What surprises me is that it has always worked so far and the api itself remains accessible.

sleek hill
#

Then it would seem to be a problem with the proxy indeed. What are you using as proxy and how is it configured?

grim phoenix
#

I host Directus inside a Docker container directly in Plesk, the proxy is automatically bound to the port via the Plesk "docker proxy rules" function.

sleek hill
#

Could you get the response for that requests that is throwing the syntax error? index.5552d1ba.entry.js that might give some insight into what exactly is going wrong here

grim phoenix
#

☹ So all I can see is this error in the Chrome console itself. all other logs are flawless and show no errors. Unfortunately the error is also not expandable and has any additional information. I do not know how to get more information about the error, the area to which the error refers in the index.5552d1ba.entry.js is also not understandable to me

sleek hill
#

can you look for this file in the network panel? there should be a request fetching index.5552d1ba.entry.js. I'm mainly curious to see if it is returning actual JS or some html proxy page

grim phoenix
#

oh it retuns a lot of js code, one second

sleek hill
#

Yeah it should be a densely packed js file 🤔

grim phoenix
#

it retuns this and the line 1 is where the error seams to be, this line is endless long

#

here ends the line red marked because chrome says this is where the error is

sleek hill
#

That looks like how it's supposed to and should not be throwing a syntax error (especially if it is working when accessed directly on IP:PORT)

grim phoenix
#

Hm microsoft Edge seems to have no problem here. Maybe it's actually some caching error or something triggered by cloudflare.

sleek hill
#

which browser were you using before? chrome right, those run on the same cores 🤔

grim phoenix
#

yeah I am also surprised, edge is chromium, I do not see the problem. I have only ever used chrome and there was no change, unless chrome has updated in the background i dont know. I have also tried in incognito browser where all extensions are disabled, even here the page strikes in chrome. i will test it on another machine with chrome, uno secundo

sleek hill
#

unless chrome has updated in the background i dont know.
That does happen but shouldnt matter.

#

I suppose it may be more along the lines of chromes enhanced CORS/CSP problems but that doesnt fit well with the error you're describing

grim phoenix
#

Yes, other computer with chrome it runs without problems, I will punish my computer now, he is to blame. thank you for your time.

sleek hill
#

just to be safe do you have the PUBLIC_URL set up correctly for the proxied domain?

sleek hill
grim phoenix
#

hm no the public domain is set to "/" and he warns me about that in the console but it works without problem, but it makes problems when i set it to a custom domain

sleek hill
#

that should be fine, if you're running into that those errors are pretty verbose like "request violated CSP" or "cors dissallowed request" usually