ChunkLoadError error on landing page

I have this really weird issue accessing my openhab from my other raspberry pi and sometimes my Windows PCs as well:

  • the landing page doesn’t open and the developer tools are showing that the loading is stuck loading one of the chunked js openhab files. I believe one of the js files just times out.
  • happens if I access openhab:8080 directly or same through nginx
  • BUT if I switch tabs and come back, voila, it all loads, developer tools are happy, no error anywhere

Have seen same issue with Chromium (on RPI4) and Edge on Win11. On the RPI4 Chromium it is a constant issue, and more rare on Edge.

I have nginx in front of openhab to open port 80 but I cannot see any error messages anywhere so not sure what is happening. Any suggestions?

I have 3.2.0M4 installed but this has happened since 3.0.

So here are the exact messages I get in the chromium console

app.js:1 Uncaught (in promise) ChunkLoadError: Loading chunk 77 failed.
(timeout: http://openhab.local/js/77.app.js)
    at Function.r.e (app.js:1)
    at o (app.js:33)
    at app.js:33

and also this one

/rest/events/states:1 GET http://openhab.local/rest/events/states net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)

I cannot figure out if this is a networking issue, chromium or something I can optimize in the built-in OH webserver. Also I don’t see any error on the OH side.

I can reproduce the behavior on a Raspberry Pi 3b with Chromium 92 connecting to openHAB 3.2.0. Using Firefox instead solves this issue but introduces Problems with value updating, because SSE (Server-sent Events) stop when the network connection is not super-stable.