jpgorganizer / ioBroker.smartgarden

GARDENA smart system adapter for ioBroker
Other
21 stars 8 forks source link

403 Forbidden >> 400 Bad Request >> 403 Forbidded - after 1,5 Yyears of service #70

Closed BlackHawk1942 closed 3 months ago

BlackHawk1942 commented 11 months ago

Greetz!

No changes to the Hardware / Software / Network. JS Controller 5.0.12, NodeJS 16.18. Test script from Husqvarna DEV-portal gives me an AUTH-token.

Recently I ran into the 403 Forbidden problem concerning UName and PWD. So I did some research and found the solution with the new application at the Husqvarna DEV-portal. After doing this the error seems to disappear but an 400 error showd up. Tried it for serveral times. Ended in deleting the object tree, alls instances and the adapter itself. Nothing helped me out. Yesterday I still get stuck with the 400 error.

  | 2023-09-26 10:13:29.938 - info: smartgarden.0 (11810) 1/ reconnect!
  | 2023-09-26 10:13:29.938 - info: smartgarden.0 (11810) 1/ getConnection...
  | 2023-09-26 10:13:29.939 - info: smartgarden.0 (11810) 1/ connectToGardena...
  | 2023-09-26 10:13:29.939 - info: smartgarden.0 (11810) 1/ connecting to Gardena Smart System Service ...
  | 2023-09-26 10:13:29.939 - info: smartgarden.0 (11810) 1/ Gardena Smart System Service hosts at: smart_host: https://api.smart.gardena.dev authentication_host: https://api.authentication.husqvarnagroup.dev
  | 2023-09-26 10:13:29.939 - info: smartgarden.0 (11810) 1/ connect ... empty username
  | 2023-09-26 10:13:29.939 - info: smartgarden.0 (11810) 1/ connect ... empty password
  | 2023-09-26 10:13:29.939 - info: smartgarden.0 (11810) 1/ connect ... using client credentials grant
  | 2023-09-26 10:13:30.160 - info: smartgarden.0 (11810) 1/ Connection failure.response.statusCode/Message=400/Bad Request
  | 2023-09-26 10:13:30.160 - info: smartgarden.0 (11810) 1/ Connection failure:..return with error
  | 2023-09-26 10:13:30.160 - error: smartgarden.0 (11810) Error: request returned 400 Bad Request
  | 2023-09-26 10:13:30.160 - info: smartgarden.0 (11810) 1/ getConnection: returned connection error: request returned 400 Bad Request
  | 2023-09-26 10:13:30.160 - info: smartgarden.0 (11810) 1/ getConnection: trying to connect again in 300 seconds

None of the adapter settings where changed.

Sometimes I restart the adapter and there seems to be a connection. But it is closed wihtin a wink.

  | 2023-09-26 10:42:50.469 - info: smartgarden.0 (11810) 1/ Connection: successful: response.statusCode / statusMessage=200 / OK
  | 2023-09-26 10:42:50.469 - info: smartgarden.0 (11810) 1/ Connection: expires_in/timeout/factor:86399 / 86313 / 0.999
  | 2023-09-26 10:42:50.469 - info: smartgarden.0 (11810) 1/ connected ... auth_data=eyJhXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXX-X-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  | 2023-09-26 10:42:50.470 - info: smartgarden.0 (11810) 1/ get_locations ...
  | 2023-09-26 10:42:50.672 - info: smartgarden.0 (11810) 1/ get_locations: successful / response.statusMessage: OK
  | 2023-09-26 10:42:50.673 - info: smartgarden.0 (11810) 1/ get_locations ... locations={"data":[{"id":"<wurde entfernt>","type":"LOCATION","attributes":{"name":"My Garden"}}]}
  | 2023-09-26 10:42:50.673 - info: smartgarden.0 (11810) 1/ get_websocket ...
  | 2023-09-26 10:42:50.844 - info: smartgarden.0 (11810) 1/ get_websocket successful: response.statusCode/Message=201/Created
  | 2023-09-26 10:42:50.845 - info: smartgarden.0 (11810) 1/ get_websocket ... websocket ok
  | 2023-09-26 10:42:50.975 - info: smartgarden.0 (11810) 1/ on_close: ### closed ### close.code=1006 close.reason=

So afater creating serveral new applications at the Husqvarna DEV-portal, delting the adapter and all references I still get the exact same problem. Today (over the night) the 400 Bad Request is gone and the 403 Forbidden appears again.

I need some help ^^ Thanks!

BlackHawk1942 commented 5 months ago

The Issue isn´t solved yet - unfortunately.

jpgorganizer commented 3 months ago

please set loglevel to 3 and send a new log. Thanks I'm not sure if it's an adapter error or an server error. Strangely enough, this error occurs from time to time for users, but never for me

BlackHawk1942 commented 3 months ago

@jpgorganizer I ended up with killing all incl. my Husqvarna ACC und reConfig everything. Took me 2h but now it is working again. Done that on 12th of APR. No Logs available anymore - sry.

jpgorganizer commented 3 months ago

ok, then I will close this issue,