Response with status: 0 for URL: null


This must be very simple but I am struggling badly with this. My client is very upset over things not working, although rest of the application I’ve completed but because at the login stage only its not working so client is not able to test it.
In browser it works fine but in emulator and device there is this error -

Response with status: 0 for URL: null

On Server side there is CodeIgniter. Searched, tried a lot but could not find a workable solution. Please check codes below and help me resolve the issue.


 "proxies": [
      "path": "/login",
      "proxyUrl": "http://www.mydomain.coo/members/login"
      "path": "/update",
      "proxyUrl": "http://www.mydomain.coo/members/update"
      "path": "/register",
      "proxyUrl": "http://www.mydomain.coo/members/register"


login() {
    this.postData = { isApp: '1', key: 'login',, password:this.password };

    let data = JSON.stringify(this.postData);

    this.auth.login( this.postData ).then((result) => {

 = result;
         if ( == true )

            this.showLoader('Invalid Credentials...');
            setTimeout(() => {
            }, 2000);

    }, (err) => {



login(postData) {

    return new Promise((resolve, reject) => {

      let headers = new Headers( {
        'Access-Control-Allow-Origin' : '*',
        'Access-Control-Allow-Methods' : 'POST, GET, OPTIONS, PUT',
        'Content-Type': 'application/json; charset=UTF-8',
        'Accept': 'application/json'
      });'/login', JSON.stringify(postData), {headers: headers})

        .subscribe(res => {


        }, (err) => {



Codeigniter index.php

header(“Access-Control-Allow-Origin: *”);
header(“Access-Control-Allow-Methods: POST, GET, OPTIONS”);
header(“Access-Control-Allow-Headers: X-PINGOTHER, Content-Type”);
header(“Access-Control-Max-Age: 86400”);


I believe proxies in ionic.config.json is only effective during development, not in final builds. I also don’t think you need to be setting all of those headers client-side, and you definitely don’t need to be explicitly instantiating a Promise. Furthermore, if you’re trying this on iOS, I believe all endpoints must be https, not http.


Yes, Service Proxies are a CLI feature, so only work with ionic serve etc on local builds on the same machine.

Did you remote debug the problem on the device already?
Follow these instructions here to debug the problem in Safari dev tools:
Follow these instructions here to debug the problem in Chrome dev tools:
Look at the console and network tabs for errors.


Checked similar queries and found no one has given simple straight answer.
I would like to know -
I have done is correct or not?
How have you done the same if its working for you?


What does that mean?

On a build that should work outside of your local machine you can’t use Service Proxies, you hav to use the proper URL of the API directly.