Friday 15 May 2015

android - how to debug a meteor / cordova app using iron-router stuck at loading screen? -



android - how to debug a meteor / cordova app using iron-router stuck at loading screen? -

i have meteor app (brewsontap) works fine when deployed website, when testing on android device through cordova gets stuck @ loading screen forever.

i don't see relevant console errors or warnings. if go ip i'm serving app displays fine. app using iron-router , waiton display loading template until intial info loaded... apparently isn't happening.

suggestions problem or next steps debug it?

this looks much connectivity problem. first thing seek in console:

router.current().ready()

if doesn't homecoming false there funny going on tracker or iron-router, (reactively) gives master wait-list readiness, if returns true there else preventing page rendering.

the best way find out item(s) in wait-list isn't ready go through router code, pull out subscription handles global object, , pass references waiton callback.

for example, rather than:

waiton: function() { homecoming [meteor.subscribe('somethings'), meteor.subscribe('someotherthings')]; }

do instead:

subs = {}; waiton: function() { subs.somethings = meteor.subscribe('somethings'); subs.someotherthings = meteor.subscribe('someotherthings'); homecoming [subs.somethings, subs.someotherthings]; }

that way, can run subs.somethings.ready() console on each of subscriptions find out is preventing page rendering. hopefully, start.

however, whilst don't understand error messages you've posted, fact it's got "failed load resource" suggests connection issue, prevent subscription info making way client via ddp , prevent subscription returning ready. have in network tab see what's going on (or not doing) there.

apologies isn't solution, it's start. if connectivity, check things in here - i.e. developer tools enabled, usb debugging allowed, android device connected same wifi, ip correct...

update: thinking little more, app installed via usb debugging, fact can run @ indicates there isn't problem there. however, assume info passed on local network, problem is, think must 2 devices not connected same wifi, or else supplied ip incorrect.

android cordova meteor

No comments:

Post a Comment