TeamPiped / Piped

An alternative privacy-friendly YouTube frontend which is efficient by design.

Home Page:https://piped.video

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Occasional "Failed to fetch dynamically imported module"

AlyoshaVasilieva opened this issue · comments

Official Instance

Describe the bug

When using an instance after a frontend update, a manual reload is necessary because it tries to load nonexistent scripts.

To Reproduce

  1. Open an instance that has updated its frontend
  2. Wait for update in devtools
  3. Click video
  4. Receive error in console; page no longer responds to clicks.

Expected behavior

Instance works.

Logs/Errors

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
/trending:1 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://piped.video/assets/registerServiceWorker-CK03DT8m.js
Promise.catch (async)
u @ index-9tlUM47H.js:3
(anonymous) @ index-9tlUM47H.js:24
WatchOnButton-I7Vh6Rtv.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
/assets/WatchVideo-3i-pgG8J.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
index-9tlUM47H.js:8 TypeError: Failed to fetch dynamically imported module: https://piped.video/assets/WatchVideo-3i-pgG8J.js
se @ index-9tlUM47H.js:8
(anonymous) @ index-9tlUM47H.js:8
Promise.catch (async)
U @ index-9tlUM47H.js:8
y @ index-9tlUM47H.js:8
a @ index-9tlUM47H.js:8
zt @ index-9tlUM47H.js:4
rt @ index-9tlUM47H.js:4
n @ index-9tlUM47H.js:4
ContentItem-CbeEub-J.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
PreferencesPage-B-5gYtJN.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
index-9tlUM47H.js:8 TypeError: Failed to fetch dynamically imported module: https://piped.video/assets/PreferencesPage-B-5gYtJN.js

The update process appears to have preloaded https://piped.video/assets/WatchVideo-C--311iG.js (which curl confirms exists right now and is JS) but when I clicked on a video it tried to load https://piped.video/assets/WatchVideo-3i-pgG8J.js. It got a 200 OK for that, but it's an HTML page, not JS.

Browser, and OS with Version.

Chrome on Windows 10

Additional context

No response