Server Error: [object XMLHttpRequestProgressEvent] when calling a HTTP REST from the device iphone 6


Hi together,

maybe someone already solved this problem. I’m testing my application and I have started with the iOS simulator for iphone 6 everything work fine and also HTTP Rest calls to my rest backend server.

But when I’m trying to test the same application directly on the iphone 6 or ipad 2 devices, I got this error, that I’m trying to solve.

2017-04-10 02:54:34.608463+0200 mobile-app-sender[867:308803] Ionic Native: deviceready event fired after 2885 ms
2017-04-10 02:54:34.648038+0200 mobile-app-sender[867:308803] ERROR: Server Error: [object XMLHttpRequestProgressEvent] Failed to load resource: Could not connect to the server.

To be sure I have tried the url: in Safari browser and I got the right data and answer back from the server.

I would appreciate it if you could help me to fix this problem.

Thanks in advance


I know that iOS doesn’t allow apps to POST without TLS, but not sure about GET. If you don’t get any better answers, try switching to only using https: endpoints.


Does your server receive a request? Does is answer? What does it answer?
(Use the network view of dev tools to find out if you can’t look into the server itself)


I found the cause of this problem:

  • changing the with computer IP address solves the problem.


I got the same issue when I called the get method. please help me out

my code is:
var link =‘’ + EmpID + ‘&?Password=’ + password +’&?UDID=’+this.device.uuid + ‘&?Key=as23jk8410bnmklivvui’;


      var link ='' + EmpID + '&?Password=' + password +'&?UDID='+this.device.uuid + '&?Key=as23jk8410bnmklivvui';

      let headers = new Headers();
      headers.append('Content-Type', 'application/json');

      this.http.get(link).map(res => res.json()).subscribe(data => {
        alert("inside response")
            if (data.GetLoginDetailsResult.Username != undefined && data.GetLoginDetailsResult.Username !="") {
                name: 'employeeDetails.db',
                location: 'default'
                .then((db: SQLiteObject) => {
                  db.executeSql('CREATE TABLE IF NOT EXISTS user_detail(id INTEGER PRIMARY KEY AUTOINCREMENT,emp_id text,password text,udid text,name text,email text,phone_no text,designation text)', {})
                  .catch(e => console.log(e)); 
                  db.executeSql('INSERT INTO user_detail(emp_id,password,udid,name,email,phone_no,designation) VALUES(?,?,?,?,?,?,?)', [data.GetLoginDetailsResult.Username,data.GetLoginDetailsResult.Password,data.GetLoginDetailsResult.UDID
                  .catch(e => console.log(e));
                  db.executeSql('select * from user_detail',[]).then((data) => {
                    }, (err) => {
                     alert('Contact developer: '+JSON.stringify(err));
                    // alert('Unable to execute sql: '+JSON.stringify(err));
                .catch(e => console.log(JSON.stringify(e)));
              else {
      'Unable to login, check Emp Id and password.', '3000', 'bottom').subscribe(
                  toast => {
            }, error => {

I can’t find out where I’m getting wrong.,
its ruined my time.