编辑:它适用于iOS,因此问题仅限于Android。
我刚刚发现,在我的Meteor制作应用程序中,Hot Code Push被破坏了。我不知道它何时开始发生,但这是事实(没有特别的顺序):
window.location.reload()
,Android应用也不会更新。 在旧提交中使用 git checkout 并通过 meteor运行android-device --mobile-server https://myapp.com 在本地构建应用时可以看到以下控制台输出:
Download failure
com.meteor.webapp.WebAppException: Error downloading asset manifest
at com.meteor.webapp.AssetBundleManager$1.onFailure(AssetBundleManager.java:97)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:140)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.net.ProtocolException: Expected ':status' header not present
at okhttp3.internal.http.Http2xStream.readHttp2HeadersList(Http2xStream.java:266)
at okhttp3.internal.http.Http2xStream.readResponseHeaders(Http2xStream.java:149)
at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:723)
at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:81)
at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:708)
at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:563)
at okhttp3.RealCall.getResponse(RealCall.java:241)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)
at okhttp3.RealCall.access$100(RealCall.java:30)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:127)
... 4 more
Download failure
com.meteor.webapp.WebAppException: Error downloading asset manifest
at com.meteor.webapp.AssetBundleManager$1.onFailure(AssetBundleManager.java:97)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:140)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.net.ProtocolException: Expected ':status' header not present
at okhttp3.internal.http.Http2xStream.readHttp2HeadersList(Http2xStream.java:266)
at okhttp3.internal.http.Http2xStream.readResponseHeaders(Http2xStream.java:149)
at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:723)
at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:81)
at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:708)
at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:563)
at okhttp3.RealCall.getResponse(RealCall.java:241)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)
at okhttp3.RealCall.access$100(RealCall.java:30)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:127)
... 4 more
"Error: Error downloading asset manifest", source: http://localhost:12128/packages/webapp.js?hash=e448c6ebb2384292f7c97e676471a51951a04169 (71)
这表明资产清单中缺少某种:status 标头。我该如何解决这个问题?
答案 0 :(得分:0)
我在相同的控制台错误日志中遇到了同样的问题。使用Meteor 1.6.1和mup 1.4.3。最后,我通过使用:
升级cordova-plugin-meteor-webapp
来修复它
meteor add cordova:cordova-plugin-meteor-webapp@1.6.0
然后重新部署。然后热门代码推送在Android上运行!
编辑:为了提供更多背景信息 - 我认为问题是由某些版本的nginx上的okhttp和HTTP / 2问题引起的。见this question。更新的cordova-plugin-meteor-webapp
插件使用较新版本的okhttp。