jack-blackson / ioBroker.meteoalarm

Meteoalarm.eu Adapter for ioBroker
MIT License
6 stars 3 forks source link

Fehlermeldung "unhandled promise rejection" Version 2.3.3 #161

Closed latzi0710 closed 1 year ago

latzi0710 commented 1 year ago

Fehlermeldung:

2023-03-26 08:28:00.140  - info: host.ioBroker instance system.adapter.meteoalarm.0 started with pid 991157
--
2023-03-26 08:28:01.443  - info:  meteoalarm.0 (991157) starting. Version 2.3.3 in  /opt/iobroker/node_modules/iobroker.meteoalarm, node: v18.15.0,  js-controller: 4.0.24
2023-03-26 08:28:01.998  - error:  meteoalarm.0 (991157) 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().
2023-03-26 08:28:01.999  - error: meteoalarm.0 (991157) unhandled promise rejection: Cannot read properties of undefined (reading 'indexOf')
2023-03-26 08:28:02.002  - error: meteoalarm.0 (991157) TypeError: Cannot read properties of undefined (reading 'indexOf')
at /opt/iobroker/node_modules/iobroker.meteoalarm/main.js:420:76
at Parser. (/opt/iobroker/node_modules/xml2js/lib/parser.js:304:18)
at Parser.emit (node:events:513:28)
at Parser.emit (node:domain:489:12)
at SAXParser.onclosetag (/opt/iobroker/node_modules/xml2js/lib/parser.js:262:26)
at emit (/opt/iobroker/node_modules/sax/lib/sax.js:624:35)
at emitNode (/opt/iobroker/node_modules/sax/lib/sax.js:629:5)
at closeTag (/opt/iobroker/node_modules/sax/lib/sax.js:889:7)
at SAXParser.write (/opt/iobroker/node_modules/sax/lib/sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (/opt/iobroker/node_modules/xml2js/lib/parser.js:323:31)
2023-03-26 08:28:02.002  - error: meteoalarm.0 (991157) Cannot read properties of undefined (reading 'indexOf')
2023-03-26 08:28:02.014  - info: meteoalarm.0 (991157) terminating
2023-03-26 08:28:02.015  - warn: meteoalarm.0 (991157) Terminated (UNCAUGHT_EXCEPTION): Without reason
2023-03-26 08:28:02.536  - error: host.ioBroker instance system.adapter.meteoalarm.0 terminated with code 6 (UNCAUGHT_EXCEPTION)

Einstellungen: Land: Österreich Region: Freistadt

Debug Log:

2023-03-26 09:28:00.149  - info: host.ioBroker instance system.adapter.meteoalarm.0 started with pid 1105836
--
2023-03-26 09:28:00.686  - debug: meteoalarm.0 (1105836) Redis Objects: Use Redis connection: 0.0.0.0:9001
2023-03-26 09:28:00.748  - debug: meteoalarm.0 (1105836) Objects client ready ... initialize now
2023-03-26 09:28:00.794  - debug: meteoalarm.0 (1105836) Objects create System PubSub Client
2023-03-26 09:28:00.794  - debug: meteoalarm.0 (1105836) Objects create User PubSub Client
2023-03-26 09:28:00.904  - debug: meteoalarm.0 (1105836) Objects client initialize lua scripts
2023-03-26 09:28:00.926  - debug: meteoalarm.0 (1105836) Objects connected to redis: 0.0.0.0:9001
2023-03-26 09:28:00.964  - debug: meteoalarm.0 (1105836) Redis States: Use Redis connection: 0.0.0.0:9000
2023-03-26 09:28:00.990  - debug: meteoalarm.0 (1105836) States create System PubSub Client
2023-03-26 09:28:00.990  - debug: meteoalarm.0 (1105836) States create User PubSub Client
2023-03-26 09:28:01.043  - debug: meteoalarm.0 (1105836) States connected to redis: 0.0.0.0:9000
2023-03-26 09:28:01.253  - debug: meteoalarm.0 (1105836) Plugin sentry Initialize Plugin (enabled=true)
2023-03-26 09:28:01.579  - info:  meteoalarm.0 (1105836) starting. Version 2.3.3 in  /opt/iobroker/node_modules/iobroker.meteoalarm, node: v18.15.0,  js-controller: 4.0.24
2023-03-26 09:28:01.615  - debug: meteoalarm.0 (1105836) Language: de
2023-03-26 09:28:01.618  - debug: meteoalarm.0 (1105836) Setup found: country AT and region AT406 - Freistadt
2023-03-26 09:28:01.619  - debug: meteoalarm.0 (1105836) Sentry aktiv - Breadcrumb gesetzt
2023-03-26 09:28:01.619  - debug: meteoalarm.0 (1105836)  XML Language: de-DE
2023-03-26 09:28:01.741  - debug: meteoalarm.0 (1105836) 0: Existing alarm objects at adapter start: 0
2023-03-26 09:28:01.774  - debug: meteoalarm.0 (1105836) 1: Parsed CSV File
2023-03-26 09:28:01.775  - debug: meteoalarm.0 (1105836) 2: Request Atom from https://feeds.meteoalarm.org/feeds/meteoalarm-legacy-atom-austria
2023-03-26 09:28:02.032  - debug: meteoalarm.0 (1105836) 3: Received Atom
2023-03-26 09:28:02.127  - debug: meteoalarm.0 (1105836) 4: Process Atom
2023-03-26 09:28:02.128  - debug: meteoalarm.0 (1105836) 4.1.1: Check Entries
2023-03-26 09:28:02.131  - debug:  meteoalarm.0 (1105836) 4.2: Warning found:  https://feeds.meteoalarm.org/api/v1/warnings/feeds-austria/a2479037-7de6-4c78-a82b-b526cdda6168  of message type Update
2023-03-26 09:28:02.133  - debug: meteoalarm.0 (1105836) 4.2: Checked relevance, found 1 relevant alarms
2023-03-26 09:28:02.134  - debug: meteoalarm.0 (1105836) 5: Processed Atom
2023-03-26 09:28:02.134  - debug: meteoalarm.0 (1105836) 5.1 Found 1 URLs
2023-03-26 09:28:02.134  - debug:  meteoalarm.0 (1105836) 6: Request Details from URL 1:  https://feeds.meteoalarm.org/api/v1/warnings/feeds-austria/a2479037-7de6-4c78-a82b-b526cdda6168
2023-03-26 09:28:02.202  - debug: meteoalarm.0 (1105836) 7: Received Details for URL 1
2023-03-26 09:28:02.204  - error:  meteoalarm.0 (1105836) 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().
2023-03-26 09:28:02.204  - error: meteoalarm.0 (1105836) unhandled promise rejection: Cannot read properties of undefined (reading 'indexOf')
2023-03-26 09:28:02.208  - error: meteoalarm.0 (1105836) TypeError: Cannot read properties of undefined (reading 'indexOf')
at /opt/iobroker/node_modules/iobroker.meteoalarm/main.js:420:76
at Parser. (/opt/iobroker/node_modules/xml2js/lib/parser.js:304:18)
at Parser.emit (node:events:513:28)
at Parser.emit (node:domain:489:12)
at SAXParser.onclosetag (/opt/iobroker/node_modules/xml2js/lib/parser.js:262:26)
at emit (/opt/iobroker/node_modules/sax/lib/sax.js:624:35)
at emitNode (/opt/iobroker/node_modules/sax/lib/sax.js:629:5)
at closeTag (/opt/iobroker/node_modules/sax/lib/sax.js:889:7)
at SAXParser.write (/opt/iobroker/node_modules/sax/lib/sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (/opt/iobroker/node_modules/xml2js/lib/parser.js:323:31)
2023-03-26 09:28:02.208  - error: meteoalarm.0 (1105836) Cannot read properties of undefined (reading 'indexOf')
2023-03-26 09:28:02.233  - info: meteoalarm.0 (1105836) terminating
2023-03-26 09:28:02.235  - debug: meteoalarm.0 (1105836) Plugin sentry destroyed
2023-03-26 09:28:02.240  - warn: meteoalarm.0 (1105836) Terminated (UNCAUGHT_EXCEPTION): Without reason
2023-03-26 09:28:02.754  - error: host.ioBroker instance system.adapter.meteoalarm.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
jack-blackson commented 1 year ago

Seems that there is either an unhandled change in the xml, or an incorrect xml. I added a fix that it will not break down any more - should be available in the latest repository (2.3.4) in a few minutes. Would be great if you could run the update and check if all is fine afterwards.

latzi0710 commented 1 year ago

Yeah!! It works, many thanks !!! 👍 👏