流星错误:“ com.meteor.webapp.WebAppException:解析资产清单错误”。 [英] Meteor error: "com.meteor.webapp.WebAppException: Error parsing asset manifest"
问题描述
在以下设备上运行我的应用程序时出现错误:
I have an error when i run my app in my android device with:
meteor run android-device --settings settings.json --mobile-server=myip:port
我已经在VPS中部署了我的应用MUP(流星)。我的设备中的应用程序看起来运行良好,并且可以与我的VPS通信,但是我遇到了以下错误:
I have deployed my app in my VPS with MUP (Meteor up). The app in my device seems work good and is able to communicate with my VPS but i have this error:
I20160516-20:17: 03.059(2)? W / MeteorWebApp(3915):下载失败
I20160516-20:17:03.059(2)? W / MeteorWebApp(3915):
com.meteor.webapp.WebAppException:解析资产清单
时出错I20160516-20:17:03.060(2)? W / MeteorWebApp(3915):at
com.meteor.webapp.AssetManifest。(AssetManifest.java:80)
I20160516-20:17:03.060(2)? W / MeteorWebApp(3915):在
com.meteor.webapp.AssetBundleManager $ 1.onResponse(AssetBundleManager.java:112)
I20160516-20:17:03.060(2)? W / MeteorWebApp(3915):在
okhttp3.RealCall $ AsyncCall.execute(RealCall.java:133)
I20160516-20:17:03.061(2)? W / MeteorWebApp(3915):at
okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
I20160516-20:17:03.061(2)? W / MeteorWebApp(3915):在
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)在
I20160516-20:17:03.061(2)吗? W / MeteorWebApp(3915):在
java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:587)
I20160516-20:17:03.062(2)? W / MeteorWebApp(3915):在
java.lang.Thread.run(Thread.java:818)I20160516-20:17:03.062(2)吗?
W / MeteorWebApp(3915):原因:org.json.JSONException:值
(JSONObject.java:160)
I20160516-20:17:03.063(2)? W / MeteorWebApp(3915):在
org.json.JSONObject。(JSONObject.java:173)
I20160516-20:17:03.063(2)吗? W / MeteorWebApp(3915):在
com.meteor.webapp.AssetManifest。(AssetManifest.java:39)
I20160516-20:17:03.059(2)? W/MeteorWebApp( 3915): Download failure I20160516-20:17:03.059(2)? W/MeteorWebApp( 3915): com.meteor.webapp.WebAppException: Error parsing asset manifest I20160516-20:17:03.060(2)? W/MeteorWebApp( 3915): at com.meteor.webapp.AssetManifest.(AssetManifest.java:80) I20160516-20:17:03.060(2)? W/MeteorWebApp( 3915): at com.meteor.webapp.AssetBundleManager$1.onResponse(AssetBundleManager.java:112) I20160516-20:17:03.060(2)? W/MeteorWebApp( 3915): at okhttp3.RealCall$AsyncCall.execute(RealCall.java:133) I20160516-20:17:03.061(2)? W/MeteorWebApp( 3915): at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) I20160516-20:17:03.061(2)? W/MeteorWebApp( 3915): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) I20160516-20:17:03.061(2)? W/MeteorWebApp( 3915): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) I20160516-20:17:03.062(2)? W/MeteorWebApp( 3915): at java.lang.Thread.run(Thread.java:818) I20160516-20:17:03.062(2)? W/MeteorWebApp( 3915): Caused by: org.json.JSONException: Value (JSONObject.java:160) I20160516-20:17:03.063(2)? W/MeteorWebApp( 3915): at org.json.JSONObject.(JSONObject.java:173) I20160516-20:17:03.063(2)? W/MeteorWebApp( 3915): at com.meteor.webapp.AssetManifest.(AssetManifest.java:39)
我不明白为什么我会有这个错误。当我在没有--mobile-server = myip:port的本地环境中运行该应用程序时,不会显示此错误。
I don't understand why i have this error. When i run the app in local without --mobile-server=myip:port, this error is not displayed.
推荐答案
这是由于Cordova清单不存在而导致的热代码推送失败。要确认,请访问 http:// myip:port / __ cordova / manifest.json
,该文件应返回类似于 http:// myip的json文档: port / manifest.json
(非cordova)。如果您从cordova网址获取应用程序/ html页面,则意味着您的构建不包括移动平台(在构建之前是否将其删除了?)
This is the hot code push failing due to the cordova manifest not being present. To confirm, visit http://myip:port/__cordova/manifest.json
which should return a json document similar to http://myip:port/manifest.json
(non-cordova). If you get your application/html page from the cordova url instead, this means your build didn't include the mobile platform (did you remove them before building?)
更新:您还需要确保在mup.js配置中包括 mobileSettings
,可能还包括 serverOnly
。有关这些选项的参考,请参见mup中的 lib / modules / meteor / build.js
。
UPDATE: you also need to make sure to include mobileSettings
and likely serverOnly
in your mup.js config. See lib/modules/meteor/build.js
in mup for reference to those options.
这篇关于流星错误:“ com.meteor.webapp.WebAppException:解析资产清单错误”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!