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 לייקים
Lilly
(Lillian Louis)
14 ביוני, 2023, 10:29am
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 לייקים
ShaoJie
14 ביוני, 2023, 11:13am
4
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
Lilly
(Lillian Louis)
14 ביוני, 2023, 11:16am
5
weird. i don’t see the error on my site.
Canapin
(Coin-coin le Canapin)
14 ביוני, 2023, 11:18am
6
I repro the issue using a Chromium-based browser as well on meta.
Uncaught TypeError: workbox.cacheableResponse.Plugin is not a constructor
3 לייקים
ShaoJie
14 ביוני, 2023, 11:18am
7
An error like this seems to be able to cause potential issues with caching resources correctly.
3 לייקים
Lilly
(Lillian Louis)
14 ביוני, 2023, 11:27am
8
i’ve repro’d it too finally
לייק 1
ShaoJie
14 ביוני, 2023, 11:29am
9
yep!I did some research and it seems that replacing workbox.cacheableResponse.Plugin
with workbox.cacheableResponse.CacheableResponsePlugin
might be a possible solution.
3 לייקים
Canapin
(Coin-coin le Canapin)
14 ביוני, 2023, 11:37am
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 ביוני, 2023, 12:40pm
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 לייקים
david
(David Taylor)
נסגר ב־
19 ביוני, 2023, 7:00am
14
This topic was automatically closed after 4 days. New replies are no longer allowed.