# Missing workbox directory in public/javascript?

**URL:** https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359
**Category:** Self-hosting
**Created:** [September 18, 2023, 7:30am UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359 "2023-09-18T07:30:14Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![helmi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/helmi/32/114772_2.png) [@helmi](https://meta.discourse.org/u/helmi)
#### Post date: [September 18, 2023, 7:30am UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/1 "2023-09-18T07:30:14Z")

</div>

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.

```plaintext
"/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 🙂

Any idea?

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

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 20, 2023, 1:34pm UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/2 "2023-09-20T13:34:29Z")

</div>

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

---

<div class="post-metadata">

### Author: ![helmi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/helmi/32/114772_2.png) [@helmi](https://meta.discourse.org/u/helmi)
#### Post date: [September 21, 2023, 7:30am UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/3 "2023-09-21T07:30:51Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![helmi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/helmi/32/114772_2.png) [@helmi](https://meta.discourse.org/u/helmi)
#### Post date: [June 20, 2024, 8:47am UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/4 "2024-06-20T08:47:06Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [June 20, 2024, 2:26pm UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/5 "2024-06-20T14:26:12Z")

</div>

> [@helmi](#):
>
> Not sure if just no one looks at their nginx error logs or just don’t care about it.

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.

---

<div class="post-metadata">

### Author: ![helmi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/helmi/32/114772_2.png) [@helmi](https://meta.discourse.org/u/helmi)
#### Post date: [June 24, 2024, 7:10am UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/6 "2024-06-24T07:10:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Crius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/crius/32/317214_2.png) [@Crius](https://meta.discourse.org/u/Crius)
#### Post date: [October 8, 2024, 9:59pm UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/7 "2024-10-08T21:59:52Z")

</div>

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](https://github.com/discourse/discourse/commits/2099c33fa72036e765453e2020d66ffffc49c156) ) and this is what nginx error logs output every once in a while.

```plaintext
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.

---

<div class="post-metadata">

### Author: ![Drest](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@Drest](https://meta.discourse.org/u/Drest)
#### Post date: [October 8, 2024, 10:04pm UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/8 "2024-10-08T22:04:21Z")

</div>

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 😅 what he said

---

<div class="post-metadata">

### Author: ![MichaIng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaing/32/251089_2.png) [@MichaIng](https://meta.discourse.org/u/MichaIng)
#### Post date: [May 20, 2025, 12:51am UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/9 "2025-05-20T00:51:41Z")

</div>

We get a similar wave of errors every few hours:

```plaintext
2025/05/19 16:48:10 [error] 63#63: *1738520 open() "/var/www/discourse/public/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-core.prod.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-core.prod.js HTTP/1.1", host: "XXXX"
2025/05/19 16:48:10 [error] 63#63: *1738520 open() "/var/www/discourse/public/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-routing.prod.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-routing.prod.js HTTP/1.1", host: "XXXX"
2025/05/19 16:48:10 [error] 63#63: *1738520 open() "/var/www/discourse/public/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-expiration.prod.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-expiration.prod.js HTTP/1.1", host: "XXXX"
2025/05/19 16:48:10 [error] 63#63: *1738520 open() "/var/www/discourse/public/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-sw.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-sw.js HTTP/1.1", host: "XXXX"
2025/05/19 16:48:10 [error] 63#63: *1738520 open() "/var/www/discourse/public/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-cacheable-response.prod.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-cacheable-response.prod.js HTTP/1.1", host: "XXXX"
2025/05/19 16:48:10 [error] 63#63: *1738520 open() "/var/www/discourse/public/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-strategies.prod.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/assets/workbox-77b0e3e0dd4773bcd6c7e74f302f7c69/workbox-strategies.prod.js HTTP/1.1", host: "XXXX"

```

In this case it’s with `public/assets`, but we also have log entries for `public/javascript`:

```plaintext
2025/05/12 18:00:39 [error] 78023#78023: *701261 open() "/var/www/discourse/public/javascripts/workbox/workbox-sw.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/javascripts/workbox/workbox-sw.js HTTP/1.1", host: "XXXX"
2025/05/12 18:00:39 [error] 78023#78023: *701261 open() "/var/www/discourse/public/javascripts/workbox/workbox-routing.prod.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/javascripts/workbox/workbox-routing.prod.js HTTP/1.1", host: "XXXX"
2025/05/12 18:00:39 [error] 78023#78023: *701261 open() "/var/www/discourse/public/javascripts/workbox/workbox-cacheable-response.prod.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/javascripts/workbox/workbox-cacheable-response.prod.js HTTP/1.1", host: "XXXX"
2025/05/12 18:00:39 [error] 78023#78023: *701261 open() "/var/www/discourse/public/javascripts/workbox/workbox-strategies.prod.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/javascripts/workbox/workbox-strategies.prod.js HTTP/1.1", host: "XXXX"
2025/05/12 18:00:39 [error] 78023#78023: *701261 open() "/var/www/discourse/public/javascripts/workbox/workbox-core.prod.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/javascripts/workbox/workbox-core.prod.js HTTP/1.1", host: "XXXX"
2025/05/12 18:00:39 [error] 78023#78023: *701261 open() "/var/www/discourse/public/javascripts/workbox/workbox-expiration.prod.js" failed (2: No such file or directory), client: unix:, server: _, request: "GET /forum/javascripts/workbox/workbox-expiration.prod.js HTTP/1.

```

Did the path change with some version? Probably it is when the browser cache is not cleared properly, respectively the asset not invalidated. Or, probably more likely, it is some dumb bots that keep scanning for resources they once found. I mean we have thousands of visitors and dozens of posters between two such log sets, so it doesn’t seem to be a general issue.

In our case access is done via proxy outside of the container and UNIX socket, hence no client IPs visible to check. For [`77.208.167.253`](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/7) I couldn’t find any relevant info, whether it is a bot or not.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 20, 2025, 11:38am UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/10 "2025-05-20T11:38:04Z")

</div>

> [@Falco](#):
>
> Given that workbox was dropped as a dependency 2 months ago

> [@MichaIng](#):
>
> We get a similar wave of errors every few hours:
> 
> ```plaintext
> 
> ```

What version are you running?

---

<div class="post-metadata">

### Author: ![MichaIng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaing/32/251089_2.png) [@MichaIng](https://meta.discourse.org/u/MichaIng)
#### Post date: [May 20, 2025, 11:51am UTC](https://meta.discourse.org/t/missing-workbox-directory-in-public-javascript/279359/11 "2025-05-20T11:51:04Z")

</div>

`3.5.0.beta5-dev`, which does not serve these files anymore, nor is an up-to-date frontend asking for them. As said, either outdated cache/frontend (which should normally not happen with the dynamic HTML documents) or bots, client problem in any case.
