NEWS
[gelöst] oilFox - Unexpected token < in JSON at position 0
-
Hallo zusammen
Ich erhalte die ganze Zeit bei jeder Abfrage von oilFox diese Meldungen im Log.
OilFox habe ich schon mehrfach neu installiert. Nur leider weiß ich nicht mehr weiter was ich noch dagegen tun kann.Hat jemand das gleiche Problem, bzw. kennt eine Lösung
Schöne Grüße,
NicoSystemdata Bitte Ausfüllen Hardwaresystem: Raspberry Pi 3 Model B Plus Rev 1.3 Arbeitsspeicher: 1GB Festplattenart: SD-Karte Betriebssystem: ioBroker Image Node-Version: 4.0.23 Nodejs-Version: 16.17.0 NPM-Version: 8.15.0 Installationsart: Image von der Webseite Image genutzt: Ja Ort/Name der Imagedatei: - oilfox.0 2022-08-21 17:46:12.393 warn Terminated (UNCAUGHT_EXCEPTION): Without reason oilfox.0 2022-08-21 17:46:12.389 info terminating oilfox.0 2022-08-21 17:46:11.862 error Unexpected token < in JSON at position 0 oilfox.0 2022-08-21 17:46:11.860 error SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.oilfox/main.js:85:31) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) oilfox.0 2022-08-21 17:46:11.854 error unhandled promise rejection: Unexpected token < in JSON at position 0 oilfox.0 2022-08-21 17:46:11.850 error 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(). oilfox.0 2022-08-21 17:46:11.125 info starting. Version 4.1.2 (non-npm: iobroker-community-adapters/ioBroker.oilfox) in /opt/iobroker/node_modules/iobroker.oilfox, node: v16.17.0, js-controller: 4.0.23 oilfox.0 2022-08-21 17:46:10.649 info Plugin sentry Sentry Plugin disabled for this process because sending of statistic data is disabled for the system
-
@nicob da ich die Fehlermeldung neulich beim Programmieren auch hatte: Vermutlich kommt schlich ein leerer String zurück, also nichts. Im Programm wird versucht das JSON auszuwerten was - weil leer - dann schon an Position 0 scheitert.
Da geht also vorher schon was schief. Schalte den Adapter doch mal um auf Debug und probiere es noch mal, dann die komplette Ausgabe des Logs von oilfox hier posten, inklusive Start des Adapters
Und hinterher wieder von Debug zurück auf den vorherigen Wert stellen
Nachtrag:
https://github.com/iobroker-community-adapters/ioBroker.oilfox/issues/61
Aber keine Lösung. Welche Version ist denn der Adapter? Da wurde was an der API geändert, ergo muss der mindestens 4.1.1 sein -
EDIT:
Tja das ist mir jetzt etwas peinlich, das der Account bei OilFox nicht mehr vorhanden war, war nun das Problem.
@bananajoe Da wäre das Log mit Debug aktiv, scheint wohl ein defekt im Adapter zu sein. Adapter Version ist 4.1.2
oilfox.0 2022-08-21 18:03:08.126 warn Terminated (UNCAUGHT_EXCEPTION): Without reason oilfox.0 2022-08-21 18:03:08.124 debug Plugin sentry destroyed oilfox.0 2022-08-21 18:03:08.120 info terminating oilfox.0 2022-08-21 18:03:07.584 error Unexpected token < in JSON at position 0 oilfox.0 2022-08-21 18:03:07.582 error SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.oilfox/main.js:85:31) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) oilfox.0 2022-08-21 18:03:07.578 error unhandled promise rejection: Unexpected token < in JSON at position 0 oilfox.0 2022-08-21 18:03:07.575 error 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(). oilfox.0 2022-08-21 18:03:07.568 debug received data 2: <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1></body></html> oilfox.0 2022-08-21 18:03:07.561 debug received chunk2: <!doctype html><html lang="en"><head><title>HTTP Status 401 – Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 – Unauthorized</h1></body></html> oilfox.0 2022-08-21 18:03:07.430 debug received data: {"statusCode":429,"errorCode":"GENERIC__TOO_MANY_REQUESTS"} oilfox.0 2022-08-21 18:03:07.424 debug received chunk: {"statusCode":429,"errorCode":"GENERIC__TOO_MANY_REQUESTS"} oilfox.0 2022-08-21 18:03:07.247 debug send data: {"email":"XXX","password":"XXX"} oilfox.0 2022-08-21 18:03:07.103 debug adapter.main: << MAIN >> oilfox.0 2022-08-21 18:03:07.101 debug adapter.on-ready: << READY >> oilfox.0 2022-08-21 18:03:07.026 info starting. Version 4.1.2 (non-npm: iobroker-community-adapters/ioBroker.oilfox) in /opt/iobroker/node_modules/iobroker.oilfox, node: v16.17.0, js-controller: 4.0.23 oilfox.0 2022-08-21 18:03:06.568 info Plugin sentry Sentry Plugin disabled for this process because sending of statistic data is disabled for the system oilfox.0 2022-08-21 18:03:06.545 debug Plugin sentry Initialize Plugin (enabled=true)
-
@nicob Öhm, also Problem gelöst? Weil kein Account / Falsche Zugangsdaten? So steht es ja auch in deinen Debug Meldungen. Dann setze den ersten Post auch auf ein
[gelöst] ...
vor dem Betreff