Ionic4 : Network interface plugin not working

Hi,

I am trying to get the device ip address using Ionic native network interface plugin. When I invoke the below code it gives me a error saying “No valid IP address found”. It happens in both IOS & android. Verified in emulator. I am using the latest ionic version & angular 8. Any help is appreciated.

this.networkInterface.getCarrierIPAddress()
.then(address => {
console.info('User Ip address ’ + JSON.stringify(address));
this.networkService.userIP = address.ip;
})
.catch(error => console.error(‘Unable to get IP’+ error));

Have you tried in mobile device not in emulator?

I tried in the mobile device & ip address is coming as 0.0.0.0 in IOS using verizon network & for android it gives out the correct ip address on at&t, t-mobile.