android-无法使我的流星应用程序连接到我的服务器.短暂显示“已连接”,转到“正在连接”和“正在等待”
作者:互联网
我可以将Samsung Galaxy Prevail连接到同一个LAN上的开发箱,运行“ meteor run android-device”,并在电话上启动我的应用程序,Meteor.status().status报告“已连接”.该应用程序运行良好.
但是,当我使用“ mup”将其部署到服务器上时(我可以在浏览器中的服务器上运行该应用程序),然后运行:
meteor run android-device --mobile-server http://mymeteorappdomain.com --debug
我看到“已连接”几秒钟,但是它切换到“正在连接”然后“正在等待”,并停留在那里.我注意到靠近“ restartServer”的底部附近的调试输出行(在视觉上)似乎与从“已连接”到“正在连接”的更改一致,但是我不了解科尔多瓦在那儿做什么,也不知道“ restartServer”在做什么或为什么应该重新启动任何东西.
因此,该应用程序启动了,但是我无法登录(例如使用ian:accounts-ui-bootstrap-3和accounts-password登录)或以其他方式在该应用程序中执行任何操作.
我正在Ubuntu 14.04上开发并部署到我的Digital Ocean Droplet,也正在运行Ubuntu 14.04.
这是完整的调试输出(不必担心实际的域名):
Installing app on device...
Launching application...
LAUNCH SUCCESS
Command finished with error code 0: /home/fugbert/www/dev/m.myapp.com/app/.meteor/local/cordova-build/platforms/android/cordova/run --device
I20150618-09:17:47.918(-7) (android:meteor_cordova_loader.js:12) METEOR CORDOVA DEBUG (meteor_cordova_loader.js) Error reading version file Error: Failed to resolve entry: file:///data/data/com.idbzpo1upqh87wp5no3r/files/meteor/version
I20150618-09:17:47.920(-7) (android:meteor_cordova_loader.js:12) METEOR CORDOVA DEBUG (meteor_cordova_loader.js) Couldn't load from the manifest, falling back to the bundled assets.
I20150618-09:17:48.001(-7) (android:meteor_cordova_loader.js:12) METEOR CORDOVA DEBUG (meteor_cordova_loader.js) Loading from url: http://meteor.local
I20150618-09:17:52.111(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /81094d8fd7495646a6359f4dcfd57bd3f223ee39.js
I20150618-09:17:52.133(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /0045083fdb0aae9cfdd7bc8624d6d600f54d0f32.css
I20150618-09:17:52.140(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/mizzao_bootstrap-3/bootstrap-3/fonts/glyphicons-halflings-regular.eot
I20150618-09:17:52.155(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/mizzao_bootstrap-3/bootstrap-3/fonts/glyphicons-halflings-regular.ttf
I20150618-09:17:52.161(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/mizzao_bootstrap-3/bootstrap-3/fonts/glyphicons-halflings-regular.svg
I20150618-09:17:52.169(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/mizzao_bootstrap-3/bootstrap-3/fonts/glyphicons-halflings-regular.woff
I20150618-09:17:52.175(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/mrt_x-editable-bootstrap3/lib/bootstrap3-editable/img/clear.png
I20150618-09:17:52.180(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/mrt_x-editable-bootstrap3/lib/bootstrap3-editable/img/loading.gif
I20150618-09:17:52.187(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/mrt_footable/lib/css/fonts/footable.eot
I20150618-09:17:52.195(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/mrt_footable/lib/css/fonts/footable.svg
I20150618-09:17:52.204(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/mrt_footable/lib/css/fonts/footable.ttf
I20150618-09:17:52.211(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/mrt_footable/lib/css/fonts/footable.woff
I20150618-09:17:52.214(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/fortawesome_fontawesome/fonts/fontawesome-webfont.eot
I20150618-09:17:52.218(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/fortawesome_fontawesome/fonts/fontawesome-webfont.svg
I20150618-09:17:52.223(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/fortawesome_fontawesome/fonts/fontawesome-webfont.ttf
I20150618-09:17:52.229(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/fortawesome_fontawesome/fonts/fontawesome-webfont.woff
I20150618-09:17:52.232(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/ryw_blog/public/default-user.png
I20150618-09:17:52.239(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/ryw_blog/client/stylesheets/images/remove.png
I20150618-09:17:52.243(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/ryw_blog/client/stylesheets/images/link.png
I20150618-09:17:52.247(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/ryw_blog/client/stylesheets/images/unlink.png
I20150618-09:17:52.251(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/ryw_blog/client/stylesheets/images/resize-bigger.png
I20150618-09:17:52.255(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /packages/ryw_blog/client/stylesheets/images/resize-smaller.png
I20150618-09:17:52.258(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /favicon.ico
I20150618-09:17:52.262(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /robots.txt
I20150618-09:17:52.266(-7) (android:http://meteor.local/packages/autoupdate.js:183) METEOR CORDOVA DEBUG (autoupdate_cordova.js) start downloading /index.html
I20150618-09:17:52.350(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/ryw_blog/client/stylesheets/images/remove.png
I20150618-09:17:52.365(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/mrt_footable/lib/css/fonts/footable.svg
I20150618-09:17:52.370(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/mizzao_bootstrap-3/bootstrap-3/fonts/glyphicons-halflings-regular.woff
I20150618-09:17:52.383(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/ryw_blog/public/default-user.png
I20150618-09:17:52.387(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/ryw_blog/client/stylesheets/images/resize-smaller.png
I20150618-09:17:52.410(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /index.html
I20150618-09:17:52.435(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/ryw_blog/client/stylesheets/images/link.png
I20150618-09:17:52.453(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/ryw_blog/client/stylesheets/images/unlink.png
I20150618-09:17:52.453(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/mrt_x-editable-bootstrap3/lib/bootstrap3-editable/img/clear.png
I20150618-09:17:52.454(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/mrt_footable/lib/css/fonts/footable.woff
I20150618-09:17:52.458(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/mrt_x-editable-bootstrap3/lib/bootstrap3-editable/img/loading.gif
I20150618-09:17:52.466(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/mrt_footable/lib/css/fonts/footable.ttf
I20150618-09:17:52.468(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /favicon.ico
I20150618-09:17:52.469(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/ryw_blog/client/stylesheets/images/resize-bigger.png
I20150618-09:17:52.481(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /robots.txt
I20150618-09:17:52.484(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/fortawesome_fontawesome/fonts/fontawesome-webfont.woff
I20150618-09:17:52.489(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/mrt_footable/lib/css/fonts/footable.eot
I20150618-09:17:52.626(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/mizzao_bootstrap-3/bootstrap-3/fonts/glyphicons-halflings-regular.eot
I20150618-09:17:52.632(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/mizzao_bootstrap-3/bootstrap-3/fonts/glyphicons-halflings-regular.svg
I20150618-09:17:52.633(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/mizzao_bootstrap-3/bootstrap-3/fonts/glyphicons-halflings-regular.ttf
I20150618-09:17:52.725(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /0045083fdb0aae9cfdd7bc8624d6d600f54d0f32.css
I20150618-09:17:52.784(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/fortawesome_fontawesome/fonts/fontawesome-webfont.eot
I20150618-09:17:52.848(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/fortawesome_fontawesome/fonts/fontawesome-webfont.ttf
I20150618-09:17:52.909(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /packages/fortawesome_fontawesome/fonts/fontawesome-webfont.svg
I20150618-09:17:53.514(-7) (android:http://meteor.local/packages/autoupdate.js:192) METEOR CORDOVA DEBUG (autoupdate_cordova.js) done downloading /81094d8fd7495646a6359f4dcfd57bd3f223ee39.js
I20150618-09:17:53.576(-7) (android:http://meteor.local/packages/autoupdate.js:44) METEOR CORDOVA DEBUG (autoupdate_cordova.js) restartServer with location /data/data/com.idbzpo1upqh87wp5no3r/files/meteor/a2857e48230e176c2713f1a27f17feef6945ac58
I20150618-09:17:55.831(-7) (android:http://meteor.local/81094d8fd7495646a6359f4dcfd57bd3f223ee39.js:247) METEOR CORDOVA DEBUG (autoupdate_cordova.js) cordova.file.dataDirectory is null, retrying in 20ms
解决方法:
我经历了如此反复的尝试,以至于我现在不确定到底这是我获得(并保持)联系之前的最后一步.
对我来说,最后一个错误是有关“ http://meteor.local”不可能出现CORS XMLHttpRequest的问题,至少这个问题似乎可以从此线程中有关添加浏览器策略包的建议中得到帮助:https://github.com/meteor/meteor/issues/4132
我计划将所有笔记放到博客或至少综合性的帖子上,因为如果他们(尤其是在Linux上为Android平台开发)上,可能会有很多人碰到这些陷阱.
标签:meteor,cordova,android 来源: https://codeday.me/bug/20191120/2041600.html