Missing workbox directory in public/javascript?

Hey there,

while hunting down some weird outages that we see on our forums, I was also checking the nginx logs within the app container. I haven’t checked them for a while now so I can’t say if those are there for longer but I see errors regarding missing Javascript files in a directory that doesn’t at all exist on my installation.

"/var/www/discourse/public/javascripts/workbox/workbox-core.prod.js" 
"/var/www/discourse/public/javascripts/workbox/workbox-cacheable-response.prod.js" 
"/var/www/discourse/public/javascripts/workbox/workbox-routing.prod.js" 
"/var/www/discourse/public/javascripts/workbox/workbox-strategies.prod.js" 
"/var/www/discourse/public/javascripts/workbox/workbox-sw.js"

These are just some examples. I couldn’t find the on the github either and was wondering what causes these issues. I’d feel more comfortable with error logs not being spammed :slight_smile:

Any idea?

EDIT: I’m running 3.2.0.beta1 btw and I can also see those missing files in the browsers console…

Workbox appears to have to do with caching, I think.

How recently did you upgrade? There could be some bug around it, but I think we might need more information

1 Like

I’ve only updated the day before I posted.

To my reasearch workbox seems to have to do with PWA and be looked for with Chrome/Chromium browsers.

What more information do you need?

We’re still seeing this 9 months later and still I can’t find much about it. Not sure if just no one looks at their nginx error logs or just don’t care about it.

Anyone with an idea what’s going on and if this might cause issues or not?

I’m hunting down some 520/429 issues that don’t seem to directly relate to that but still bugs me to see these errors again and again. Might this be some cloudflare issues still trying to load old files from previous builds? Or browser caches?

Given that workbox was dropped as a dependency 2 months ago and this is not a problem that affects sites up to date, I recommend updating your site.

1 Like

I’m on 3.3.0beta2 - I don’t think there’s anything I can update to.

1 Like

You are not alone @helmi
I had issues moving from 3.2.5 to 3.3.0 (tons of 502, 429, etc) and had to downgrade back to 3.2.5.

Recently tried re-upgrading to 3.3.1 hoping things would be better. They were… in a way. Just a plethora of 502 for all users.

Decided to go all in and trust the test-passed and am now on 3.4.0.beta3-dev ( 2099c33fa7 ) and this is what nginx error logs output every once in a while.

2024/10/08 21:44:15 [error] 79#79: *16810 open() "/var/www/discourse/public/assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-routing.prod.js" failed (2: No such file or directory), client: 70.79.108.71, server: _, request: "GET /assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-routing.prod.js HTTP/2.0", host: "netgamers.it", referrer: "https://netgamers.it/service-worker.js"
2024/10/08 21:45:22 [error] 75#75: *17175 open() "/var/www/discourse/public/assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-core.prod.js" failed (2: No such file or directory), client: 216.128.26.206, server: _, request: "GET /assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-core.prod.js HTTP/2.0", host: "netgamers.it", referrer: "https://netgamers.it/service-worker.js"
2024/10/08 21:47:50 [error] 74#74: *17968 open() "/var/www/discourse/public/assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-core.prod.js" failed (2: No such file or directory), client: 77.208.167.253, server: _, request: "GET /assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-core.prod.js HTTP/2.0", host: "netgamers.it", referrer: ""
2024/10/08 21:47:51 [error] 74#74: *17981 open() "/var/www/discourse/public/assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-cacheable-response.prod.js" failed (2: No such file or directory), client: 77.208.167.253, server: _, request: "GET /assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-cacheable-response.prod.js HTTP/2.0", host: "netgamers.it", referrer: ""
2024/10/08 21:47:51 [error] 74#74: *17982 open() "/var/www/discourse/public/assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-sw.js" failed (2: No such file or directory), client: 77.208.167.253, server: _, request: "GET /assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-sw.js HTTP/2.0", host: "netgamers.it", referrer: ""
2024/10/08 21:47:51 [error] 74#74: *17983 open() "/var/www/discourse/public/assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-expiration.prod.js" failed (2: No such file or directory), client: 77.208.167.253, server: _, request: "GET /assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-expiration.prod.js HTTP/2.0", host: "netgamers.it", referrer: ""
2024/10/08 21:47:51 [error] 77#77: *17984 open() "/var/www/discourse/public/assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-routing.prod.js" failed (2: No such file or directory), client: 77.208.167.253, server: _, request: "GET /assets/workbox-9b5674ca0ecb89bae1fa6f4b09a18f12/workbox-routing.prod.js HTTP/2.0", host: "netgamers.it", referrer: ""

Still don’t know what is causing the 502 as the VM is an 8 Core, 32GB Ram with an Nvme 500GB.
We went with a big VM as our community have around 450 active users, 585k topics and 21.5 million posts.

It seems like our installation also has this issue - since updating from 3.2.x to 3.3.x we’ve been having waves of 502 when posting, latest posts not updating and similar issues.

It seems like every x time (hours? unsure) there’s a background script that errors out(?) and creates these issues.

edit: i didn’t see that our tech guy had already posted :sweat_smile: what he said