Why doesn't my mobile app connect to the server?


#1

Works fine on web browser on the mobile.
When I use mupx deploy --mobile-server http://139.59.189.109:3000 it creates the APK fine.
After signing and running on my phone it does not load the account login or the ionic icons so I presume it does not connect to the server.
Are there any things I could have easily missed that would prevent it from connecting?


#2

I have this in my mup.json, I’m not entirely sure if both are needed but I remember having a lot of issues when I first started and this is what I finished with in the end…

// Configure environment
"env": {
“ROOT_URL”: “http://55.55.254.242”,
“DDP_DEFAULT_CONNECTION_URL”: “http://55.55.254.242” // this is same as --mobile-server?
},


#3

Didn’t have the DDP_DEFAULT_CONNECTION_URL, result was the same sadly


#4

Do you have App.accessRules set in your mobile-config.js?


#5

yeah it has App.accessRule(‘http://139.59.189.109:3000/*’);

mup env is

“env”: {
“ROOT_URL”: “http://139.59.189.109:3000”,
“DDP_DEFAULT_CONNECTION_URL”: “http://139.59.189.109:3000”,
“PORT”: 3000,
“UPSTART_UID” : “meteoruser”

},