Uncaught (in promise): Response with status: 0 for URL: null

Hello evrybody,

I’m new on Ionic 2 and I have several questions.

I try to access to my local server (I performed an eclipse project which creates a servlet in order to get a connection) with my smartphone. My laptop is connected through wifi with my smartphone.

my Ionic app is simple, it just display a button which “on click” executes this code :

	let params: URLSearchParams = new URLSearchParams();
	params.set('device_token', this.DEVICE_TOKEN);
	// this.http.get("",params)
			 .then(response => response)

I use :
when I run :Ionic serve
and I use :
when I run :Ionic run android

but when I run :Ionic serve
I can see the application access to my servlet (output displayed on my eclipse console)
but I get the error : Uncaught (in promise): Response with status: 0 for URL: null
I don’t know why…
and when I run : Ionic run android
I have no informations and nothing display on the eclipse console…
any idea ? I wonder what error occurs…

Moreover I would know how can I debug that, how can I get any process informations ? I spent a lot of time to debug because I don’t know how debug ionic app… Could you say me how can I do that ?

For ionic serve use your browser’S dev tools to look at the Network requests.
For ionic run android the same, but in a different way: https://ionicframework.com/docs/resources/developer-tips/#debugging-android-chrome

Thank to your reponse !
But on my brower’s dev tools if I look the tab ‘network’ all is good.
the error in my brower console tab isn’t more usefull :

ERROR Error: Uncaught (in promise): Response with status: 0  for URL: null
Trace de la pile :

What does this do? Try to leave it out.

This method “transform” the Observable object to Promise object in order to use then and catch method. If I delete it I get an compilation error.