ice987987/ioBroker.husqvarna-automower

Errors & restart while adapter is active - automatic restart works

Closed this issue · 9 comments

This morning the adapter stucks. After the automatic restart everything's fine again. Maybe the Token got invalid? I've not found on a quick view a renewal process in your code.
Or is it because the admin-adapter restarts sometimes itself?

`

husqvarna-automower.0 2022-04-20 06:30:32.429 info Connection to "Husqvarna WebSocket" established. Ready to get status events...
husqvarna-automower.0 2022-04-20 06:30:32.117 info System information saved...
husqvarna-automower.0 2022-04-20 06:30:31.782 info "Husqvarna Authentication API Access token" received.
husqvarna-automower.0 2022-04-20 06:30:31.317 info Trying to connect "Automower Connect API"...
husqvarna-automower.0 2022-04-20 06:30:31.316 info starting adapter "husqvarna-automower"...
husqvarna-automower.0 2022-04-20 06:30:31.311 info starting. Version 0.0.4 (non-npm: ice987987/ioBroker.husqvarna-automower#c824ffaf8c69e785bada1b4dbce1ed34752bdd3c) in /usr/local/iobroker/node_modules/iobroker.husqvarna-automower, node: v14.15.3, js-controller: 4.0.21
host.iMac-Micha.local 2022-04-20 06:30:30.936 info instance system.adapter.husqvarna-automower.0 started with pid 58097
host.iMac-Micha.local 2022-04-20 06:30:01.484 info Restart adapter system.adapter.husqvarna-automower.0 because enabled
host.iMac-Micha.local 2022-04-20 06:30:01.484 error instance system.adapter.husqvarna-automower.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
husqvarna-automower.0 2022-04-20 06:29:58.580 warn Terminated (UNCAUGHT_EXCEPTION): Without reason
husqvarna-automower.0 2022-04-20 06:29:58.579 info terminating
husqvarna-automower.0 2022-04-20 06:29:58.052 error "Automower Connect API" not reachable. Please check "Username, "Password and/or "API Key". (ERR_#008)
husqvarna-automower.0 2022-04-20 06:29:58.052 error Error: "Automower Connect API" not reachable. Please check "Username, "Password and/or "API Key". (ERR_#008) at /usr/local/iobroker/node_modules/iobroker.husqvarna-automower/main.js:154:11 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async HusqvarnaAutomower.getRefreshToken (/usr/local/iobroker/node_modules/iobroker.husqvarna-automower/main.js:125:3)
husqvarna-automower.0 2022-04-20 06:29:58.051 error unhandled promise rejection: "Automower Connect API" not reachable. Please check "Username, "Password and/or "API Key". (ERR_#008)
husqvarna-automower.0 2022-04-20 06:29:58.050 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
host.iMac-Micha.local 2022-04-20 06:29:58.027 info No IPv4 address found after 5 minutes.
host.iMac-Micha.local 2022-04-20 04:28:58.032 info No IPv4 address found after 5 minutes.
host.iMac-Micha.local 2022-04-20 02:27:59.011 info No IPv4 address found after 5 minutes.
host.iMac-Micha.local 2022-04-20 11:36:08.333 info stopInstance system.adapter.admin.0 (force=false, process=true)
husqvarna-automower.0 2022-04-20 06:30:32.429 info Connection to "Husqvarna WebSocket" established. Ready to get status events...
husqvarna-automower.0 2022-04-20 06:30:32.117 info System information saved...
husqvarna-automower.0 2022-04-20 06:30:31.782 info "Husqvarna Authentication API Access token" received.
husqvarna-automower.0 2022-04-20 06:30:31.317 info Trying to connect "Automower Connect API"...
husqvarna-automower.0 2022-04-20 06:30:31.316 info starting adapter "husqvarna-automower"...
husqvarna-automower.0 2022-04-20 06:30:31.311 info starting. Version 0.0.4 (non-npm: ice987987/ioBroker.husqvarna-automower#c824ffaf8c69e785bada1b4dbce1ed34752bdd3c) in /usr/local/iobroker/node_modules/iobroker.husqvarna-automower, node: v14.15.3, js-controller: 4.0.21
host.iMac-Micha.local 2022-04-20 06:30:30.936 info instance system.adapter.husqvarna-automower.0 started with pid 58097
host.iMac-Micha.local 2022-04-20 06:30:01.484 info Restart adapter system.adapter.husqvarna-automower.0 because enabled
host.iMac-Micha.local 2022-04-20 06:30:01.484 error instance system.adapter.husqvarna-automower.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
husqvarna-automower.0 2022-04-20 06:29:58.580 warn Terminated (UNCAUGHT_EXCEPTION): Without reason
husqvarna-automower.0 2022-04-20 06:29:58.579 info terminating
husqvarna-automower.0 2022-04-20 06:29:58.052 error "Automower Connect API" not reachable. Please check "Username, "Password and/or "API Key". (ERR_#008)
husqvarna-automower.0 2022-04-20 06:29:58.052 error Error: "Automower Connect API" not reachable. Please check "Username, "Password and/or "API Key". (ERR_#008) at /usr/local/iobroker/node_modules/iobroker.husqvarna-automower/main.js:154:11 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async HusqvarnaAutomower.getRefreshToken (/usr/local/iobroker/node_modules/iobroker.husqvarna-automower/main.js:125:3)
husqvarna-automower.0 2022-04-20 06:29:58.051 error unhandled promise rejection: "Automower Connect API" not reachable. Please check "Username, "Password and/or "API Key". (ERR_#008)
husqvarna-automower.0 2022-04-20 06:29:58.050 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
host.iMac-Micha.local 2022-04-20 06:29:58.027 info No IPv4 address found after 5 minutes.
host.iMac-Micha.local 2022-04-20 04:28:58.032 info No IPv4 address found after 5 minutes.
host.iMac-Micha.local 2022-04-20 02:27:59.011 info No IPv4 address found after 5 minutes.
host.iMac-Micha.local 2022-04-20 11:36:08.333 info stopInstance system.adapter.admin.0 (force=false, process=true)
husqvarna-automower.0 2022-04-20 06:30:32.429 info Connection to "Husqvarna WebSocket" established. Ready to get status events...
husqvarna-automower.0 2022-04-20 06:30:32.117 info System information saved...
husqvarna-automower.0 2022-04-20 06:30:31.782 info "Husqvarna Authentication API Access token" received.
husqvarna-automower.0 2022-04-20 06:30:31.317 info Trying to connect "Automower Connect API"...
husqvarna-automower.0 2022-04-20 06:30:31.316 info starting adapter "husqvarna-automower"...
husqvarna-automower.0 2022-04-20 06:30:31.311 info starting. Version 0.0.4 (non-npm: ice987987/ioBroker.husqvarna-automower#c824ffaf8c69e785bada1b4dbce1ed34752bdd3c) in /usr/local/iobroker/node_modules/iobroker.husqvarna-automower, node: v14.15.3, js-controller: 4.0.21
host.iMac-Micha.local 2022-04-20 06:30:30.936 info instance system.adapter.husqvarna-automower.0 started with pid 58097
host.iMac-Micha.local 2022-04-20 06:30:01.484 info Restart adapter system.adapter.husqvarna-automower.0 because enabled
host.iMac-Micha.local 2022-04-20 06:30:01.484 error instance system.adapter.husqvarna-automower.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
husqvarna-automower.0 2022-04-20 06:29:58.580 warn Terminated (UNCAUGHT_EXCEPTION): Without reason
husqvarna-automower.0 2022-04-20 06:29:58.579 info terminating
husqvarna-automower.0 2022-04-20 06:29:58.052 error "Automower Connect API" not reachable. Please check "Username, "Password and/or "API Key". (ERR_#008)
husqvarna-automower.0 2022-04-20 06:29:58.052 error Error: "Automower Connect API" not reachable. Please check "Username, "Password and/or "API Key". (ERR_#008) at /usr/local/iobroker/node_modules/iobroker.husqvarna-automower/main.js:154:11 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async HusqvarnaAutomower.getRefreshToken (/usr/local/iobroker/node_modules/iobroker.husqvarna-automower/main.js:125:3)
husqvarna-automower.0 2022-04-20 06:29:58.051 error unhandled promise rejection: "Automower Connect API" not reachable. Please check "Username, "Password and/or "API Key". (ERR_#008)
husqvarna-automower.0 2022-04-20 06:29:58.050 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

`

This error might be similar to this one. Do you have the link, where I can get the "OLD API"-Access, that iI can simulate this issue in debug mode?

Don't think so. I've requested new API-Key last time. After that the adapter worked fine until this issue. This means this issue is not regarding the linked issue, which was due to my own developer account and API Key.
What do you mean with "where I can get the "OLD API"-Access"?

The stated issue suddenly came up this morning.
Due to that I concluded it may occurred by a invalid token?

Do you know where this errors comes from:

host.iMac-Micha.local | 2022-04-20 06:29:58.027 | info | No IPv4 address found after 5 minutes.
host.iMac-Micha.local | 2022-04-20 04:28:58.032 | info | No IPv4 address found after 5 minutes.
host.iMac-Micha.local | 2022-04-20 02:27:59.011 | info | No IPv4 address found after 5 minutes.
host.iMac-Micha.local | 2022-04-20 11:36:08.333 | info | stopInstance system.adapter.admin.0 (force=false, process=true)

internet or IP issue?

It's just an info from the testsystem, job installed on my Mac (as localhost).
Running as a localhost machine this information is normal. Internet was not a problem. I'm wondering about the adapter restart without interaction.

The adapter has a restart function.
Could you check if an when this issue happens again? Is it possible to run the adapter in debug mode to get more information about this error?

I put the adapter in debug mode. Let's see what happens when error occurs again. Will come back... otherwise I'll close the issue.

Did you get the error again?

It seems that the connection is timing out on the test system. Some times a day it seems the iMac is losing internet connection (due to what ever issue?) and the websocket also goes down. So maybe no issue at adapter (I hope).
Will close issue and test it in production environment.
Are you planning to make the adapter an official one in iobroker?

close while issue at test system