DrozmotiX / ioBroker.discovergy

Receive all data of Discovery API into ioBroker to have your energy consumption and delivery monitored
MIT License
15 stars 7 forks source link

Adapter keeps in state green by failure until restart #237

Closed hkcrainer closed 1 year ago

hkcrainer commented 1 year ago

Today the Server of Discovergy is broken down. Discovergy Adapter kept green until reboot, but spams every second in Log.

Adapter Version: 0.5.8 Node.js: 18.17.1 NPM: 9.6.7

Best regards

hkc_rainer

Claus1985 commented 1 year ago

got the same error

firebowl commented 1 year ago

Adapter keeps crashing:

discovergy.0 | 2023-10-17 13:32:25.766 | error | Unexpected end of JSON input -- | -- | -- | -- discovergy.0 | 2023-10-17 13:32:25.765 | error | SyntaxError: Unexpected end of JSON input at JSON.parse () at Request._rp_callbackOrig (/opt/iobroker/node_modules/iobroker.discovergy/main.js:154:24) at Request.plumbing.callback (/opt/iobroker/node_modules/request-promise-core/lib/plumbing.js:76:39) at Request.RP$callback [as _callback] (/opt/iobroker/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/opt/iobroker/node_modules/request/request.js:185:22) at Request.emit (node:events:517:28) at Request.emit (node:domain:489:12) at Request. (/opt/iobroker/node_modules/request/request.js:1154:10) at Request.emit (node:events:517:28) at Request.emit (node:domain:489:12) discovergy.0 | 2023-10-17 13:32:25.765 | error | unhandled promise rejection: Unexpected end of JSON input discovergy.0 | 2023-10-17 13:32:25.764 | 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().
DutchmanNL commented 1 year ago

Adapter keeps crashing:

hmm that should not happen as the code is covered in an catch/try blog but log indeed indicate an complete code crash. Is the adapter restarting after this error or processing other data ?

DutchmanNL commented 1 year ago

@Claus1985 if the error occurs again, please set adapter log level to debug I added a log line to show API response

https://github.com/DrozmotiX/ioBroker.discovergy/commit/dd267945b70ed916c052c5825e304ea840a96e04#diff-58417e0f781b6656949d37258c8b9052ed266e2eb7a5163cad7b0863e6b2916aR156