salbahra / cordova-plugin-networkinterface

Provide a method for Cordova applications to retrieve the device IP Address.
http://albahra.com/projects
72 stars 51 forks source link

What would cause a call to 'getHttpProxyInformation' to fail when getWiFiIPAddress() succeeds? #39

Open JesseRMeyer opened 5 years ago

JesseRMeyer commented 5 years ago

I'm in the middle of debugging why my Ionic 3 application is unable to communicate with the internet. I've been able to confirm that my application receives an IP address using this helpful plugin, however, I cannot receive any proxy information of websites, which I think is a clue.

Upon calling getWifiAddress(), I get : WIFI IP: 10.66.61.134, Subnet: 255.255.224.0 However, upon calling getHttpProxyInformation('www.github.com'), I get : Unable to get proxy info: Error while calling ''getHttpProxyInformation' 'protocol = null, host = null

I believe this is unusual and unexpected.

So how can the app both have a valid IP / Sub but not get proxy information regarding a website? The app is connected to a functional network.

Is this a permissions issue? My Config.xml contains the following lines which I believe are relevant:

<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
JesseRMeyer commented 5 years ago

The ADB logs show:

2019-04-12 11:47:54.153 20602-20703/com. W/CordovaPlugin: Attempted to send a second callback for ID: networkinterface515921729 Result was: "Invalid action" 2019-04-12 11:47:54.155 20602-20703/com. W/CordovaPlugin: Attempted to send a second callback for ID: networkinterface515921730 Result was: "Invalid action"