htilly / zenmusic

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

search, add, commands causes error #46

Closed acokeaday closed 2 months ago

acokeaday commented 5 years ago

Hello i know this issue has been raised before tried the fixes but to no avail, will appreciate some help on this.

Did the following based on previous search Added client and token ID in config.json Added apikey in config.json checked the market, spotify and market both EU

info: term: search
info: _search search,1
/opt/zenmusic/node_modules/urllib-sync/index.js:40
    throw res.error;
    ^

Error: spawnSync /usr/bin/node ETIMEDOUT
    at _errnoException (util.js:1022:11)
    at Object.spawnSync (child_process.js:579:20)
    at Object.request (/opt/zenmusic/node_modules/urllib-sync/index.js:33:16)
    at _getAccessToken (/opt/zenmusic/spotify.js:21:35)
    at Object.searchSpotify (/opt/zenmusic/spotify.js:37:31)
    at _search (/opt/zenmusic/index.js:899:33)
    at processInput (/opt/zenmusic/index.js:205:13)
    at RTMClient.slack.on (/opt/zenmusic/index.js:162:5)
    at RTMClient.emit (/opt/zenmusic/node_modules/eventemitter3/index.js:116:35)
    at RTMClient._handleWsMessageViaEventHandler (/opt/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:482:10)
    at RTMClient.handleWsMessage (/opt/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:436:10)
    at WebSocket.wrapper (/opt/zenmusic/node_modules/lodash/lodash.js:4935:19)
    at emitTwo (events.js:126:13)
    at WebSocket.emit (events.js:214:7)
    at Receiver.ontext (/opt/zenmusic/node_modules/ws/lib/WebSocket.js:841:10)
    at /opt/zenmusic/node_modules/ws/lib/Receiver.js:536:18
htilly commented 5 years ago

Hi!

Yea, seems like something is wrong with your Spotify credentials.

It should look something like: "spotifyClientId": "dd5efefda5b24a458c7e3b7622f6a6fd1", "spotifyClientSecret": "6fg4cd22c5b654c7b7f674dd8ca516e2",

Also, does it work with spotify if you play directly from the Sonos app?

BR Tilly

acokeaday commented 5 years ago

Hello,

Yea, it works perfectly fine from the Sonos app. will need to look into it when I get back to the office.

Though i'm pretty sure the spotify ID and secret is correct, directly copied from the website. - will take another look tomorrow.

macOS-Wolf commented 5 years ago

I have a hunch its the @Slack/Client as the version on Zenmusic is v3 and Slack just stopped support on all clients lower than v4.

I cannot for the life of me figure out how to update the client without further breaking the code.

@htilly ideas?