SOLVED: Meteor Cordova (android) app hanging on loading screen... need help

Hi All,

I have a meteor app was previously working, successfully submitted to android and ios stores and that I have been using for a while. Suddenly during one of my tests it stopped working. I have upgraded meteor from 1.2 to 1.3.5.1 to 1.4.1 now in hopes that this problem will go away but it has not.

Since 1.2 the app when loaded on a device (during development) just hangs on the loading screen. I run this command to test on an android device

meteor --settings settings.json run android-device --verbose

and I get this at the end

I20160822-13:56:44.756(1)? I/chromium(27668): [INFO:library_loader_hooks.cc(114)] Chromium logging enabled: level = 0, default verbosity = 0 isUserLoad=1 I20160822-13:56:44.920(1)? W/chromium(27668): [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation I20160822-13:56:44.921(1)? D/MeteorWebApp(27668): Detected new bundled version, removing versions directory if it exists I20160822-13:56:44.921(1)? I/MeteorWebApp(27668): Serving asset bundle with version: 112ca00ebadc9029eef821dbb707d2ed7b44f2ee I20160822-13:56:44.927(1)? W/chromium(27668): [WARNING:aw_network_delegate.cc(66)] http://192.168.8.103:3000/sockjs/info?cb=sp77wtorbe#-400#1 I20160822-13:56:44.983(1)? W/chromium(27668): [WARNING:aw_network_delegate.cc(66)] http://192.168.8.103:3000/sockjs/info?cb=tppsm08im0#-400#1 I20160822-13:56:45.171(1)? W/chromium(27668): [WARNING:aw_network_delegate.cc(66)] http://192.168.8.103:3000/sockjs/info?cb=j4nlevyu38#-400#1 I20160822-13:56:50.073(1)? W/chromium(27668): [WARNING:aw_network_delegate.cc(66)] http://192.168.8.103:3000/sockjs/info?cb=f6h8_lg2lb#-400#1 I20160822-13:57:00.438(1)? W/chromium(27668): [WARNING:aw_network_delegate.cc(66)] http://192.168.8.103:3000/sockjs/info?cb=t2udjh11is#-400#1 I20160822-13:57:28.639(1)? W/chromium(27668): [WARNING:aw_network_delegate.cc(66)] http://192.168.8.103:3000/sockjs/info?cb=slc9cbaeai#-400#1 I20160822-13:57:40.394(1)? W/MeteorWebApp(27668): App startup timed out, reverting to last known good version I20160822-13:58:11.316(1)? W/chromium(27668): [WARNING:aw_network_delegate.cc(66)] http://192.168.8.103:3000/sockjs/info?cb=f7d3_swhl5#-400#1 I20160822-14:00:17.862(1)? W/chromium(27668): [WARNING:aw_network_delegate.cc(66)] http://192.168.8.103:3000/sockjs/info?cb=1_e9tz97w5#-400#1 I20160822-14:03:48.205(1)? W/chromium(27668): [WARNING:aw_network_delegate.cc(66)] http://192.168.8.103:3000/sockjs/info?cb=g5jn4f0qtz#-400#1 I20160822-14:09:14.631(1)? W/chromium(27668): [WARNING:aw_network_delegate.cc(66)] http://192.168.8.103:3000/sockjs/info?cb=zuq0oztrlf#-400#1

I have tried removing the loading screen from Iron router and I just get a blank white screen instead of the loading screen when I run the app. I have also tried using the chrome inspector on the app, by inspecting the device. I get this

Failed to load resource http://192.168.8.103:3000/sockjs/info?cb=0tb3bhy8n8 Failed to load resource http://192.168.8.103:3000/sockjs/info?cb=nnp4aj0qtp Failed to load resource http://192.168.8.103:3000/sockjs/info?cb=xu5lg0kipy deviceready has not fired after 5 seconds. cordova.js:1185 Channel not fired: onDOMContentLoaded cordova.js:1178 Failed to load resource http://192.168.8.103:3000/sockjs/info?cb=1ybep54ekq Uncaught ReferenceError: device is not defined startup.js?hash=58e39250e32c82cb9ddcf6277924b70683f75bc6:24 GET http://192.168.8.103:3000/sockjs/info?cb=uyoju54_bj ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:942 GET http://192.168.8.103:3000/sockjs/info?cb=44kz6bagsd ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:942 GET http://192.168.8.103:3000/sockjs/info?cb=jfs9faizny ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:942 GET http://192.168.8.103:3000/sockjs/info?cb=_ur5yfisg0 ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:942

I have searched google over and over again and have tried every kind of solution I have run into, but none have worked for me.

I have created a sample app, just by creating a blank meteor project and running it on the device. It works! so it is not my machine setup, it is something in my app but I am out of ideas on how to investigate this. Any ideas here will be greatly appreciated

There you go :wink: (bla bla bla bla 20 char)

Sorry newbie here, what do they mean by device is not defined? How do I define a device?

I added this plugin:

cordova:cordova-plugin-device@1.1.1

That error went away but I am still getting

Failed to load resource http://192.168.8.103:3000/sockjs/info?cb=ccxctymtf6 Failed to load resource http://192.168.8.103:3000/sockjs/info?cb=hwg8fvgxiq Failed to load resource http://192.168.8.103:3000/sockjs/info?cb=gx51te0h76 deviceready has not fired after 5 seconds. cordova.js:1185 Channel not fired: onDOMContentLoaded cordova.js:1178 Failed to load resource http://192.168.8.103:3000/sockjs/info?cb=8jcb6bwchn Failed to load resource http://192.168.8.103:3000/sockjs/info?cb=3xmf9uyu9n Failed to load resource http://192.168.8.103:3000/sockjs/info?cb=7y16d11nas GET http://192.168.8.103:3000/sockjs/info?cb=pi4cxjjm52 ddp-client.js?hash=27502404fad7fc072e57e8b0b6719f40d92709c7:942

and I am still in the same sitaution

This was fixed by removing the android platform

meteor remove-platform android

and then adding it back

meteor add-platform android

1 Like

Thanks this actually worked for me as well!