Run android --livereload ERR_INVALID_RESPONSE

Hi,
Im using ionic 3, and im trying to use the ionic cordova run android --livereload .

When i run ionic cordova run android it works normally but when i run this code i see the error: It was not possible to load the webpage on address http://192.168.25.4:8101/ because: net::ERR_INVALID_RESPONDE .

I already tried a lot of things for 2 days but i couldnt find anything on the web.

Follow the versions im using:

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) 

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 6.3.0 browser 6.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.2 
ios-sim    : 5.0.8 
Node       : v8.11.1
npm        : 5.6.0 
OS         : macOS High Sierra
Xcode      : Xcode 9.4.1 Build version 9F2000 

I think its a connection error but i couldnt fix it yet.

Have you found a solution yet?

I had this problem once, solved it somehow and now it’s back to haunt me.

Not sure what I did a few months ago to solve it though.

I see I “hearted” @sveinla’s response in the other thread you commented on, he mentions:

“When using livereload you cant do that through USB. You have to connect your phone to the same network as your computer that serves - where ionic serve/run are running.”

I remember that being the clue that led me to solve it.

Unfortunately, right now I am out of ideas.

Edit: This is only a problem on my Mac and not on Windows.

Ok, I have a clue. Livereload is pointing to the wrong IP address.

My phone’s IP ends in .168.1.3 and Livereload is pointing to .168.1.2

So I altered the address in <allow navigation> in config.xml and ran live reload, but it just generates the same old .168.1.2 in allow navigation :thinking:

When I run --livereload --address I don’t even see an option for my phone’s address, just the .168.1.2

The old address must be saved somewhere and that’s where its being generated from. Any ideas?

This is still only on Mac, works fine on Windows. I’ve pulled the code from Github, so its the same code as it is on Windows.