我的 Meteor 应用运行良好,但在进行了一些更改和重新部署之后。
在 fiefox 中有一个无休止的重新加载 在 android 中,更新应用程序后似乎无法连接(也无休止地重新加载)。
我尝试设置 DDP_DEFAULT_CONNECTION_URL在节点配置中,但没有帮助。在我的测试系统上,该应用程序在 NGINX 服务器之外运行。
清理应用程序缓存对 Firefox 有帮助(我正在使用 AppCache 插件),清理应用程序在 Android 上的数据也有帮助。
这是否发生在其他人身上?我们如何解决这个问题?
谢谢。
=== 更新: 在 Chrome 中,可以看到以下异常:
Document was loaded from Application Cache with manifest http://xxxxxx/app.manifest
list:1 Application Cache Checking event
list:1 Application Cache NoUpdate event
list:1 Application Cache Checking event
list:1 Application Cache NoUpdate event
Uncaught Error: Two migrations in progress?
....
=== 更新 2:
在调查这个问题之后,我遇到了很多关于 meteor 上无休止的重新加载和应用程序缓存的类似问题:
- Meteor infinite redirect instead of render 404
- https://meteor.hackpad.com/Hot-Code-Push-design-notes-9o22fy6gruu
- https://github.com/meteor/meteor/issues/2261
- Meteor infinite redirect instead of render 404
- https://github.com/meteor/meteor/issues/4722
=== 更新 3:
这是当前日志:
Application Cache Checking event
Checking for manifest
Application Cache NoUpdate event
No cache updates
Navigated to http://xxxxxxx/
Document was loaded from Application Cache with manifest http://xxxxxxx/app.manifest
Application Cache Checking event
//... and so on
连接 Android 设备并使用 Chrome 进行调试
Uncaught SyntaxError: Unexpected token <
更新后。
卸载 appcache 包后,一切正常,但应用程序必须可以离线使用。
这是 Meteor AppCache 包中一个非常烦人的错误。有谁知道解决这个问题的方法吗?
====更新
我们尝试过:
- 删除所有 notFoundTemplates:
- 在 LAST 规则中添加描述于:https://github.com/iron-meteor/iron-router/issues/1202 的解决方案
- 清理您的应用程序缓存,清理缓存后重新部署将在第二次部署中运行
在第二次部署时,错误再次出现:/
=====更新结束
最佳答案
我不知道这是否有帮助,但如果您使用的是 nginx+ passenger 设置,请尝试从缓存配置中删除 meteor_runtime_config.js。 以下对我有用 例如配置:
location /meteor_runtime_config.js {
expires -1;
}
关于android - 使用 appcache 在服务器上重新部署后,Meteor 会无休止地重新加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31764488/