skydiver / ewelink-api

eWeLink API for JavaScript
https://www.npmjs.com/package/ewelink-api
MIT License
264 stars 108 forks source link

invalid json response at https://us-api.coolkit.cc:8080... #177

Open dk7988 opened 2 years ago

dk7988 commented 2 years ago

hello, i keep getting the following error when my node app tries to login.

FetchError: invalid json response body at https://us-api.coolkit.cc:8080/api/user/login reason: Unexpected token < in JSON at position 0

This seems to have started either yesterday or today. every now and then (randomly) it will be able to login and everything starts working fine then after 'X' amount of time my app no longer as the ability to refresh my plug data. So I then close my node app and re open it i get the above error message.

I was wondering if anyone knows what is going on here?

thanks for the help -Nick

superedmundo commented 2 years ago

Check the response before trying to parse

gleam-ru commented 1 year ago

Same issue. I had same issue. Debugging leaded me to conclusion that server in selected region ("us" by default) is on maintains. Changing target region (to "eu" in my case) resolved the issue.

wmken32 commented 9 months ago

I faced this issue yesterday. I can't fix it even I change the region. Does any way to fix it? Or it's the server issue, I just need to wait?