Cannot access PhoneGap server from another machine

477 views Asked by At

I'm a beginner in PhoneGap, but I found that there's this nice way of testing your applications just by serving it to PhoneGap Developer app running on your phone. The only problem is that it doesn't quite work for me.

when I run from my command line the following command

phonegap serve

I can access the application from my Firefox just by going to URL that gets displayed at server startup (or just localhost:3000, doesn't make much of a difference).

The problem is however that when I enter the URL from another machine the http request appears to time-out and as a result I cannot test the app on my android device (so far the app is just an automatically generated helloWorld)

I already disabled my firewall and tried running the command line as administrator, but those didn't help. I also tried running 'cordova serve' instead, but that gave me exactly same result. The same problem doesn't occur when I try running glassfish for instance.

My PhoneGap CLI version is 5.0.0-0.28.1 and my Phonegap Developer app version is 1.5.2

1

There are 1 answers

0
Gavin On

Is the other "machine" actually a mobile device that's on a cellular network as well as wifi? Even though I was on my wifi network on my iPhone and iPad, I had to switch to airplane mode to connect to the PhoneGap server.