iobroker-community-adapters/ioBroker.telegram

Adapter crashes after sending picture to bot

LastPerfectTobi opened this issue · 5 comments

After update Node.JS to recommended version 14.18.1 telegram instance crashes after sending bot a picture in privat chat.
With previous version 12.22.7 there were no problems.

Node.js v14.18.1
NPM 6.14.15
Telegram 1.10.0
JS-Controller 3.2.16
ioBroker on RaspberryPi 4G

Logfile:

2021-11-19 11:26:59.415 - error: telegram.0 (16973) Exception-Code: ERR_INVALID_ARG_TYPE: The "listener" argument must be of type function. Received type boolean (true)
2021-11-19 11:26:59.525 - error: telegram.0 (16973) uncaught exception: The "listener" argument must be of type function. Received type boolean (true)
2021-11-19 11:26:59.525 - error: telegram.0 (16973) TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received type boolean (true)
at new NodeError (internal/errors.js:322:7)
at checkListener (events.js:135:11)
at _addListener (events.js:433:3)
at IncomingMessage.addListener (events.js:497:10)
at IncomingMessage.Readable.on (internal/streams/readable.js:853:35)
at ClientRequest. (/opt/iobroker/node_modules/iobroker.telegram/main.js:1050:21)
at Object.onceWrapper (events.js:520:26)
at ClientRequest.emit (events.js:400:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
at TLSSocket.socketOnData (_http_client.js:515:22)
at TLSSocket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)
at TLSSocket.Readable.push (internal/streams/readable.js:206:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

Same problem with JS-Controller 3.3.22 and Admin 5.2.2.

Has anyone an idea of this problem?

Fixed in 1.11.0

Installed version 1.11.0 but same problem with this error

host.raspberrypi
2022-01-26 23:38:15.815	info	instance system.adapter.telegram.0 started with pid 2324
host.raspberrypi
2022-01-26 23:37:45.741	info	Restart adapter system.adapter.telegram.0 because enabled
host.raspberrypi
2022-01-26 23:37:45.740	error	instance system.adapter.telegram.0 terminated with code 6 (UNCAUGHT_EXCEPTION)

telegram.0
2022-01-26 23:37:45.105	warn	Terminated (UNCAUGHT_EXCEPTION): Without reason

telegram.0
2022-01-26 23:37:44.720	error	Exception-Code: HPE_CB_HEADERS_COMPLETE: Parse Error: User callback error

telegram.0
2022-01-26 23:37:44.719	error	Error: Parse Error: User callback error at TLSSocket.socketOnData (_http_client.js:515:22) at TLSSocket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12) at readableAddChunk (internal/streams/readable.js:267:9) at TLSSocket.Readable.push (internal/streams/readable.js:206:10) at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

telegram.0
2022-01-26 23:37:44.716	error	uncaught exception: Parse Error: User callback error

telegram.0
2022-01-26 23:37:44.713	error	Exception-Code: ERR_INVALID_ARG_TYPE: The "listener" argument must be of type function. Received type boolean (true)

telegram.0
2022-01-26 23:37:44.712	error	TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received type boolean (true) at new NodeError (internal/errors.js:322:7) at checkListener (events.js:135:11) at _addListener (events.js:433:3) at IncomingMessage.addListener (events.js:497:10) at IncomingMessage.Readable.on (internal/streams/readable.js:853:35) at ClientRequest.<anonymous> (/opt/iobroker/node_modules/iobroker.telegram/main.js:1058:25) at Object.onceWrapper (events.js:520:26) at ClientRequest.emit (events.js:400:28) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17) at TLSSocket.socketOnData (_http_client.js:515:22) at TLSSocket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12) at readableAddChunk (internal/streams/readable.js:267:9) at TLSSocket.Readable.push (internal/streams/readable.js:206:10) at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

telegram.0
2022-01-26 23:37:44.711	error	uncaught exception: The "listener" argument must be of type function. Received type boolean (true)

telegram.0
2022-01-26 23:37:44.610	error	Exception-Code: HPE_CB_HEADERS_COMPLETE: Parse Error: User callback error

telegram.0
2022-01-26 23:37:44.609	error	Error: Parse Error: User callback error at TLSSocket.socketOnData (_http_client.js:515:22) at TLSSocket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12) at readableAddChunk (internal/streams/readable.js:267:9) at TLSSocket.Readable.push (internal/streams/readable.js:206:10) at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

telegram.0
2022-01-26 23:37:44.608	error	uncaught exception: Parse Error: User callback error

telegram.0
2022-01-26 23:37:44.607	error	Exception-Code: ERR_INVALID_ARG_TYPE: The "listener" argument must be of type function. Received type boolean (true)

telegram.0
2022-01-26 23:37:44.606	error	TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received type boolean (true) at new NodeError (internal/errors.js:322:7) at checkListener (events.js:135:11) at _addListener (events.js:433:3) at IncomingMessage.addListener (events.js:497:10) at IncomingMessage.Readable.on (internal/streams/readable.js:853:35) at ClientRequest.<anonymous> (/opt/iobroker/node_modules/iobroker.telegram/main.js:1058:25) at Object.onceWrapper (events.js:520:26) at ClientRequest.emit (events.js:400:28) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17) at TLSSocket.socketOnData (_http_client.js:515:22) at TLSSocket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12) at readableAddChunk (internal/streams/readable.js:267:9) at TLSSocket.Readable.push (internal/streams/readable.js:206:10) at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

telegram.0
2022-01-26 23:37:44.605	error	uncaught exception: The "listener" argument must be of type function. Received type boolean (true)

telegram.0
2022-01-26 23:37:44.600	error	Exception-Code: HPE_CB_HEADERS_COMPLETE: Parse Error: User callback error

telegram.0
2022-01-26 23:37:44.599	error	Error: Parse Error: User callback error at TLSSocket.socketOnData (_http_client.js:515:22) at TLSSocket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12) at readableAddChunk (internal/streams/readable.js:267:9) at TLSSocket.Readable.push (internal/streams/readable.js:206:10) at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

telegram.0
2022-01-26 23:37:44.598	error	uncaught exception: Parse Error: User callback error

telegram.0
2022-01-26 23:37:44.590	error	Exception-Code: ERR_INVALID_ARG_TYPE: The "listener" argument must be of type function. Received type boolean (true)

telegram.0
2022-01-26 23:37:44.589	error	TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received type boolean (true) at new NodeError (internal/errors.js:322:7) at checkListener (events.js:135:11) at _addListener (events.js:433:3) at IncomingMessage.addListener (events.js:497:10) at IncomingMessage.Readable.on (internal/streams/readable.js:853:35) at ClientRequest.<anonymous> (/opt/iobroker/node_modules/iobroker.telegram/main.js:1058:25) at Object.onceWrapper (events.js:520:26) at ClientRequest.emit (events.js:400:28) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17) at TLSSocket.socketOnData (_http_client.js:515:22) at TLSSocket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12) at readableAddChunk (internal/streams/readable.js:267:9) at TLSSocket.Readable.push (internal/streams/readable.js:206:10) at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

Fixed in 1.11.1

Works! 👍 Thank you