How to debug meteor / cordova app with router hardware stuck on boot screen?

I have a meteor app ( BrewsOnTap ) that works fine when deployed as a website, but when tested on an android device via cordova it got stuck on the loading screen forever.

Desktop Screenshot

I don't see any relevant console errors or warnings. If I go to the IP that I serve, it even displays fine from there. The app uses iron-router and waitOn to render the loading pattern until the intuitive data is loaded ... but apparently it doesn't.

Suggestions on what the problem might be or next steps to debug it?

+3


source to share


1 answer


This is very similar to a connection issue. First thing to try in the console:

Router.current().ready()

      

If that doesn't return false

, then something very funny happens with Tracker or Iron-Router, as it (reactively) gives the master wait status, so if it does true

, then there is something else preventing the page from rendering.

The best way to find out which items are not on the waitlist ready

is to go through your router code, pull the subscription descriptors into the global object, and pass references to the waitOn

callback.

For example, instead of:

waitOn: function() {
    return [Meteor.subscribe('someThings'), Meteor.subscribe('someOtherThings')];
}

      



do this instead:

Subs = {};

waitOn: function() {
    Subs.someThings = Meteor.subscribe('someThings');
    Subs.someOtherThings = Meteor.subscribe('someOtherThings');
    return [Subs.someThings, Subs.someOtherThings];
}

      

This way, you can run Subs.someThings.ready()

from the console on each subscription to find out what exactly is preventing your page from rendering. Hopefully this is a start.

However, while I do not fully understand the error messages you posted, the fact that it received the "FAILED TO LOAD RESOURCE" message strongly suggests a connectivity issue that would have prevented the subscription data from being sent to your client via DDP and thus prevented return of subscription ready

. I would look under the Networking tab to see what is happening (or not working) there.

Apologies that this is not a solution, but hopefully this is a start. If it's a connection, check all things in here - that is, developer tools are enabled, USB debugging is enabled, Android device is connected to the same Wi-Fi, IP is correct ...

UPDATE: Thinking about it a little more, the app installs via USB debugging, so the fact that you can run it at all indicates that there is no problem there. However, I believe the data is being sent over the local network and the problem is that the problem is that both devices are not connected to the same Wi-Fi, or the IP address is incorrect.

+6


source







All Articles