Outlook- und office365-Kalender: Bad request - HTTP-Status 400
ammawel opened this issue · comments
Seit einigen Tagen funktioniert der Adapter nicht mehr mit Kalendern von Microsoft.
Sowohl outlook.com- als auch office365-Kalender liefern ohne vorherige Änderungen "HTTP-Status 400" mit "bad request". Ein Abruf der ics-Dateien mit verschiedenen Browsern und Endgeräten funktioniert einwandfrei.
Ein Neustart von iobroker und raspberry brachten keinen Erfolg.
Vielen Dank für Hilfe,
Achim
Link zum Beitrag im Forum: https://forum.iobroker.net/topic/55519/ical-outlook-live-com-bad-request
Log-Auszug:
2022-06-10 11:49:42.188 - [34mdebug[39m: ical.0 (17129) Redis Objects: Use Redis connection: 127.0.0.1:9001
2022-06-10 11:49:42.301 - [34mdebug[39m: ical.0 (17129) Objects client ready ... initialize now
2022-06-10 11:49:42.305 - [34mdebug[39m: ical.0 (17129) Objects create System PubSub Client
2022-06-10 11:49:42.308 - [34mdebug[39m: ical.0 (17129) Objects create User PubSub Client
2022-06-10 11:49:42.486 - [34mdebug[39m: ical.0 (17129) Objects client initialize lua scripts
2022-06-10 11:49:42.504 - [34mdebug[39m: ical.0 (17129) Objects connected to redis: 127.0.0.1:9001
2022-06-10 11:49:42.510 - [35msilly[39m: ical.0 (17129) redis psubscribe cfg.o.system.user.*
2022-06-10 11:49:42.570 - [35msilly[39m: ical.0 (17129) redis psubscribe cfg.o.enum.*
2022-06-10 11:49:42.584 - [35msilly[39m: ical.0 (17129) objectDB connected
2022-06-10 11:49:42.591 - [34mdebug[39m: ical.0 (17129) Redis States: Use Redis connection: 127.0.0.1:9000
2022-06-10 11:49:42.650 - [34mdebug[39m: ical.0 (17129) States create System PubSub Client
2022-06-10 11:49:42.653 - [34mdebug[39m: ical.0 (17129) States create User PubSub Client
2022-06-10 11:49:42.778 - [34mdebug[39m: ical.0 (17129) States connected to redis: 127.0.0.1:9000
2022-06-10 11:49:42.780 - [35msilly[39m: ical.0 (17129) statesDB connected
2022-06-10 11:49:43.176 - [34mdebug[39m: ical.0 (17129) Plugin sentry Initialize Plugin (enabled=true)
2022-06-10 11:49:44.137 - [32minfo[39m: ical.0 (17129) starting. Version 1.12.2 in /opt/iobroker/node_modules/iobroker.ical, node: v14.19.3, js-controller: 4.0.23
2022-06-10 11:49:44.212 - [35msilly[39m: ical.0 (17129) States system redis pmessage system.adapter.ical.0.logLevel/system.adapter.ical.0.logLevel:{"val":"silly","ack":true,"ts":1654854584190,"q":0,"from":"system.adapter.ical.0","lc":1654854534623}
2022-06-10 11:49:44.282 - [34mdebug[39m: ical.0 (17129) reading calendar from URL: https://outlook.live.com/owa/calendar/xxx/xxx/cid-xxx/calendar.ics, color: #000000
2022-06-10 11:49:44.672 - [33mwarn[39m: ical.0 (17129) Error reading from URL "https://outlook.live.com/owa/calendar/xxx/xxx/cid-xxx/calendar.ics": Server responded HTTP-Statuscode=400: Bad Request
2022-06-10 11:49:44.674 - [33mwarn[39m: ical.0 (17129) Error reading "https://outlook.live.com/owa/calendar/xxx/xxx/cid-xxx/calendar.ics": Cannot read URL: "https://outlook.live.com/owa/calendar/xxx/xxx/cid-xxx/calendar.ics" HTTP-Status 400
2022-06-10 11:49:44.676 - [32minfo[39m: ical.0 (17129) All calenders could not be processed, Do not clean up events
2022-06-10 11:49:49.693 - [34mdebug[39m: ical.0 (17129) Plugin sentry destroyed
2022-06-10 11:49:49.694 - [32minfo[39m: ical.0 (17129) Terminated (NO_ERROR): Without reason
2022-06-10 11:50:40.767 - [34mdebug[39m: ical.1 (17190) Redis Objects: Use Redis connection: 127.0.0.1:9001
2022-06-10 11:50:40.874 - [34mdebug[39m: ical.1 (17190) Objects client ready ... initialize now
2022-06-10 11:50:40.878 - [34mdebug[39m: ical.1 (17190) Objects create System PubSub Client
2022-06-10 11:50:40.881 - [34mdebug[39m: ical.1 (17190) Objects create User PubSub Client
2022-06-10 11:50:41.043 - [34mdebug[39m: ical.1 (17190) Objects client initialize lua scripts
2022-06-10 11:50:41.056 - [34mdebug[39m: ical.1 (17190) Objects connected to redis: 127.0.0.1:9001
2022-06-10 11:50:41.063 - [35msilly[39m: ical.1 (17190) redis psubscribe cfg.o.system.user.*
2022-06-10 11:50:41.124 - [35msilly[39m: ical.1 (17190) redis psubscribe cfg.o.enum.*
2022-06-10 11:50:41.138 - [35msilly[39m: ical.1 (17190) objectDB connected
2022-06-10 11:50:41.143 - [34mdebug[39m: ical.1 (17190) Redis States: Use Redis connection: 127.0.0.1:9000
2022-06-10 11:50:41.193 - [34mdebug[39m: ical.1 (17190) States create System PubSub Client
2022-06-10 11:50:41.196 - [34mdebug[39m: ical.1 (17190) States create User PubSub Client
2022-06-10 11:50:41.328 - [34mdebug[39m: ical.1 (17190) States connected to redis: 127.0.0.1:9000
2022-06-10 11:50:41.330 - [35msilly[39m: ical.1 (17190) statesDB connected
2022-06-10 11:50:41.698 - [34mdebug[39m: ical.1 (17190) Plugin sentry Initialize Plugin (enabled=true)
2022-06-10 11:50:41.700 - [32minfo[39m: ical.1 (17190) Plugin sentry Sentry Plugin disabled for this process because data reporting is disabled on instance
2022-06-10 11:50:42.412 - [32minfo[39m: ical.1 (17190) starting. Version 1.12.2 in /opt/iobroker/node_modules/iobroker.ical, node: v14.19.3, js-controller: 4.0.23
2022-06-10 11:50:42.491 - [35msilly[39m: ical.1 (17190) States system redis pmessage system.adapter.ical.1.logLevel/system.adapter.ical.1.logLevel:{"val":"silly","ack":true,"ts":1654854642463,"q":0,"from":"system.adapter.ical.1","lc":1654854642463}
2022-06-10 11:50:42.558 - [34mdebug[39m: ical.1 (17190) reading calendar from URL: https://outlook.office365.com/owa/calendar/xxx@yyy.de/xxx/calendar.ics, color: #000000
2022-06-10 11:50:42.895 - [33mwarn[39m: ical.1 (17190) Error reading from URL "https://outlook.office365.com/owa/calendar/xxx@yyy.de/xxx/calendar.ics": Server responded HTTP-Statuscode=400: Bad Request
2022-06-10 11:50:42.897 - [33mwarn[39m: ical.1 (17190) Error reading "https://outlook.office365.com/owa/calendar/xxx@yyy.de/xxx/calendar.ics": Cannot read URL: "https://outlook.office365.com/owa/calendar/xxx@yyy.de/xxx/calendar.ics" HTTP-Status 400
2022-06-10 11:50:42.898 - [32minfo[39m: ical.1 (17190) All calenders could not be processed, Do not clean up events
2022-06-10 11:50:47.910 - [34mdebug[39m: ical.1 (17190) Plugin sentry destroyed
2022-06-10 11:50:47.911 - [32minfo[39m: ical.1 (17190) Terminated (NO_ERROR): Without reason
Für für die Entwickler: die Lösung ist das neu der 'user-agent' im Header beim Request mitgegeben werden musst.
In meinem Fall reichte das hier. Ich hatte genau das gleiche Problem.
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36'
Guter Hinweis, zeigt allerdings einmal mehr das man mit Office/Microsoft nicht wirklich gut beraten ist weil es schon tief blicken lässt wenn hier solch eigentlich unkritische header wie user-agent:
so missbraucht werden! Bestärkt mich definitiv darin weiterhin keinerlei Microsoftprodukte einzusetzen!
Fixed in 1.13.1 (2022-06-27)