portify icon indicating copy to clipboard operation
portify copied to clipboard

TypeError: Cannot read property 'length' of undefined

Open ghost opened this issue 10 years ago • 4 comments

Hi guys

First of all I want to thank you for this amazing app. If it works it would be much easier to transfer my spotify playlists to google music.

I pulled the actual version of portify from Github. After starting the transfer by 'node app.js' I got the following log:

TypeError: Cannot read property 'length' of undefined
    at processTracks (/Users/Fabian/Documents/portify/data/app.js:184:27)
    at trackWorker (/Users/Fabian/Documents/portify/data/app.js:146:2)
    at TimeQueue._process (/Users/Fabian/Documents/portify/data/node_modules/timequeue/lib/index.js:168:15)
    at TimeQueue.push (/Users/Fabian/Documents/portify/data/node_modules/timequeue/lib/index.js:72:10)
    at processSpotifyPlaylist (/Users/Fabian/Documents/portify/data/app.js:173:13)
    at Spotify.<anonymous> (/Users/Fabian/Documents/portify/data/node_modules/spotify-web/lib/spotify.js:616:5)
    at fn (/Users/Fabian/Documents/portify/data/node_modules/spotify-web/lib/spotify.js:344:10)
    at Spotify._onmessage (/Users/Fabian/Documents/portify/data/node_modules/spotify-web/lib/spotify.js:360:5)
    at WebSocket.EventEmitter.emit (events.js:98:17)
    at Receiver.self._receiver.ontext (/Users/Fabian/Documents/portify/data/node_modules/spotify-web/node_modules/ws/lib/WebSocket.js:697:10)

Do you know what the problem could be?

Environment OS - OSX 10.9.1 portify ver. - 0.5.1

ghost avatar Jan 13 '14 00:01 ghost

Same problem here:


portify 0.51
Starting without harmony
   info  - socket.io started
Google Login success
Spotify Login success

TypeError: Cannot read property 'length' of undefined
    at /home/pi/portify/data/app.js:320:45
    at Spotify.<anonymous> (/home/pi/portify/data/node_modules/spotify-web/lib/spotify.js:666:5)
    at fn (/home/pi/portify/data/node_modules/spotify-web/lib/spotify.js:344:10)
    at Spotify._onmessage (/home/pi/portify/data/node_modules/spotify-web/lib/spotify.js:360:5)
    at WebSocket.EventEmitter.emit (events.js:98:17)
    at Receiver.self._receiver.ontext (/home/pi/portify/data/node_modules/spotify-web/node_modules/ws/lib/WebSocket.js:697:10)
    at Receiver.opcodes.1.finish (/home/pi/portify/data/node_modules/spotify-web/node_modules/ws/lib/Receiver.js:397:14)
    at Receiver.expectHandler (/home/pi/portify/data/node_modules/spotify-web/node_modules/ws/lib/Receiver.js:384:31)
    at Receiver.add (/home/pi/portify/data/node_modules/spotify-web/node_modules/ws/lib/Receiver.js:93:24)
    at CleartextStream.firstHandler (/home/pi/portify/data/node_modules/spotify-web/node_modules/ws/lib/WebSocket.js:678:22)

gosuto-inzasheru avatar Mar 07 '14 11:03 gosuto-inzasheru

Same problem for me, I removed the console.log() in line 320 and get this one:

portify 0.51
Starting without harmony
   info  - socket.io started
Google Login success
Spotify Login success

TypeError: Cannot call method 'forEach' of undefined
    at /home/daniel/workspace/portify/data/app.js:327:26
    at Spotify.<anonymous> (/home/daniel/workspace/portify/data/node_modules/spotify-web/lib/spotify.js:650:5)
    at fn (/home/daniel/workspace/portify/data/node_modules/spotify-web/lib/spotify.js:396:10)
    at Spotify._onmessage (/home/daniel/workspace/portify/data/node_modules/spotify-web/lib/spotify.js:412:5)
    at WebSocket.EventEmitter.emit (events.js:98:17)
    at Receiver.self._receiver.ontext (/home/daniel/workspace/portify/data/node_modules/spotify-web/node_modules/ws/lib/WebSocket.js:697:10)
    at Receiver.opcodes.1.finish (/home/daniel/workspace/portify/data/node_modules/spotify-web/node_modules/ws/lib/Receiver.js:397:14)
    at Receiver.expectHandler (/home/daniel/workspace/portify/data/node_modules/spotify-web/node_modules/ws/lib/Receiver.js:384:31)
    at Receiver.add (/home/daniel/workspace/portify/data/node_modules/spotify-web/node_modules/ws/lib/Receiver.js:93:24)
    at CleartextStream.firstHandler (/home/daniel/workspace/portify/data/node_modules/spotify-web/node_modules/ws/lib/WebSocket.js:678:22)

danielmorlock avatar May 11 '14 12:05 danielmorlock

I have the same problem

portify 0.51 Starting without harmony Option log level is not valid. Please refer to the README. Google Login success Spotify Login success

TypeError: Cannot read property 'length' of undefined at /Users/albaur/Music/portify-master/data/app.js:320:45 at Spotify. (/Users/albaur/Music/portify-master/data/node_modules/spotify-web/lib/spotify.js:664:5) at fn (/Users/albaur/Music/portify-master/data/node_modules/spotify-web/lib/spotify.js:396:10) at Spotify._onmessage (/Users/albaur/Music/portify-master/data/node_modules/spotify-web/lib/spotify.js:412:5) at WebSocket.EventEmitter.emit (events.js:98:17) at Receiver.self._receiver.ontext (/Users/albaur/Music/portify-master/data/node_modules/spotify-web/node_modules/ws/lib/WebSocket.js:697:10) at Receiver.opcodes.1.finish (/Users/albaur/Music/portify-master/data/node_modules/spotify-web/node_modules/ws/lib/Receiver.js:397:14) at Receiver.expectHandler (/Users/albaur/Music/portify-master/data/node_modules/spotify-web/node_modules/ws/lib/Receiver.js:384:31) at Receiver.add (/Users/albaur/Music/portify-master/data/node_modules/spotify-web/node_modules/ws/lib/Receiver.js:93:24) at CleartextStream.firstHandler (/Users/albaur/Music/portify-master/data/node_modules/spotify-web/node_modules/ws/lib/WebSocket.js:678:22)

bauralex avatar Jun 23 '14 09:06 bauralex

I found the solution... Spotify changed their functionality... You have to publish your playlists in spotify and then it works. For publishing rightclick on playlist and then click publish

bauralex avatar Jun 24 '14 15:06 bauralex