Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My Ionic Info is below:

cli packages: (C:\Windows\System32\node_modules)

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

cordova (Cordova CLI) : not installed
local packages:

@ionic/app-scripts : 3.1.11
Cordova Platforms  : android 7.0.0 browser 5.0.4
Ionic Framework    : ionic-angular 3.9.2
System:

Android SDK Tools : 26.1.1
Node              : v8.11.3
npm               : 6.3.0
OS                : Windows 7
Hi, I have built an app and it is working fine on the browser. But on the mobile I am getting this error.

net::ERR_NAME_NOT_RESOLVED


The reply from the server is below.

**"HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 10\r\nAccess-Control-Allow-Origin: \r\nAccess-Control-Allow-Headers: \r\n\r\n" + ipStr + "";

As you can see, i have the Access Control Allow Origin there also.
Please help as I cant seem to solve the problem.


What I have tried:

I have restarted my phone.
I have cleared the app memory.
Posted
Updated 27-Sep-18 5:52am
Comments
Richard MacCutchan 27-Sep-18 11:42am    
What you have shown above is not a valid HTTP reply, it looks more like a line of code. Also, where does the error message come from?
Nomanshahsyed 27-Sep-18 11:53am    
Hi, thanks for reply. Yes you are right, this is the reply code in my server. The error comes on the Android phone which I can see on the console. Basic idea is to use a .local domain to ping the device which in turn gives the IP of the device in the reply. I am getting the reply of IP fine when I use POSTMAN or if I run the app on browser using ionic serve. But on the actual phone this error comes.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900