It seems to be a Workbox version compatibility issue. I didn’t encounter any errors while using Firefox, but it appears to be happening only for me on Google Chrome. I have deployed both an older version (3.1.0.beta2) and the latest version (3.1.0.beta5) of Discourse, and the error only occurs in version 3.1.0.beta5 when using Google Chrome.
I have also seen the same error on meta.
Registrations in: /Users/mac/Library/Application Support/Google/Chrome/Default (0)
Scope: https://meta.discourse.org/
Registration ID: 258 (unregistered)
Navigation preload enabled: false
Navigation preload header length: 4
Unregistered worker:
Installation Status: REDUNDANT
Running Status: RUNNING
Fetch handler existence: UNKNOWN
Fetch handler type: UNKNOWN
Script: https://meta.discourse.org/service-worker.js
Version ID: 279
Renderer process ID: 2118
Renderer thread ID: 2
DevTools agent route ID: 6
Log:
2 „Gefällt mir“
Lilly
(Lillian Louis)
14. Juni 2023 um 10:29
2
what version of chrome? i run chrome on windows desktop and have never had that error. make sure browser is up to date.
FWIW I’m seeing similar on my test site
Not sure what it means though.
(and I updated Chrome just now before checking again )
Just to add, I also checked it on a site I’ve not updated to 3.1.0.beta5 yet and it does not appear there.
3 „Gefällt mir“
I use Chrome on my Mac, which is already the latest version, and I have tried clearing the cache. The error still persists, but it’s possible that this error is only happening locally on my computer.
1 „Gefällt mir“
Lilly
(Lillian Louis)
14. Juni 2023 um 11:16
5
weird. i don’t see the error on my site.
Canapin
(Coin-coin le Canapin)
14. Juni 2023 um 11:18
6
I repro the issue using a Chromium-based browser as well on meta.
Uncaught TypeError: workbox.cacheableResponse.Plugin is not a constructor
3 „Gefällt mir“
An error like this seems to be able to cause potential issues with caching resources correctly.
3 „Gefällt mir“
Lilly
(Lillian Louis)
14. Juni 2023 um 11:27
8
i’ve repro’d it too finally
1 „Gefällt mir“
yep!I did some research and it seems that replacing workbox.cacheableResponse.Plugin
with workbox.cacheableResponse.CacheableResponsePlugin
might be a possible solution.
3 „Gefällt mir“
Canapin
(Coin-coin le Canapin)
14. Juni 2023 um 11:37
10
It seems you know what you are talking about (I don’t know anything about that stuff). If you feel confident, feel free to send a pull request!
david
(David Taylor)
14. Juni 2023 um 12:40
13
Thanks for the reports everyone - @ShaoJie is absolutely right about the required changes. Here’s a PR:
discourse:main
← discourse:workbox-fix
opened 12:39PM - 14 Jun 23 UTC
Followup to cc2f18121dc92fb1009602665a9d83f401007b79
6 „Gefällt mir“
david
(David Taylor)
Geschlossen,
19. Juni 2023 um 07:00
14
This topic was automatically closed after 4 days. New replies are no longer allowed.