pro版最新4.8版加载问题
bug: 服务端运行新版cloudreve文件后,客户浏览器端有大概率更新页面失败,并且始终一直在加载中。
更新页面失败是指?
更新页面失败是指?
就是访问部署cloudreve的根域名的加载初始化页面,新版会一直“转圈”加载
应该是部分JS加载失败,你可以自己无痕模式开控制台排查下。
应该是部分JS加载失败,你可以自己无痕模式开控制台排查下。
看了下,是浏览器缓存问题,需要手动清理,不清理就会出现这个加载问题。
看了下,是浏览器缓存问题,需要手动清理,不清理就会出现这个加载问题。
有什么办法解决吗
Bug: service-worker 在某些情况下无法进行更新。看起来是 index.html 没有及时更新?先Mark一下吧。
Failed to load module script: Expected a JavaScript-or-Wasm 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.
已导航到 https://example.com/home?path=cloudreve%3A%2F%2FlecY%40share
index-CPv69lBs.js:1 Failed to load module script: Expected a JavaScript-or-Wasm 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.
已导航到https://example.com/home?path=cloudreve%3A%2F%2FlecY%40share
/assets/index-CPv69lBs.js:1 Failed to load module script: Expected a JavaScript-or-Wasm 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.
能否提供一个测试站点? 我怎么都没法复现
能否提供一个测试站点? 我怎么都没法复现
可能得先访问4.7,然后再访问4.8?前段时间改前端本地测试时候有小概率复现。
我又用几款浏览器测试了一下,edge浏览器会小概率出现这种问题,谷歌浏览器和火狐浏览器等等其他浏览器没什么问题。可能就是低版本缓存导致更新页面失败。
我又用几款浏览器测试了一下,edge浏览器会小概率出现这种问题,谷歌浏览器和火狐浏览器等等其他浏览器没什么问题。可能就是低版本缓存导致更新页面失败。
同 edge,大概是测试4.6-4.8的前端复现过。报错参考 https://github.com/cloudreve/cloudreve/issues/2913#issuecomment-3332037238 。
经过我详细排查,是edge浏览器引用了我的站点以前的失效统计js,我已经保存过新版的统计js,但是实际旧版还在引用(也可能是浏览器缓存问题)。 控制台错误如下: Failed to load thumb Qn: 未知错误 at new Qn (index-Bs5XqfXn.js:240:169900) at index-Bs5XqfXn.js:240:171427 at async index-Bs5XqfXn.js:240:173323 at async index-Bs5XqfXn.js:207:97688 at async index-Bs5XqfXn.js:240:64891
该问题的确存在,在Edge,Safari等浏览器中都出现了该问题。
在开发者视图中Console以及Network没有任何Error
稳定复现站点: https://drive.voxtal.com/
看到app-loader逻辑是当 ID 为
root的<div>元素内成功渲染出第一个子元素时条件满足关闭,但是问题是条件已经满足,app-loader没有关闭
em,你要不开新帖,这个贴好像不会回复了
issue 不可以重复的
该问题的确存在,在Edge,Safari等浏览器中都出现了该问题。
在开发者视图中Console以及Network没有任何Error
稳定复现站点: https://drive.voxtal.com/
测了一下,你这个似乎是 CDN/其他反代程序 优化时候的问题。把你的 index.html 换为官网版本后可以正常加载。
是的,经过多轮测试和细致排查,确认Cloudflare Rocket Loader™导致了此问题
后端版本更新后,本地 workbox 缓存的 assets/index-XXX.js 过期/被清掉了,但是 index.html 没有失效,导致访问一个后端已经不存在的过时版本 js。由于后端对于这类不存在的 url 均返回 index.html 的内容导致错误 Failed to load module script: Expected a JavaScript-or-Wasm 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.。
把静态资源路径在 service-worker 的注册路径 & cloudreve 后端默认返回 排除掉?但是现有已经报错的设备感觉不好处理,~~貌似这个报错之后 js 直接炸了更新不了 sw~~。
Edit: sw 的实现在 assets/index-XXX.js。
我在 Cloudreve Pro v4.9.2 版本中仍然遇到相同问题。 部署环境:Linux + Nginx 反向代理(HTTP/2 + HTTPS),非 Docker 部署。
现象: 登录页或首页偶发卡在加载界面,一直转圈; 后端接口 /api/v4/site/config/basic 返回 200,但前端无法渲染。 刷新两三次或清理浏览器缓存后可恢复正常。
排查结果: 疑似由 Service Worker / Workbox 缓存逻辑 导致。 旧版 index.html 被缓存,引用的 JS(如 index-XXXX.js)已被服务器替换或删除,浏览器继续请求旧文件,后端返回 index.html,从而出现错误:
Failed to load module script: Expected a JavaScript-or-Wasm module script but the server responded with a MIME type of "text/html"
补充说明:
Edge 与 Safari 、Chrome均可复现;
清理缓存或注销 Service Worker 后可恢复。
该问题与本帖先前描述的情况完全一致,但在 v4.9.2 中仍可复现。