htilly / zenmusic

Slack / Sonos / Spotify / Node.js - Control Sonos through #Slack
125 stars 36 forks source link

'No bots allowed' #42

Closed mdeonarain1 closed 6 years ago

mdeonarain1 commented 6 years ago

Is this happening because the Slack Client v3.x is no longer supported?

https://github.com/slackapi/node-slack-sdk/wiki/Migration-Guide-for-v4

warn: SlackDataStore is deprecated and will be removed in the next major version. See project documentation for a migration guide.

mdeonarain1 commented 6 years ago

npm install @slack/client --save npm WARN deprecated @slack/client@3.16.0: v3.x and lower are no longer supported. see migration guide: https://github.com/slackapi/node-slack-sdk/wiki/Migration-Guide-for-v4 npm WARN deprecated node-uuid@1.4.8: Use uuid module instead npm WARN deprecated hoek@2.16.3: The major version is no longer supported. Please update to 4.x or newer WARN notice [SECURITY] tunnel-agent has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=tunnel-agent&version=0.4.3 - Run npm i npm@latest -g to upgrade your npm version, and then npm audit to get more info. WARN notice [SECURITY] hoek has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=hoek&version=2.16.3 - Run npm i npm@latest -g to upgrade your npm version, and then npm audit to get more info. notice [SECURITY] https-proxy-agent has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=https-proxy-agent&version=1.0.0 - Run npm i npm@latest -g to upgrade your npm version, and then npm audit to get more info.

mdeonarain1 commented 6 years ago
Unhandled rejection SlackRTMError: slow down, too many messages...
    at RTMClient.handleMessageAck [as _handleMessageAck] (/Users/mdeonarain/repos/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:513:40)
    at RTMClient._handleWsMessageViaEventHandler (/Users/mdeonarain/repos/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:476:12)
    at RTMClient.handleWsMessage (/Users/mdeonarain/repos/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:436:10)
    at WebSocket.wrapper (/Users/mdeonarain/repos/zenmusic/node_modules/lodash/lodash.js:4949:19)
    at emitTwo (events.js:126:13)
    at WebSocket.emit (events.js:214:7)
    at Receiver.ontext (/Users/mdeonarain/repos/zenmusic/node_modules/ws/lib/WebSocket.js:841:10)
    at /Users/mdeonarain/repos/zenmusic/node_modules/ws/lib/Receiver.js:536:18
    at Receiver.applyExtensions (/Users/mdeonarain/repos/zenmusic/node_modules/ws/lib/Receiver.js:371:5)
    at /Users/mdeonarain/repos/zenmusic/node_modules/ws/lib/Receiver.js:508:14
    at Receiver.flush (/Users/mdeonarain/repos/zenmusic/node_modules/ws/lib/Receiver.js:347:3)
    at Receiver.finish (/Users/mdeonarain/repos/zenmusic/node_modules/ws/lib/Receiver.js:541:12)
    at Receiver.expectHandler (/Users/mdeonarain/repos/zenmusic/node_modules/ws/lib/Receiver.js:499:31)
    at Receiver.add (/Users/mdeonarain/repos/zenmusic/node_modules/ws/lib/Receiver.js:103:24)
    at TLSSocket.realHandler (/Users/mdeonarain/repos/zenmusic/node_modules/ws/lib/WebSocket.js:825:20)
    at emitOne (events.js:116:13)
htilly commented 6 years ago

The script definitely needs to migrate to v4 as you say.. :/ I would really love some PR or help with doing this!

However, Im not sure about your problem. The script should run fine with the "old" version.. but again.. It should be updated asap..

BR Tilly

mdeonarain1 commented 6 years ago

I think this might have been due to the same slack API token being used for multiple bots. Reinstall + setup from scratch fixed the issue. Closing