Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapter stürzt mit TypeError ab. #15

Closed
jogibear9988 opened this issue Mar 9, 2019 · 8 comments
Closed

Adapter stürzt mit TypeError ab. #15

jogibear9988 opened this issue Mar 9, 2019 · 8 comments

Comments

@jogibear9988
Copy link
Member

From @threedee on January 12, 2018 21:58

In meinen Logs tauchen Neustarts des Adapters auf. Ich denke mal er wird versucht auf ein Object zu zugreifen welches es nicht gibt.
Ich bekomme folgende Fehlermeldung:
`

host.iobroker 2018-01-12 22:00:12.679 error instance system.adapter.tr-064.0 terminated with code 0 (OK)
Caught 2018-01-12 22:00:12.679 error by controller[0]: at Socket.emit (events.js:188:7)
Caught 2018-01-12 22:00:12.678 error by controller[0]: at emitOne (events.js:96:13)
Caught 2018-01-12 22:00:12.678 error by controller[0]: at Socket.socketErrorListener (_http_client.js:310:9)
Caught 2018-01-12 22:00:12.678 error by controller[0]: at ClientRequest.emit (events.js:188:7)
Caught 2018-01-12 22:00:12.678 error by controller[0]: at emitOne (events.js:96:13)
Caught 2018-01-12 22:00:12.678 error by controller[0]: at Request.onRequestError (/opt/iobroker/node_modules/iobroker.tr-064/node_modules/request/request.js:878:8)
Caught 2018-01-12 22:00:12.678 error by controller[0]: at Request.emit (events.js:188:7)
Caught 2018-01-12 22:00:12.678 error by controller[0]: at emitOne (events.js:96:13)
Caught 2018-01-12 22:00:12.678 error by controller[0]: at self.callback (/opt/iobroker/node_modules/iobroker.tr-064/node_modules/request/request.js:186:22)
Caught 2018-01-12 22:00:12.678 error by controller[0]: at Request._callback (/opt/iobroker/node_modules/iobroker.tr-064/node_modules/tr-O64/lib/Service.js:273:13)
Caught 2018-01-12 22:00:12.678 error by controller[0]: at args.(anonymous function) (/opt/iobroker/node_modules/iobroker.tr-064/lib/deflections.js:58:39)
Caught 2018-01-12 22:00:12.676 error by controller[0]: TypeError: Cannot convert undefined or null to object
tr-064.0 2018-01-12 22:00:12.665 info terminating

`

Copied from original issue: soef/ioBroker.tr-064#59

@jogibear9988
Copy link
Member Author

From @soef on January 15, 2018 17:35

Hallo, welche Version des ioBroker.tr-064 Adapters setzt du ein? Ich kann die Fehler mit den angegebenen Zeilennummern in der aktuellen Version nicht nachvollziehen. Die aktuelle Version ist 0.4.11.

@jogibear9988
Copy link
Member Author

From @threedee on January 15, 2018 19:57

Ich habe auch die Version 0.4.11 installiert.
Ich habe mir auch schon mal den Quelltext angeschaut. Ich habe auch eine Vermutung. Kenne mich aber in JavaScript zu wenig aus. In der /lib/deflections.js wird in Zeile 58 auf var keys = Object.keys(data); zugegriffen. Kann es sein das das Object keine keys hat und er deswegen nicht drauf zugreifen kann?

@jogibear9988
Copy link
Member Author

From @fab242 on January 16, 2018 19:27

Hallo,

gibt es zu dem Problem schon neue Infos? Ich bekomme auch den Fehler.

Gruß
Fabian

@jogibear9988
Copy link
Member Author

From @soef on January 17, 2018 18:11

Object.keys ist eine native Node.js/JavaScript Funktion. Die kann eigentlich nicht null oder undefined sein. Ich vermute das der Übergabeparameter data null ist. Ich habe einmal eine neue Version 0.4.12 publiziert.
Du kannst ja einmal schauen ob diese Version weiterhin abstürzt.

Viele Grüße.

@jogibear9988
Copy link
Member Author

From @fab242 on January 17, 2018 19:35

Leider keine Besserung. der Fehler kommt noch immer.

host.FabBerryPi 2018-01-17 20:34:15.694 error instance system.adapter.tr-064.0 terminated with code 0 (OK)
host.FabBerryPi 2018-01-17 20:34:15.694 error Caught by controller[0]: at Request. (/opt/iobroker/node_modules/request/request.js:1163:10)
host.FabBerryPi 2018-01-17 20:34:15.693 error Caught by controller[0]: at Request.emit (events.js:191:7)
host.FabBerryPi 2018-01-17 20:34:15.693 error Caught by controller[0]: at emitTwo (events.js:106:13)
host.FabBerryPi 2018-01-17 20:34:15.693 error Caught by controller[0]: at Request.self.callback (/opt/iobroker/node_modules/request/request.js:186:22)
host.FabBerryPi 2018-01-17 20:34:15.693 error Caught by controller[0]: at Request._callback (/opt/iobroker/node_modules/tr-O64/lib/TR064.js:73:4)
host.FabBerryPi 2018-01-17 20:34:15.693 error Caught by controller[0]: at /opt/iobroker/node_modules/iobroker.tr-064/tr-064.js:365:37
host.FabBerryPi 2018-01-17 20:34:15.693 error Caught by controller[0]: at /opt/iobroker/node_modules/iobroker.tr-064/tr-064.js:939:27
host.FabBerryPi 2018-01-17 20:34:15.692 error Caught by controller[0]: at Array.Deflections (/opt/iobroker/node_modules/iobroker.tr-064/lib/deflections.js:20:10)
host.FabBerryPi 2018-01-17 20:34:15.692 error Caught by controller[0]: at Array.Deflections.init (/opt/iobroker/node_modules/iobroker.tr-064/lib/deflections.js:120:15)
host.FabBerryPi 2018-01-17 20:34:15.692 error Caught by controller[0]: at getFunctions (/opt/iobroker/node_modules/iobroker.tr-064/lib/deflections.js:42:22)
host.FabBerryPi 2018-01-17 20:34:15.691 error Caught by controller[0]: TypeError: Cannot read property 'services' of undefined
tr-064.0 2018-01-17 20:34:15.655 error uncaught exception: Cannot read property 'services' of undefined

@jogibear9988
Copy link
Member Author

From @soef on January 18, 2018 19:24

Hallo, jetzt ist es aber ein ganz anderer Fehler. Kann der Adapter schon keine Verbindung zur FritzBox bekommen. Falsche IP oder FritzBox nicht erreichbar?

Falsch war, das es in so einem Fall zu einer Exception ohne Erklärung kam. Das ist in der Version 0.4.14 korrigiert.

@jogibear9988
Copy link
Member Author

From @AlGu1 on January 29, 2018 6:24

Hallo soef,

ich bekomme den Fehler jetzt auch immer wieder (meistens Nachts):

tr-064.0 | 2018-01-29 05:30:26.416 | error | at Manager.Emitter.emit (/opt/iobroker/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20)
-- | -- | -- | --
tr-064.0 | 2018-01-29 05:30:26.416 | error | at Manager. (/opt/iobroker/node_modules/component-bind/index.js:21:15)
tr-064.0 | 2018-01-29 05:30:26.416 | error | at Socket.onpacket (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:228:12)
tr-064.0 | 2018-01-29 05:30:26.416 | error | at Socket.onevent (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:270:10)
tr-064.0 | 2018-01-29 05:30:26.416 | error | at Socket.Emitter.emit (/opt/iobroker/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20)
tr-064.0 | 2018-01-29 05:30:26.416 | error | at Socket. (/opt/iobroker/node_modules/iobroker.js-controller/lib/states/statesInMemClient.js:48:30)
tr-064.0 | 2018-01-29 05:30:26.416 | error | at Object.change (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:3190:37)
tr-064.0 | 2018-01-29 05:30:26.416 | error | at Object.stateChange (/opt/iobroker/node_modules/iobroker.tr-064/tr-064.js:23:31)
tr-064.0 | 2018-01-29 05:30:26.416 | error | at onStateChange (/opt/iobroker/node_modules/iobroker.tr-064/tr-064.js:158:45)
tr-064.0 | 2018-01-29 05:30:26.416 | error | at TR064.setAB (/opt/iobroker/node_modules/iobroker.tr-064/tr-064.js:302:10)
tr-064.0 | 2018-01-29 05:30:26.416 | error | TypeError: this.setEnableAB is not a function
tr-064.0 | 2018-01-29 05:30:26.413 | error | message tr-064.0.states.ab [object Object] this.setEnableAB is not a function
tr-064.0 | 2018-01-29 04:24:27.043 | error | ~
tr-064.0 | 2018-01-29 04:24:27.043 | error | ~~ If configuration, networt, IP address, etc. ok, try to restart your FritzBox
tr-064.0 | 2018-01-29 04:24:27.042 | error | ~~ Fatal error. Can not connect to your FritzBox.
tr-064.0 | 2018-01-29 04:24:27.042 | error | ~
tr-064.0 | 2018-01-29 04:24:27.036 | error | Error: read ECONNRESET - {"code":"ECONNRESET","errno":"ECONNRESET","syscall":"read"}
host.DS-Buero2 | 2018-01-29 04:20:53.393 | info | instance system.adapter.tr-064.0 started with pid 1798
host.DS-Buero2 | 2018-01-29 04:20:23.372 | info | Restart adapter system.adapter.tr-064.0 because enabled
host.DS-Buero2 | 2018-01-29 04:20:23.371 | error | instance system.adapter.tr-064.0 terminated with code 0 (OK)
Caught | 2018-01-29 04:20:23.371 | error | by controller[0]: at emitOne (events.js:96:13)
Caught | 2018-01-29 04:20:23.371 | error | by controller[0]: at Socket.socketErrorListener (_http_client.js:310:9)
Caught | 2018-01-29 04:20:23.371 | error | by controller[0]: at ClientRequest.emit (events.js:188:7)
Caught | 2018-01-29 04:20:23.371 | error | by controller[0]: at emitOne (events.js:96:13)
Caught | 2018-01-29 04:20:23.371 | error | by controller[0]: at Request.onRequestError (/opt/iobroker/node_modules/iobroker.tr-064/node_modules/request/request.js:878:8)
Caught | 2018-01-29 04:20:23.371 | error | by controller[0]: at Request.emit (events.js:188:7)
Caught | 2018-01-29 04:20:23.371 | error | by controller[0]: at emitOne (events.js:96:13)
Caught | 2018-01-29 04:20:23.370 | error | by controller[0]: at self.callback (/opt/iobroker/node_modules/iobroker.tr-064/node_modules/request/request.js:186:22)
Caught | 2018-01-29 04:20:23.370 | error | by controller[0]: at Request._callback (/opt/iobroker/node_modules/iobroker.tr-064/node_modules/tr-O64/lib/Service.js:273:13)
Caught | 2018-01-29 04:20:23.369 | error | by controller[0]: at args.(anonymous function) (/opt/iobroker/node_modules/iobroker.tr-064/lib/deflections.js:58:39)
Caught | 2018-01-29 04:20:23.366 | error | by controller[0]: TypeError: Cannot convert undefined or null to object
tr-064.0 | 2018-01-29 04:20:23.321 | error | uncaught exception: Cannot convert undefined or null to object

Nach dem Fehler um 4:20 Uhr kann zur Fritzbox nicht mehr richtig verbunden werden und es kommt der Fehler um 4:24 Uhr. Wenn ich dann um 5:30 Uhr den AB wieder ausschalten will über den AB State dann kommt wieder der Fehler mit "this.setEnableAB is not a function". Anscheinend stimmt irgendwas mit der Fritzbox Verbindung nicht und irgendwann bringt der Adapater dann mit den Fehlern alles ab.

Kann ich irgendwas machen um den Fehler einzugrenzen oder bei der Suche zu helfen?
Meine aktuelle Adapter Version ist bis gerade 0.4.10 gewesen. FB ist eine 6490 Cabel (lgi) mit der FRITZ!OS:06.52.

Habe jetzt wieder auf 0.4.14 geupdatet und beobachte ob es dann andere (genauere) Fehlermeldungen gibt.

Danke und Gruß
AlGu

@jogibear9988
Copy link
Member Author

From @soef on January 29, 2018 17:2

Hallo, ab der Version 0.4.14 dürfte es die Schutzverletzung von 4:20 Uhr nicht mehr geben. Was nicht bedeutet dass das Schalten des ABs funktionieren muss.
Ich hab' nun noch implementiert, dass beim Fehlschlagen des Init (Verbinden zur FritzBox) der Adapter terminiert wird, so dass er neu gestartet wird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants