NEWS
Javascript 8.7.6 Fehlermeldungen nach Update
-
Hallo!
Nach dem Update auf Javascript 8.7.6 bekomme ich laufend Fehlermeldungen!
Betrifft bei mir sehr viele Scripte, welche eigentlich alle mit Blockly ausgeführt werden.Mein System: Proxmox 8.2.4 LXC Container
IOB auf Ubuntu 24.04.1
js-controller: 6.0.11
Node.js: 20.17.0
Alle Adapter aktuell
Javascript: 8.7.6Im Javascript Adapter sind folgende zusätzlichen NPM-Module eingetragen: moment, moment-timezone, moment-duration-format
Ein Auszug meiner Fehlermeldungen:
javascript.0 | 2024-08-31 18:31:00.107 | error | script.js.common.Homeautomatik.Abends_weg: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Abends_weg:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) -- | -- | -- | -- javascript.0 | 2024-08-31 18:31:00.104 | error | script.js.common.Homeautomatik.Energie: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Energie:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.100 | error | script.js.common.Homeautomatik.Flood_71_auswerten: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Flood_71_auswerten:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.094 | error | script.js.common.Homeautomatik.Infomeldungen: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Infomeldungen:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.090 | error | script.js.common.Homeautomatik.Mainswitch: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Mainswitch:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.087 | error | script.js.common.Homeautomatik.PV: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.PV:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.083 | error | script.js.common.Homeautomatik.Poolpumpensteuerung: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Poolpumpensteuerung:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.079 | error | script.js.common.Homeautomatik.Rollo_Info_Telegram: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Rollo_Info_Telegram:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.077 | error | script.js.common.Homeautomatik.Shelly_Buttons: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Shelly_Buttons:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.074 | error | script.js.common.Homeautomatik.Sonne: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Sonne:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.073 | error | script.js.common.Homeautomatik.Stromverbrauch: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Stromverbrauch:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.071 | error | script.js.common.Homeautomatik.Stromverbrauch_HT_NT: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Stromverbrauch_HT_NT:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.069 | error | script.js.common.Homeautomatik.Szene_Abends_weg_: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Szene_Abends_weg_:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.067 | error | script.js.common.Homeautomatik.Taster_Wohnzimmer_LED: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Taster_Wohnzimmer_LED:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) javascript.0 | 2024-08-31 18:31:00.065 | error | script.js.common.Homeautomatik.Telegram_Energie: [adapterStatus] error: moment.duration(...).format is not a function, stack: TypeError: moment.duration(...).format is not a function at Object.adapterStatus (script.js.common.Homeautomatik.Telegram_Energie:216:115) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1876:34) at Job.invoke (/opt/iobroker/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)
iob diag ergibt folgendes:
======================= SUMMARY ======================= v.2024-05-22 Static hostname: iobroker Icon name: computer-container Chassis: container ☐ Virtualization: lxc Operating System: Ubuntu 24.04.1 LTS Kernel: Linux 6.8.12-1-pve Architecture: x86-64 Installation: lxc Kernel: x86_64 Userland: 64 bit Timezone: Europe/Vienna (CEST, +0200) User-ID: 1000 Display-Server: true Boot Target: graphical.target Pending OS-Updates: 0 Pending iob updates: 0 Nodejs-Installation: /usr/bin/nodejs v20.17.0 /usr/bin/node v20.17.0 /usr/bin/npm 10.8.2 /usr/bin/npx 10.8.2 /usr/bin/corepack 0.29.3 Recommended versions are nodejs 20.17.0 and npm 10.8.2 Your nodejs installation is correct MEMORY: total used free shared buff/cache available Mem: 8.6G 3.6G 785M 12M 4.2G 5.0G Swap: 536M 200K 536M Total: 9.1G 3.6G 1.3G Active iob-Instances: 35 Upgrade policy: none ioBroker Core: js-controller 6.0.11 admin 7.0.23 ioBroker Status: iobroker is running on this host. Objects type: jsonl States type: redis Status admin and web instance: + system.adapter.admin.0 : admin : iobroker - enabled, port: 8081, bind: 0.0.0.0, run as: admin + system.adapter.web.0 : web : iobroker - enabled, port: 8082, bind: 10.0.0.20, run as: admin + system.adapter.web.1 : web : iobroker - enabled, port: 20002, bind: 0.0.0.0, run as: admin Objects: 21259 States: 18329 Size of iob-Database: 36M /opt/iobroker/iobroker-data/objects.jsonl 228K /opt/iobroker/iobroker-data/states.jsonl =================== END OF SUMMARY ====================
Hat jemand das selbe Problem und dafür eine Lösung?
-
@worxweis sagte in (blabla):
Hat jemand das selbe Problem und dafür eine Lösung?
Ob Du bitte wohl den Titel anpassen würdest ??!!
edit: EmailAdressen haben da nix verloren !!
-
-
@homoran Sorry, war ein versehen und nicht beabsichtigt. Aber in den Antworten kann man di immer noch sehen, kannst du die da auch noch rausnehmen!
Danke!
-
@homoran In deiner Antwort bitte auch noch entfernen! Danke!
-
@worxweis erledigt
-
@worxweis sagte in Javascript 8.7.6 Fehlermeldungen nach Update:
Im Javascript Adapter sind folgende zusätzlichen NPM-Module eingetragen: moment, moment-timezone, moment-duration-format
Ob da vll @haus-automatisierung einen Tip geben kann ?
edit: sorry @Negalein was hast Du in meinem Beitrag eben rumeditiert ohne es zu markieren ??
edit edit: ja, ich denke die email vom TE entfernt
-
-
-
Hab mich zu früh gefreut!
Habe die Zeile im Script ergänzt. meine Fehlermeldungen mit moment.duration format is not a function ist jetzt weg.
Dafür bekomme ich als Beispiel die Fehler für jedes Script das ich habe:javascript.0 2024-09-01 07:08:40.199 error at Script.runInContext (node:vm:148:12) javascript.0 2024-09-01 07:08:40.199 error at script.js.common.Homeautomatik.Rauchmelder:18:3 javascript.0 2024-09-01 07:08:40.199 error at script.js.common.Homeautomatik.Rauchmelder:3:1 javascript.0 2024-09-01 07:08:40.199 error script.js.common.Homeautomatik.Rauchmelder: ReferenceError: Cannot access 'momentDurationFormatSetup' before initialization
und die Scripte werden nicht abgearbeitet. Ich habe jetzt das view-adapter-status script angehalten, dann funktioniert alles.
Irgendeine Erklärung dafür? -
@worxweis said in Javascript 8.7.6 Fehlermeldungen nach Update:
Im Javascript Adapter sind folgende zusätzlichen NPM-Module eingetragen: moment, moment-timezone, moment-duration-format
Ich hatte diese Meldungen auch. Ein keinem meiner Scripte musste ich zur Lösung zusätzlichen Code eingeben.
Lösch diese neuen Zeile(n) wieder aus deinem Script und sorge nur dafür, dass Du diese eingetragenen NPM-Module aus dem Javascript-Adapter löschst.
Der Adapter ist nun selbst in der Lage, die "required"-Module zu laden, wenn sie so im Script definiert sind.
Das kann man auch im Log sehen. -
Danke für den Vorschlag, aber das bringt keine Änderung. Die Fehler treten trotzdem auf.