congatudo / Congatudo

Cloud replacement for Conga vacuum robots enabling local-only operation
https://congatudo.cloud
Apache License 2.0
77 stars 23 forks source link

Container shutdown on fresh install #59

Closed morenod closed 1 year ago

morenod commented 1 year ago
[2023-03-05T18:59:09.463Z] [ERROR] Uncaught Exception {
  err: TypeError: Cannot read properties of null (reading 'dimensions')
      at CecotecCongaRobot.mapArrayToMatrix (/snapshot/app/backend/lib/robots/cecotec/CecotecCongaRobot.js:457:19)
      at CecotecCongaRobot.onUpdateMap (/snapshot/app/backend/lib/robots/cecotec/CecotecCongaRobot.js:693:73)
      at Robot.<anonymous> (/snapshot/app/backend/lib/robots/cecotec/CecotecCongaRobot.js:236:25)
      at Robot.emit (node:events:537:28)
      at Robot.handleMapUpdate (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:898:10)
      at Robot.handleMessage (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:993:7)
      at CloudServer.handleMessage (/snapshot/app/node_modules/@agnoc/core/lib/emitters/cloud-server.emitter.js:110:13)
      at Connection.<anonymous> (/snapshot/app/node_modules/@agnoc/core/lib/emitters/cloud-server.emitter.js:127:12)
      at Connection.emit (node:events:549:35)
      at Connection.handlePacket (/snapshot/app/node_modules/@agnoc/core/lib/emitters/connection.emitter.js:90:10),
  origin: 'uncaughtException'
}
# systemctl restart container-valetudo.service
Mar 05 20:00:51 hostname systemd[1]: Starting container-valetudo.service - Podman container-valetudo.service...
Mar 05 20:00:51 hostname podman[56853]: 2023-03-05 20:00:51.703821967 +0100 CET m=+0.180522416 container create 4c549e6a327de0a63e29aabcd84633b0ac96fe77006c14962d6e3d4628cdbf9e (image=ghcr.io/congatudo/congatudo:alpine-latest, name=valetudo, io.containers.autoupdate=registry, PODMAN_SYSTEMD_UNIT=container-valetudo.service)
[root@nuc ~]# Mar 05 20:00:52 hostname podman[56853]: 2023-03-05 20:00:52.114921296 +0100 CET m=+0.591621739 container init 4c549e6a327de0a63e29aabcd84633b0ac96fe77006c14962d6e3d4628cdbf9e (image=ghcr.io/congatudo/congatudo:alpine-latest, name=valetudo, io.containers.autoupdate=registry, PODMAN_SYSTEMD_UNIT=container-valetudo.service)
Mar 05 20:00:52 hostname podman[56853]: 2023-03-05 20:00:52.124702783 +0100 CET m=+0.601403233 container start 4c549e6a327de0a63e29aabcd84633b0ac96fe77006c14962d6e3d4628cdbf9e (image=ghcr.io/congatudo/congatudo:alpine-latest, name=valetudo, io.containers.autoupdate=registry, PODMAN_SYSTEMD_UNIT=container-valetudo.service)
Mar 05 20:00:52 hostname systemd[1]: Started container-valetudo.service - Podman container-valetudo.service.
Mar 05 20:00:52 hostname audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=container-valetudo comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 05 20:00:53 hostname valetudo[57031]: [2023-03-05T19:00:53.896Z] [INFO] Loading configuration file: /etc/valetudo/config.json
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.132Z] [INFO] Set Logfile to /tmp/valetudo.log
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.145Z] [INFO] Starting Valetudo 2023.03
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.146Z] [INFO] Commit ID: a51980f18e5e526463eb5111e70b8c3453428842
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.146Z] [INFO] Configuration file: /etc/valetudo/config.json
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.146Z] [INFO] Logfile: /tmp/valetudo.log
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.147Z] [INFO] Robot: Cecotec Conga (CecotecCongaRobot)
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.147Z] [INFO] JS Runtime Version: v18.5.0
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.147Z] [INFO] Arch: x64
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.148Z] [INFO] Max Heap Size: 64 MiB
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.148Z] [INFO] Node Flags: --expose-gc --max-heap-size=64
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.151Z] [INFO] Autogenerated System ID: AcidicFrankHeron
Mar 05 20:00:54 hostname valetudo[57031]: [2023-03-05T19:00:54.155Z] [INFO] Not starting NetworkAdvertisementManager because we're not in embedded mode
Mar 05 20:00:56 hostname valetudo[57031]: [2023-03-05T19:00:56.227Z] [INFO] Webserver running on port 8080
Mar 05 20:00:59 hostname valetudo[57031]: [2023-03-05T19:00:59.812Z] [INFO] Added new robot with id '8031'
Mar 05 20:01:09 hostname valetudo[57031]: [2023-03-05T19:01:09.473Z] [ERROR] Uncaught Exception {
Mar 05 20:01:09 hostname valetudo[57031]:   err: TypeError: Cannot read properties of null (reading 'dimensions')
Mar 05 20:01:09 hostname valetudo[57031]:       at CecotecCongaRobot.mapArrayToMatrix (/snapshot/app/backend/lib/robots/cecotec/CecotecCongaRobot.js:457:19)
Mar 05 20:01:09 hostname valetudo[57031]:       at CecotecCongaRobot.onUpdateMap (/snapshot/app/backend/lib/robots/cecotec/CecotecCongaRobot.js:693:73)
Mar 05 20:01:09 hostname valetudo[57031]:       at Robot.<anonymous> (/snapshot/app/backend/lib/robots/cecotec/CecotecCongaRobot.js:236:25)
Mar 05 20:01:09 hostname valetudo[57031]:       at Robot.emit (node:events:537:28)
Mar 05 20:01:09 hostname valetudo[57031]:       at Robot.handleMapUpdate (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:898:10)
Mar 05 20:01:09 hostname valetudo[57031]:       at Robot.handleMessage (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:993:7)
Mar 05 20:01:09 hostname valetudo[57031]:       at CloudServer.handleMessage (/snapshot/app/node_modules/@agnoc/core/lib/emitters/cloud-server.emitter.js:110:13)
Mar 05 20:01:09 hostname valetudo[57031]:       at Connection.<anonymous> (/snapshot/app/node_modules/@agnoc/core/lib/emitters/cloud-server.emitter.js:127:12)
Mar 05 20:01:09 hostname valetudo[57031]:       at Connection.emit (node:events:549:35)
Mar 05 20:01:09 hostname valetudo[57031]:       at Connection.handlePacket (/snapshot/app/node_modules/@agnoc/core/lib/emitters/connection.emitter.js:90:10),
Mar 05 20:01:09 hostname valetudo[57031]:   origin: 'uncaughtException'
Mar 05 20:01:09 hostname valetudo[57031]: }
Mar 05 20:01:09 hostname valetudo[57031]: [2023-03-05T19:01:09.478Z] [INFO] Valetudo shutdown in progress...
Mar 05 20:01:09 hostname valetudo[57031]: [2023-03-05T19:01:09.511Z] [INFO] Valetudo shutdown done
Mar 05 20:01:09 hostname valetudo[57031]: [2023-03-05T19:01:09.512Z] [INFO] exiting with code 0...
Mar 05 20:01:09 hostname podman[57094]: 2023-03-05 20:01:09.609142356 +0100 CET m=+0.052457765 container died 4c549e6a327de0a63e29aabcd84633b0ac96fe77006c14962d6e3d4628cdbf9e (image=ghcr.io/congatudo/congatudo:alpine-latest, name=valetudo, PODMAN_SYSTEMD_UNIT=container-valetudo.service, io.containers.autoupdate=registry)
Mar 05 20:01:09 hostname podman[57094]: 2023-03-05 20:01:09.95771394 +0100 CET m=+0.401029332 container cleanup 4c549e6a327de0a63e29aabcd84633b0ac96fe77006c14962d6e3d4628cdbf9e (image=ghcr.io/congatudo/congatudo:alpine-latest, name=valetudo, PODMAN_SYSTEMD_UNIT=container-valetudo.service, io.containers.autoupdate=registry)
Mar 05 20:01:10 hostname podman[57236]: 2023-03-05 20:01:10.037250238 +0100 CET m=+0.052975034 container cleanup 4c549e6a327de0a63e29aabcd84633b0ac96fe77006c14962d6e3d4628cdbf9e (image=ghcr.io/congatudo/congatudo:alpine-latest, name=valetudo, io.containers.autoupdate=registry, PODMAN_SYSTEMD_UNIT=container-valetudo.service)
Mar 05 20:01:10 hostname podman[57246]: 2023-03-05 20:01:10.168795716 +0100 CET m=+0.092145149 container remove 4c549e6a327de0a63e29aabcd84633b0ac96fe77006c14962d6e3d4628cdbf9e (image=ghcr.io/congatudo/congatudo:alpine-latest, name=valetudo, PODMAN_SYSTEMD_UNIT=container-valetudo.service, io.containers.autoupdate=registry)
Mar 05 20:01:10 hostname systemd[1]: container-valetudo.service: Deactivated successfully.
Mar 05 20:01:10 hostname audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=container-valetudo comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
# cat valetudo/config.json
{
  "embedded": false,
  "robot": {
    "implementation": "CecotecCongaRobot",
    "implementationSpecificConfig": {
      "ip": "192.168.0.4"
    }
  },
  "webserver": {
    "port": 8080,
    "basicAuth": {
      "enabled": false,
      "username": "valetudo",
      "password": "valetudo"
    },
    "blockExternalAccess": true
  },
  "mqtt": {
    "enabled": false,
    "connection": {
      "host": "192.168.0.2",
      "port": 1883,
      "tls": {
        "enabled": false,
        "ca": "",
        "ignoreCertificateErrors": false
      },
      "authentication": {
        "credentials": {
          "enabled": true,
          "username": "conga",
          "password": "conga"
        },
        "clientCertificate": {
          "enabled": false,
          "certificate": "",
          "key": ""
        }
      }
    },
    "identity": {
      "identifier": "conga"
    },
    "interfaces": {
      "homie": {
        "enabled": true,
        "addICBINVMapProperty": false,
        "cleanAttributesOnShutdown": false
      },
      "homeassistant": {
        "enabled": true,
        "cleanAutoconfOnShutdown": false
      }
    },
    "customizations": {
      "topicPrefix": "",
      "provideMapData": true
    },
    "optionalExposedCapabilities": []
  },
  "ntpClient": {
    "enabled": true,
    "server": "pool.ntp.org",
    "port": 123,
    "interval": 28800000,
    "timeout": 10000
  },
  "timers": {},
  "logLevel": "info",
  "debug": {
    "debugHassAnchors": false,
    "storeRawFDSUploads": false
  },
  "networkAdvertisement": {
    "enabled": true
  },
  "updater": {
    "enabled": true,
    "updateProvider": {
      "type": "github",
      "implementationSpecificConfig": {}
    }
  },
  "oobe": {
    "welcomeDialogDismissed": false
  },
  "valetudo": {
    "customizations": {
      "friendlyName": "Conga"
    }
  }
}
elraro commented 1 year ago

Hi @morenod .

Conga model? Creating a new map?

morenod commented 1 year ago

3090

No map created

Error shutdowns the container just after start the process, without any command or robot interaction

elraro commented 1 year ago

I think the problem is a empty map.

I need to add a check. Give me a few days.

elraro commented 1 year ago

@morenod can you try the nightly build? https://github.com/congatudo/Congatudo/pkgs/container/congatudo-nightly

morenod commented 1 year ago

Same error:

# podman ps | grep congatudo
ad4463c1efb1  ghcr.io/congatudo/congatudo-nightly:alpine-latest  dumb-init valetud...  5 seconds ago  Up 5 seconds ago  0.0.0.0:4010->4010/tcp, 0.0.0.0:4030->4030/tcp, 0.0.0.0:4050->4050/tcp, 0.0.0.0:8080->8080/tcp  valetudo
# podman logs -f valetudo
[2023-03-07T09:25:14.714Z] [INFO] Loading configuration file: /etc/valetudo/config.json
[2023-03-07T09:25:14.874Z] [INFO] Set Logfile to /tmp/valetudo.log
[2023-03-07T09:25:14.881Z] [INFO] Starting Valetudo 2023.03
[2023-03-07T09:25:14.881Z] [INFO] Commit ID: 14d9161cdef0c5a08a917a8c61c360ec096918b3
[2023-03-07T09:25:14.881Z] [INFO] Configuration file: /etc/valetudo/config.json
[2023-03-07T09:25:14.881Z] [INFO] Logfile: /tmp/valetudo.log
[2023-03-07T09:25:14.882Z] [INFO] Robot: Cecotec Conga (CecotecCongaRobot)
[2023-03-07T09:25:14.882Z] [INFO] JS Runtime Version: v18.5.0
[2023-03-07T09:25:14.882Z] [INFO] Arch: x64
[2023-03-07T09:25:14.882Z] [INFO] Max Heap Size: 256 MiB
[2023-03-07T09:25:14.882Z] [INFO] Node Flags: --expose-gc --max-heap-size=256
[2023-03-07T09:25:14.885Z] [INFO] Autogenerated System ID: ImmenseElasticSheep
[2023-03-07T09:25:15.021Z] [INFO] Not starting NetworkAdvertisementManager because we're not in embedded mode
[2023-03-07T09:25:16.862Z] [INFO] Webserver running on port 8080
[2023-03-07T09:25:16.880Z] [INFO] Connected successfully to MQTT broker
[2023-03-07T09:25:16.933Z] [INFO] MQTT configured
[2023-03-07T09:25:20.765Z] [INFO] Added new robot with id '14732'
[2023-03-07T09:25:30.910Z] [ERROR] Uncaught Exception {
  err: TypeError: Cannot read properties of null (reading 'dimensions')
      at CecotecCongaRobot.mapArrayToMatrix (/snapshot/app/backend/lib/robots/cecotec/CecotecCongaRobot.js:453:19)
      at CecotecCongaRobot.onUpdateMap (/snapshot/app/backend/lib/robots/cecotec/CecotecCongaRobot.js:696:73)
      at Robot.<anonymous> (/snapshot/app/backend/lib/robots/cecotec/CecotecCongaRobot.js:236:25)
      at Robot.emit (node:events:537:28)
      at Robot.handleMapUpdate (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:898:10)
      at Robot.handleMessage (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:993:7)
      at CloudServer.handleMessage (/snapshot/app/node_modules/@agnoc/core/lib/emitters/cloud-server.emitter.js:110:13)
      at Connection.<anonymous> (/snapshot/app/node_modules/@agnoc/core/lib/emitters/cloud-server.emitter.js:127:12)
      at Connection.emit (node:events:549:35)
      at Connection.handlePacket (/snapshot/app/node_modules/@agnoc/core/lib/emitters/connection.emitter.js:90:10),
  origin: 'uncaughtException'
}
[2023-03-07T09:25:30.917Z] [INFO] Valetudo shutdown in progress...
[2023-03-07T09:25:30.980Z] [INFO] Disconnecting from the MQTT Broker...
[2023-03-07T09:25:30.984Z] [INFO] Successfully disconnected from the MQTT Broker
[2023-03-07T09:25:33.682Z] [INFO] Valetudo shutdown done
[2023-03-07T09:25:33.682Z] [INFO] exiting with code 0...
elraro commented 1 year ago

Hi @morenod wait to the nightly builds and try again tomorrow. Thanks!

elraro commented 1 year ago

Solved with commit 337aa5bf389350e28a6bbbf060d517754c11304c and confirmed by @morenod