Mobile app now shows white screen. Why?

I had to make a small change to a mobile app built with Meteor.

After implementing the small change, the app works fine in the browser. I then updated to Meteor 1.10.2.

Then, deploying to iOS and Android didn’t work, as the build process now generated errors related to Cordova. I downgraded Meteor to 1.9.3, which then allowed me to build the project. I had to update Xcode, but the project eventually showed up in Xcode.

However, now, running the app in Xcode, or on a connected iPhone, sees the app startup, but then finish with a white screen. The only indication of something going wrong is that the Xcode console now returns this:

ERROR: There is no route for the path: /?cdvToken=FCD76877…

I use flow router and had a similar problem before where, from one moment to the next, the routes in /client/router.js were no longer recognised. I now moved the routes to /client/main.js, but though the app still runs fine in the browser, in Xcode there is no difference; I’m presented with a white screen and the error mentioned above.

What’s the problem here? How to solve this?

It took a long time to trace the source of this problem.

Here are relevant files in my project:

I use flow-router.

In main.js, I have a function my_distance.
In main.js, I include body.js.
In body.js, I include home.js and venue.js
In body.html, I have {{>Template.dynamic template=content}}, which, when the route is “/”, displays home.html.
In home.html, I have {{>venue}}.

In venue.html, I call {{calculatedDistance}}, which is a helper in venue.js which sends values to my_distance and returns a result.

If I move my_distance to venue.js, the app works fine. If I keep my_distance in main.js, the app crashes with a white screen and no error messages.

1 Like