Can't get Ubuntu-developed android-device app to connect to mup-deployed staging Ubuntu server ("waiting"/"connecting")


#1

I’ve been trying for days now to get my app running on my Samsung Galaxy Prevail (Android 4.4) and connecting to my staging server, but the Meteor connection status alternates between “waiting” and “connecting” (usually settling on “waiting”–never “connected”).

I posted a similar thread before but this is a little different. Since my other thread ('meteor run android-device': Meteor.Status() stuck on "waiting" after "connecting") I have managed to get the app working in these scenarios:

  1. Phone connected to desktop, on same local network
  2. Phone connected to laptop, on same local network
  3. Phone connected to laptop, on public cafe wifi

What I am stuck with now is trying to get the app to connect to my public-facing Digital Ocean droplet, which is running Ubuntu 14.04 (same as my dev environment) and nginx proxy with nginx 1.8.0.

I had been running this staging environment fine as a web app for a long time, and I had been using port 3001 because I wanted to be able to run a different meteor app on port 3000. Today though, I switched back to 3000 (only this instance of meteor running on my server) to eliminate that variable.

I’ve tried every combination of parameters I can think of along the lines of:

meteor run android-device --mobile-server http://mystagingserver.com

Though I’ve tried a bazillion variations, the latest relevant portion of my mup.json file for this deployment looks like this (app name, server name, linux user name changed to protect the innocent):

  "env": {
    "MONGO_URL": "mongodb://localhost:27017/m-staging-com",
    "PORT": 80,
    "ROOT_URL": "http://m.staging.com",
//    "DDP_DEFAULT_CONNECTION_URL": "http://localhost:3000",
    "UPSTART_UID": "mylinuxuser" // The user you want to run meteor as.
  },

Any suggestions to fix or even roads to debug this? It’s really been a showstopper for me.