Live reload option not working when using with usb-attached android device


#1

Just started working with Ionic the other day, installed most recent version of framework and all required dependencies on my 2015 Macbook Air running El Capitan.

Everything seems to be working OK with the exception of this issue:

When trying to use the live reload option for development with my usb-connected android phone (via command “ionic run android -l”), I receive the following error message on my phone:

Webpage not available

The webpage at http://[local IP and port of my computer] could not be loaded because:

net::ERR_ADDRESS_UNREACHABLE

Note: I don’t receive this message when I leave out the -l option.

I know that others have had this issue and I have read virtually all related articles that come up in a google search, but I am still at a loss for a solution.

Some have said this has to do with default restrictions imposed with Cordova whitelist plugin. I tried the changes specified in the below article but to no avail.

I’ve tried all other fixes that come up from a google search but without success. As a developer (even a relatively new one) I expect this as par for the course, but the frustration is starting to sink in.

Any help is much appreciated. Thanks.


#2

I already had the same problem that you
When you use the live reload option you have to be connected via WiFi in the same network as your computer, because the live reload works via LAN not via USB.
So check if your phone is connected to the same network your computer


#3

Yeah I already checked that, hoping it would be that simple. Still no luck though.


#4

I solved it. I had a Django development server running on my localhost which was causing CORS problems. Killing the Django server worked. [16 hours later]


#5

Wtf. Thought that this was resolved but now I’m running into the same issue. No Django server running but still getting same error message. Trying to understand the logic of this problem but failing. It worked for a while and now it’s not working.

Any suggestions?


#6

What about when you build the code i get the white screen any solutions ?


#7

your phone is in the same net address, you are connected to wifi or 3g?