언어 설정

Menu
Sites
Language
Issue with http queries (xmlHttpRequest.status === 0)

Hello,

I tried to make my first widget for my Galaxy Watch Active 2.
I want to send command to my Domoticz server (hosted in my house) with my watch.

The web application use XMLHttpRequest to contact an API and get a response.
The related code is available on my Github repo (https(dot)//github(dot)com/Schim9/domoticzWatch/blob/e032e25f4aeae8bc54b0f9b077c8f4d8847c7ae4/js/main(dot)js#L94

When I set the "urlDev" variable to "http(dot)//httpbin(dot)org/anything" the call is successfull. I receive a 200 response status.
I tried to set the urlDev variable to "https(dot)//domotique(dot)kaminski(dot)lu" but it does not work anymore.

Once xmlHttpRequest.readyState is 4, I only get a status equals to 0
Same issue with "https(dot)//smoothiz-back(dot)xpertiz(dot)lu" which is hosted on an AWS instance.

If I connect my watch to my own Wifi network and I set urlDev to "http(dot)//192(dot)168(dot)0(dot)97(dot)8084 everything works well.
I receive status 200, the Domoticz server get the requests and I can toggle my lights.

Does anyone know why I get a 0 status code ?

 

Thanks for your help Eric
 

 

 

 

 

Responses

1 댓글
Eric KAMINSKI

I would like to add an additional information.

All the url I tested did work successfully on my browsers (Chrome and Firefox)
The issue did only appear when I test my widget directly on my watch