DrozmotiX/ioBroker.esphome

Adapter failed to start after updating to 0.3.1+

Closed this issue ยท 9 comments

Describe the bug
After Updating to 0.3.1 and even 0.3.2 an exception occur when starting the instance.

To Reproduce
Steps to reproduce the behavior:

  1. Starting the adapter failed after Update

Expected behavior
Instance should start without exceptions.

Screenshots & Logfiles

<!--StartFragment-->

host.raspberrypi | 2023-11-02 11:32:37.441 | info | Rebuild for adapter system.adapter.esphome.0 not successful in 3 tries. Adapter will not be restarted again. Please execute "npm install --production" in adapter directory manually.
-- | -- | -- | --
host.raspberrypi | 2023-11-02 11:32:37.441 | error | instance system.adapter.esphome.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
host.raspberrypi | 2023-11-02 11:32:37.441 | error | Caught by controller[1]: at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
host.raspberrypi | 2023-11-02 11:32:37.441 | error | Caught by controller[1]: at Function.Module._load (node:internal/modules/cjs/loader:960:12)
host.raspberrypi | 2023-11-02 11:32:37.441 | error | Caught by controller[1]: at Module.load (node:internal/modules/cjs/loader:1119:32)
host.raspberrypi | 2023-11-02 11:32:37.440 | error | Caught by controller[1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
host.raspberrypi | 2023-11-02 11:32:37.440 | error | Caught by controller[1]: at Module._compile (node:internal/modules/cjs/loader:1256:14)
host.raspberrypi | 2023-11-02 11:32:37.440 | error | Caught by controller[1]: at Object.<anonymous> (/opt/iobroker/node_modules/@mongodb-js/zstd/index.js:131:29)
host.raspberrypi | 2023-11-02 11:32:37.440 | error | Caught by controller[1]: at require (node:internal/modules/cjs/helpers:119:18)
host.raspberrypi | 2023-11-02 11:32:37.440 | error | Caught by controller[1]: at Module.require (node:internal/modules/cjs/loader:1143:19)
host.raspberrypi | 2023-11-02 11:32:37.440 | error | Caught by controller[1]: at Function.Module._load (node:internal/modules/cjs/loader:922:27)
host.raspberrypi | 2023-11-02 11:32:37.439 | error | Caught by controller[1]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
host.raspberrypi | 2023-11-02 11:32:37.439 | error | Caught by controller[1]: - /opt/iobroker/node_modules/@mongodb-js/zstd/index.js
host.raspberrypi | 2023-11-02 11:32:37.439 | error | Caught by controller[1]: Require stack:
host.raspberrypi | 2023-11-02 11:32:37.439 | error | Caught by controller[1]: Error: Cannot find module '@mongodb-js/zstd-linux-arm-gnueabihf'
host.raspberrypi | 2023-11-02 11:32:37.438 | error | Caught by controller[0]: 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(). The promise rejected with the reason:
esphome.0 | 2023-11-02 11:32:36.808 | warn | Terminated (UNCAUGHT_EXCEPTION): Without reason
esphome.0 | 2023-11-02 11:32:36.807 | debug | Plugin sentry destroyed
esphome.0 | 2023-11-02 11:32:36.806 | info | terminating
esphome.0 | 2023-11-02 11:32:36.805 | debug | {}
esphome.0 | 2023-11-02 11:32:36.769 | error | Exception-Code: MODULE_NOT_FOUND: Cannot find module '@mongodb-js/zstd-linux-arm-gnueabihf' Require stack: - /opt/iobroker/node_modules/@mongodb-js/zstd/index.js
esphome.0 | 2023-11-02 11:32:36.768 | error | Error: Cannot find module '@mongodb-js/zstd-linux-arm-gnueabihf' Require stack: - /opt/iobroker/node_modules/@mongodb-js/zstd/index.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Function.Module._load (node:internal/modules/cjs/loader:922:27) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:119:18) at Object.<anonymous> (/opt/iobroker/node_modules/@mongodb-js/zstd/index.js:131:29) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Function.Module._load (node:internal/modules/cjs/loader:960:12) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
esphome.0 | 2023-11-02 11:32:36.752 | error | unhandled promise rejection: Cannot find module '@mongodb-js/zstd-linux-arm-gnueabihf' Require stack: - /opt/iobroker/node_modules/@mongodb-js/zstd/index.js
esphome.0 | 2023-11-02 11:32:36.750 | 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().
esphome.0 | 2023-11-02 11:32:36.744 | error | [espHomeDashboard] Error: Cannot find module '@mongodb-js/zstd-linux-arm-gnueabihf' Require stack: - /opt/iobroker/node_modules/@mongodb-js/zstd/index.js
esphome.0 | 2023-11-02 11:32:36.491 | info | Native Integration of ESPHome Dashboard enabled
esphome.0 | 2023-11-02 11:32:36.479 | info | Auto Discovery startet, new devices (or IP changes) will be detected automatically
esphome.0 | 2023-11-02 11:32:36.475 | debug | trying to connect to 192.168.xxx.xxx
esphome.0 | 2023-11-02 11:32:36.470 | info | Try to connect to 192.168.xxx.xxx
esphome.0 | 2023-11-02 11:32:36.229 | info | starting. Version 0.3.2 in /opt/iobroker/node_modules/iobroker.esphome, node: v18.18.2, js-controller: 5.0.16
esphome.0 | 2023-11-02 11:32:35.692 | debug | Plugin sentry Initialize Plugin (enabled=true)
host.raspberrypi | 2023-11-02 11:32:33.207 | info | instance system.adapter.esphome.0 started with pid 527

<!--EndFragment-->

Versions:

  • Adapter version: 0.3.2
  • JS-Controller version: 5.0.16
  • Node version: 18.18.2
  • Operating system: linux

it looks like your installation was not fully completed, do you want to use the ESPHome Dashboard in ioBroker or does it already run as a separate installation

i use the including dashboard within ioBroker?

I will try to drop the adapter and head back to you.

Thanks for the quick response.

Thanks, reinstalling did it.. Maybe after upgrading inbetween to node 18 missed something.. Reinstalling worked...

unfortunatly i had to reopen the issue.. I forgot to activate the integrated DashBoard. When activate the integrated Dashboard the Error occur (even after a clean / fresh reinstall)

unfortunatly i had to reopen the issue.. I forgot to activate the integrated DashBoard. When activate the integrated Dashboard the Error occur (even after a clean / fresh reinstall)

what kind of linux system are u using ?

It's Raspbian 10 (Buster) on an Raspberry Pi 4

It's Raspbian 10 (Buster) on an Raspberry Pi 4

time bot update, Debian 10 is quite outdated and a lot of packages (also NodeJS 18) are not compatible anymore with that contribution.
My advice is to update your release too bookworm.

As soon my time allows, hopefully today, I can create and Debian 10 & 12 (bookworm) LXC and see if the issue is related here (I assume so for python dependencies)

It's Raspbian 10 (Buster) on an Raspberry Pi 4

did you have any chance to update your system and check ?

unfortunatly not yet.. i keep in mind to setup an working installation. For now lets close that issue