[SOLVED] Android app white screen on building

I have a Meteor app that I’m trying to run on Android by using meteor add-platform android.

When I run the app using meteor run android-device, it loads up on the device and runs fine.
When I do a build, I provide the --server argument, and the app just loads up and sits with a white screen.

I came across this question on stackoverflow, and tried adding a --mobile-settings argument pointing to the same file that the server points to, and it still gives the white screen.

I thought maybe this has got something to do with the build process, but meteor run android-device --mobile-server=HOST:PORT also causes the white screen.

I don’t know what could be causing this and don’t know where to start debugging. I’ve seen a lot of other people running across this issue but could not find a working solution anywhere. Any help would be greatly appreciated.

Generally speaking, if you get a white screen like this you’ll find errors thrown in the console.

And how would I connect to the console here? If I do run android-device, I get some console logs in the terminal, is that it?

I’m not completely sure if these errors will make it to the terminal console, it’s been awhile since I’ve built a Cordova app. You can however use chrome Dev tools to inspect the webview of your app.

I tried that out, but the only failures I have are network connection failures. ERR_CONNECTION_REFUSED. No other errors that should cause the app to fail to start, and I can load it in the browser just fine. Also, now it no longer works with run android-device either.

If I do FlowRouter.go('/') from the console, the app shows up on the mobile screen. Weird.

The error was that I was setting the --server=HOST:443. My server redirects to https anyway. If I set to HOST:80, the app works!

Okay so this is still not resolved. It works with meteor run connecting to my actual server, but it does not work with meteor build produced binary. That just gets stuck on the splash screen. Running with --production works.

EDIT: Supplying --mobile-settings to Meteor build was my answer at this point.

1 Like