Unable to connect to server from meteor cordova app


#1

The app is connected to 20mbps internet connection even though it’s not able to connect with the server.

Here’s is what I’m getting in the console.

Any help would be much appreciated.


#2

Are you able to access your app opening it on a mobile browser in your device using 192.168.1.7:3000? Maybe your IP is wrong.

You can check your local IP with ifconfig | grep "inet 1" it’ll be usually in the second line, like this inet 192.168.0.142 netmask 0xffffff00 broadcast 192.168.0.255


#3

Yes, I’m able to access the app on the mobile browser.


#4

And are you running like this?

meteor run android-device --settings private/env/development/settings.json --port 3001 --mobile-server 192.168.0.141:3001

–mobile-server flag is important


#5

I tried running with this “meteor run android-device --settings .deploy/local/settings.json --port 3001 --mobile-server 192.168.1.6:3001” command as well. It worked.
But I’m still not able to track down the issue. As it doesn’t occur every time. Some time app runs properly, sometimes it’s not able to connect with the server and sometimes it goes to a blank white or black screen.