node-red-slack icon indicating copy to clipboard operation
node-red-slack copied to clipboard

No longer working with Node.js version 22 and node-red version v4.0.2

Open janvda opened this issue 1 year ago • 2 comments

The problem is that my node-red instances crashed regularly after I have upgraded to the following version of node-red

Welcome to Node-RED
===================

15 Aug 09:42:41 - [info] Node-RED version: v4.0.2
15 Aug 09:42:41 - [info] Node.js  version: v22.6.0
15 Aug 09:42:41 - [info] Linux 5.15.0-117-generic x64 LE

This is what is logged at the time of the crash (around 16:54:47):

14 Aug 16:52:37 - [info] [sqlitedb:62791b7b1606c346] opened /data/niamondo.db ok
14 Aug 16:52:37 - [info] [mqtt-broker:738c9d10393f5cdd] Connected to broker: mqtt://mqtt-broker:1883
[INFO]  @slack/client:WebClient:1 API Call failed due to rate limiting. Will retry in 60 seconds.
[WARN]  @slack/client:WebClient:1 http request failed A rate limit was exceeded.
[INFO]  @slack/client:WebClient:1 API Call failed due to rate limiting. Will retry in 60 seconds.
[WARN]  @slack/client:WebClient:1 http request failed A rate limit was exceeded.
14 Aug 16:54:41 - [info] [slack-config:$slack_token] connected to slack with token: xoxb-260...L0Q
14 Aug 16:54:47 - [red] Uncaught Exception:
14 Aug 16:54:47 - [error] TypeError: Cannot read properties of null (reading 'message')
    at /data/node_modules/@slack/client/dist/RTMClient.js:392:89
    at afterWrite (node:internal/streams/writable:708:5)
    at onwrite (node:internal/streams/writable:686:7)
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:107:10)
14 Aug 16:54:49 - [info] 

janvda avatar Aug 15 '24 09:08 janvda

I also see that the same message is posted over and over again in slack channel although I am only posting it once:

image

janvda avatar Aug 15 '24 09:08 janvda

FYI it seemed to be working for below node-red version:

Welcome to Node-RED
===================

15 Aug 11:57:14 - [info] Node-RED version: v3.0.2
15 Aug 11:57:14 - [info] Node.js  version: v16.16.0
15 Aug 11:57:14 - [info] Linux 5.15.0-117-generic x64 LE
15 Aug 11:57:15 - [info] Loading palette nodes

janvda avatar Aug 15 '24 09:08 janvda

Updated the slack client deps and seems to have resolved the issue. 2.1.0 should have the fix.

travisghansen avatar Apr 06 '25 18:04 travisghansen