qrpike / spotify-playlist-downloader

Download an entire spotify playlist ( FROM SPOTIFY at 160kpbs ) to your local machine.
291 stars 111 forks source link

Error when running on Arch #28

Closed geirawsm closed 8 years ago

geirawsm commented 8 years ago

uname -a Linux manjaro 4.2.8.1-1-MANJARO #1 SMP PREEMPT Fri Jan 8 23:56:16 UTC 2016 x86_64 GNU/Linux

npm -v 3.5.3

Ran it and got the following output:

Downloader App Started..
 - Getting Playlist Data
 - Got Playlist: xxx
 - Processing 15 Tracks
/usr/lib/node_modules/spotify-playlist-downloader/node_modules/protobufjs/ProtoBuf.js:1987
                            throw(e);
                            ^

Error: Illegal value for Message.Field .spotify.metadata.proto.Restriction.catalogue: 4 (not a valid enum value)
  at [object Object].ProtoBuf.Reflect.Field.verifyValue (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/protobufjs/ProtoBuf.js:2321:27)
  at [object Object].Message.add (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/protobufjs/ProtoBuf.js:1693:53)
  at [object Object].ProtoBuf.Reflect.Message.decode (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/protobufjs/ProtoBuf.js:2137:29)
  at [object Object].ProtoBuf.Reflect.Field.decode (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/protobufjs/ProtoBuf.js:2594:46)
  at [object Object].ProtoBuf.Reflect.Message.decode (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/protobufjs/ProtoBuf.js:2137:51)
  at Message.decode (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/protobufjs/ProtoBuf.js:1982:41)
  at Function.protobufjs_parse_wrapper [as parse] (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/spotify-web/lib/schemas.js:98:39)
  at Spotify._parse (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/spotify-web/lib/spotify.js:1288:20)
  at parseData (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/spotify-web/lib/spotify.js:592:18)
  at Spotify.<anonymous> (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/spotify-web/lib/spotify.js:652:16)
  at fn (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/spotify-web/lib/spotify.js:396:10)
  at Spotify._onmessage (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/spotify-web/lib/spotify.js:412:5)
  at emitTwo (events.js:87:13)
  at WebSocket.emit (events.js:172:7)
  at Receiver.self._receiver.ontext (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/ws/lib/WebSocket.js:682:10)
  at Receiver.opcodes.1.finish (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/ws/lib/Receiver.js:391:14)
  at Receiver.expectHandler (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/ws/lib/Receiver.js:378:31)
  at Receiver.add (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/ws/lib/Receiver.js:87:24)
  at TLSSocket.firstHandler (/usr/lib/node_modules/spotify-playlist-downloader/node_modules/ws/lib/WebSocket.js:663:22)
  at emitOne (events.js:77:13)
  at TLSSocket.emit (events.js:169:7)
  at readableAddChunk (_stream_readable.js:146:16)
  at TLSSocket.Readable.push (_stream_readable.js:110:10)
  at TLSWrap.onread (net.js:523:20)

Let me know if you need any more info.

franomai commented 8 years ago

You may potentially be facing this issue: https://github.com/qrpike/spotify-playlist-downloader/issues/6 https://github.com/TooTallNate/node-spotify-web/issues/75 Try reinstalling using node 0.10.36 (found here: http://nodejs.org/dist/v0.10.36/) and see if that fixes it.

KeizerDev commented 8 years ago

@armandg Managed to fix it, just do the following:

$ git clone git@github.com:qrpike/spotify-playlist-downloader.git
$ cd spotify-playlist-downloader/
$ npm install # Maybe get some errors just ignore :D
$ node main.js -u yourusername -p yourpassword -l spotify:user:spotify:playlist:06KmJWiQhL0XiV6QQAHsmw

I got exactly the same bug as you had, let me know if this worked for you!

geirawsm commented 8 years ago

@KeizerDev Cheers, I'll try it out and report back.

geirawsm commented 8 years ago

@KeizerDev Worked like a charm! =)

pickledgator commented 8 years ago

Also confirming that the workaround from KeizerDev seems to work (despite errors in the npm install steps still).

giacecco commented 8 years ago

I confirm @KeizerDev's branch works, however the file format of the mp3s may be not fully compliant with the standard, as I can't play them with mplayer for example, but I can with Firefox.