iobroker-community-adapters / ioBroker.ical

Read information from google calender and from iCal files into ioBroker.
MIT License
44 stars 32 forks source link

Error Cannot write file /UPLOAD_FILES_HERE.txt: ical.0 is not an object of type "meta" #659

Closed mac89muc closed 4 months ago

mac89muc commented 4 months ago

Hello, since two weeks my ical Adapter isn't working properly - the Log shows

2024-04-10 10:37:04.930 - debug: host.smarthome.local object change system.adapter.ical.0 (from: system.adapter.admin.0) 2024-04-10 10:37:04.930 - info: host.smarthome.local stopInstance system.adapter.ical.0 (force=false, process=false) 2024-04-10 10:37:04.930 - info: host.smarthome.local stopInstance canceled schedule system.adapter.ical.0 2024-04-10 10:37:07.971 - debug: host.smarthome.local added notifications configuration of system.adapter.ical.0 2024-04-10 10:37:07.972 - info: host.smarthome.local instance scheduled system.adapter.ical.0 0,25 3,10,19 * * * 2024-04-10 10:37:07.972 - info: host.smarthome.local instance system.adapter.ical.0 started with pid 16152 2024-04-10 10:37:08.179 - debug: ical.0 (16152) Redis Objects: Use Redis connection: 127.0.0.1:9001 2024-04-10 10:37:08.197 - debug: ical.0 (16152) Objects client ready ... initialize now 2024-04-10 10:37:08.197 - debug: ical.0 (16152) Objects create System PubSub Client 2024-04-10 10:37:08.197 - debug: ical.0 (16152) Objects create User PubSub Client 2024-04-10 10:37:08.236 - debug: ical.0 (16152) Objects client initialize lua scripts 2024-04-10 10:37:08.238 - debug: ical.0 (16152) Objects connected to redis: 127.0.0.1:9001 2024-04-10 10:37:08.266 - debug: ical.0 (16152) Redis States: Use Redis connection: 127.0.0.1:9000 2024-04-10 10:37:08.278 - debug: ical.0 (16152) States create System PubSub Client 2024-04-10 10:37:08.279 - debug: ical.0 (16152) States create User PubSub Client 2024-04-10 10:37:08.301 - debug: ical.0 (16152) States connected to redis: 127.0.0.1:9000 2024-04-10 10:37:08.319 - debug: ical.0 (16152) Plugin sentry Initialize Plugin (enabled=true) 2024-04-10 10:37:08.412 - info: ical.0 (16152) starting. Version 1.14.2 in /usr/local/iobroker/node_modules/iobroker.ical, node: v18.19.0, js-controller: 5.0.19 2024-04-10 10:37:08.496 - debug: ical.0 (16152) reading calendar from URL: https://calendar.google.com/calendar/ical/mycalendarurl2/basic.ics, color: #ff9300 2024-04-10 10:37:08.516 - debug: ical.0 (16152) reading calendar from URL: http://p111-caldav.icloud.com/published/2/mycalendarurl, color: #178de8 2024-04-10 10:37:08.518 - error: ical.0 (16152) Cannot write file /UPLOAD_FILES_HERE.txt: ical.0 is not an object of type "meta" 2024-04-10 10:37:08.518 - error: ical.0 (16152) 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(). 2024-04-10 10:37:08.545 - debug: host.smarthome.local Incoming Host message addNotification 2024-04-10 10:37:08.518 - error: ical.0 (16152) unhandled promise rejection: ical.0 is not an object of type "meta" 2024-04-10 10:37:08.545 - error: ical.0 (16152) Error: ical.0 is not an object of type "meta" at ObjectsInRedisClient.validateMetaObject (/usr/local/iobroker/node_modules/@iobroker/db-objects-redis/src/lib/objects/objectsInRedisClient.ts:842:39) at ObjectsInRedisClient.writeFile (/usr/local/iobroker/node_modules/@iobroker/db-objects-redis/src/lib/objects/objectsInRedisClient.ts:1139:13) 2024-04-10 10:37:08.545 - error: ical.0 (16152) ical.0 is not an object of type "meta" 2024-04-10 10:37:08.549 - info: ical.0 (16152) terminating 2024-04-10 10:37:08.549 - debug: ical.0 (16152) Plugin sentry destroyed 2024-04-10 10:37:08.549 - warn: ical.0 (16152) Terminated (UNCAUGHT_EXCEPTION): Without reason 2024-04-10 10:37:08.861 - debug: host.smarthome.local Incoming Host message getNotifications 2024-04-10 10:37:08.885 - debug: ical.0 (16152) Successfully cached content for calendar "https://calendar.google.com/calendar/ical/mycalendarurl2/basic.ics" as /usr/local/iobroker/node_modules/iobroker.ical/e35120f73f8e83fc03a8ee05d69a57e1 2024-04-10 10:37:08.942 - debug: ical.0 (16152) Successfully cached content for calendar "http://p111-caldav.icloud.com/published/2/mycalendarurl" as /usr/local/iobroker/node_modules/iobroker.ical/3042a2550d77731367e1c2cc0af60200 2024-04-10 10:37:09.051 - info: ical.0 (16152) terminating 2024-04-10 10:37:09.100 - error: host.smarthome.local instance system.adapter.ical.0 terminated with code 6 (UNCAUGHT_EXCEPTION) 2024-04-10 10:37:09.300 - debug: host.smarthome.local Incoming Host message getNotifications 2024-04-10 10:37:09.984 - debug: host.smarthome.local Incoming Host message getNotifications 2024-04-10 10:37:10.019 - debug: host.smarthome.local object change system.adapter.ical.0 (from: system.adapter.admin.0) 2024-04-10 10:37:10.019 - info: host.smarthome.local "system.adapter.ical.0" disabled 2024-04-10 10:37:10.019 - info: host.smarthome.local stopInstance system.adapter.ical.0 (force=false, process=false) 2024-04-10 10:37:10.019 - info: host.smarthome.local stopInstance canceled schedule system.adapter.ical.0 2024-04-10 10:37:10.776 - debug: host.smarthome.local Incoming Host message getNotifications 2024-04-10 10:37:20.630 - debug: host.smarthome.local object change system.adapter.ical.0 (from: system.adapter.admin.0) 2024-04-10 10:37:20.630 - info: host.smarthome.local stopInstance system.adapter.ical.0 (force=false, process=false) 2024-04-10 10:37:20.630 - debug: host.smarthome.local stopInstance system.adapter.ical.0 not scheduled 2024-04-10 10:37:30.916 - debug: host.smarthome.local object change system.adapter.ical.0 (from: system.adapter.admin.0) 2024-04-10 10:37:30.917 - info: host.smarthome.local "system.adapter.ical.0" enabled 2024-04-10 10:37:30.917 - info: host.smarthome.local stopInstance system.adapter.ical.0 (force=false, process=false) 2024-04-10 10:37:30.917 - debug: host.smarthome.local stopInstance system.adapter.ical.0 not scheduled 2024-04-10 10:37:33.995 - debug: host.smarthome.local added notifications configuration of system.adapter.ical.0 2024-04-10 10:37:33.997 - info: host.smarthome.local instance scheduled system.adapter.ical.0 0,25 3,10,19 * * * 2024-04-10 10:37:33.997 - info: host.smarthome.local instance system.adapter.ical.0 started with pid 17392 2024-04-10 10:37:34.206 - debug: ical.0 (17392) Redis Objects: Use Redis connection: 127.0.0.1:9001 2024-04-10 10:37:34.225 - debug: ical.0 (17392) Objects client ready ... initialize now 2024-04-10 10:37:34.225 - debug: ical.0 (17392) Objects create System PubSub Client 2024-04-10 10:37:34.226 - debug: ical.0 (17392) Objects create User PubSub Client 2024-04-10 10:37:34.267 - debug: ical.0 (17392) Objects client initialize lua scripts 2024-04-10 10:37:34.270 - debug: ical.0 (17392) Objects connected to redis: 127.0.0.1:9001 2024-04-10 10:37:34.292 - debug: ical.0 (17392) Redis States: Use Redis connection: 127.0.0.1:9000 2024-04-10 10:37:34.305 - debug: ical.0 (17392) States create System PubSub Client 2024-04-10 10:37:34.305 - debug: ical.0 (17392) States create User PubSub Client 2024-04-10 10:37:34.327 - debug: ical.0 (17392) States connected to redis: 127.0.0.1:9000 2024-04-10 10:37:34.343 - debug: ical.0 (17392) Plugin sentry Initialize Plugin (enabled=true) 2024-04-10 10:37:34.428 - info: ical.0 (17392) starting. Version 1.14.2 in /usr/local/iobroker/node_modules/iobroker.ical, node: v18.19.0, js-controller: 5.0.19 2024-04-10 10:37:34.495 - debug: ical.0 (17392) reading calendar from URL: https://calendar.google.com/calendar/ical/mycalendarurl2/basic.ics, color: #ff9300 2024-04-10 10:37:34.518 - debug: ical.0 (17392) reading calendar from URL: http://p111-caldav.icloud.com/published/2/mycalendarurl, color: #178de8 2024-04-10 10:37:34.520 - error: ical.0 (17392) Cannot write file /UPLOAD_FILES_HERE.txt: ical.0 is not an object of type "meta" 2024-04-10 10:37:34.520 - error: ical.0 (17392) 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(). 2024-04-10 10:37:34.546 - debug: host.smarthome.local Incoming Host message addNotification 2024-04-10 10:37:34.520 - error: ical.0 (17392) unhandled promise rejection: ical.0 is not an object of type "meta" 2024-04-10 10:37:34.546 - error: ical.0 (17392) Error: ical.0 is not an object of type "meta" at ObjectsInRedisClient.validateMetaObject (/usr/local/iobroker/node_modules/@iobroker/db-objects-redis/src/lib/objects/objectsInRedisClient.ts:842:39) at ObjectsInRedisClient.writeFile (/usr/local/iobroker/node_modules/@iobroker/db-objects-redis/src/lib/objects/objectsInRedisClient.ts:1139:13) 2024-04-10 10:37:34.546 - error: ical.0 (17392) ical.0 is not an object of type "meta" 2024-04-10 10:37:34.550 - info: ical.0 (17392) terminating 2024-04-10 10:37:34.550 - debug: ical.0 (17392) Plugin sentry destroyed 2024-04-10 10:37:34.550 - warn: ical.0 (17392) Terminated (UNCAUGHT_EXCEPTION): Without reason 2024-04-10 10:37:34.787 - debug: ical.0 (17392) Successfully cached content for calendar "http://p111-caldav.icloud.com/published/2/mycalendarurl" as /usr/local/iobroker/node_modules/iobroker.ical/3042a2550d77731367e1c2cc0af60200 2024-04-10 10:37:34.793 - debug: ical.0 (17392) Successfully cached content for calendar "https://calendar.google.com/calendar/ical/mycalendarurl2/basic.ics" as /usr/local/iobroker/node_modules/iobroker.ical/e35120f73f8e83fc03a8ee05d69a57e1 2024-04-10 10:37:34.875 - debug: host.smarthome.local Incoming Host message getNotifications 2024-04-10 10:37:34.900 - debug: host.smarthome.local Incoming Host message getNotifications 2024-04-10 10:37:35.053 - info: ical.0 (17392) terminating 2024-04-10 10:37:35.058 - debug: host.smarthome.local Incoming Host message getNotifications 2024-04-10 10:37:35.098 - error: host.smarthome.local instance system.adapter.ical.0 terminated with code 6 (UNCAUGHT_EXCEPTION) 2024-04-10 10:37:36.538 - debug: host.smarthome.local Incoming Host message getNotifications

Thanks in advance for your support.

Node-js 18.19.0 NPM 10.2.3 js-controller 5.0.19 tried with ical 1.14.3 & 1.14.2 - same error os macOS 14.4.1 Sonoma on Mac mini M2

klein0r commented 4 months ago

That's strange. The meta object should be created automatically:

https://github.com/iobroker-community-adapters/ioBroker.ical/blob/4b5ec8fc753fd5a88adf479f3fcc445c3aaa2030/io-package.json#L216-L237

Can you check if the object doesn't exist in the object tab?

mac89muc commented 4 months ago

@klein0r

Looks similar in /usr/local/iobroker/node_modules/iobroker.ical/io-package.json


"instanceObjects": [ { "_id": "", "type": "meta", "common": { "name": { "en": "Meta storage for user files", "de": "Meta-Speicher für Benutzerdateien", "ru": "Meta Storage для файлов пользователей", "pt": "Meta de armazenamento para arquivos de usuário", "nl": "Meta opslag voor gebruikersbestanden", "fr": "Stockage Meta pour les fichiers utilisateur", "it": "Meta storage per i file utente", "es": "Meta almacenamiento para archivos de usuario", "pl": "Meta storage for user files", "uk": "Зберігання мета для файлів користувачів", "zh-cn": "用户档案的储存" }, "type": "meta.user" }, "native": {} },


maybe something to do with my iob macOS installation - not the usual linux ??? Or do you mean under the objects tab in the iob webinterface?

image

klein0r commented 4 months ago

Or do you mean under the objects tab in the iob webinterface?

I mean the real existing object in the database. And it looks like that's not existent in your installation. Can you share the instance object system.adapter.ical.0 (or check if the meta attribute is defined there)?

mac89muc commented 4 months ago

seems it's missing... something to do with macOS?

image

klein0r commented 4 months ago

seems it's missing...

The screenshot shows the instance object in the second line. Just open it and check the instanceObjects.

mac89muc commented 4 months ago

in the mentioned second line there's no "type": "meta.user"

image

but in the first line (system.adapter.ical) it exists

image

klein0r commented 4 months ago

That's strange. Please upload the adapter again (via adapters tab or iobroker upload ical). Does that work without any errors? Please share the output

mac89muc commented 4 months ago

@klein0r 👍🏻 seems to work properly now - no log errors.

Danke für den schnellen Support Gruß

klein0r commented 4 months ago

seems to work properly now

The big question is, why the automatic upload (which is executed after every adapter update) wasn't working