okonek / tidal-cli-client

You can now use Tidal on linux. With your loved CLI. <3
MIT License
273 stars 29 forks source link

Crash after hiting Enter when "No items" is a result of search #56

Open kecef opened 5 years ago

kecef commented 5 years ago

When :search result is "No items" and I hit Enter then program crashes with that exception:

TypeError: Cannot read property 'uuid' of undefined
    at module.exports.openPlaylistPanel (/usr/lib/node_modules/tidal-cli-client/app/UI/uiComponents/specializedUI/List/PlaylistsList.js:33:92)
    at onItemSelect.map.x (/usr/lib/node_modules/tidal-cli-client/app/UI/uiComponents/basicUI/List.js:80:6)
    at Array.map (<anonymous>)
    at module.exports.keySelected (/usr/lib/node_modules/tidal-cli-client/app/UI/uiComponents/basicUI/List.js:75:22)
    at List.EventEmitter._emit (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/events.js:94:20)
    at List.EventEmitter.emit (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/events.js:117:12)
    at List.enterSelected (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/widgets/list.js:586:8)
    at List.<anonymous> (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/widgets/list.js:119:14)
    at List.EventEmitter._emit (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/events.js:94:20)
    at List.EventEmitter.emit (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/events.js:117:12)
    at Program.<anonymous> (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/widgets/screen.js:602:15)
    at Program.emit (events.js:182:13)
    at Program.EventEmitter.emit (domain.js:441:20)
    at /usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/program.js:410:15
    at Array.forEach (<anonymous>)
    at ReadStream.input.on.input._keypressHandler (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/program.js:408:23)
    at ReadStream.emit (events.js:182:13)
    at ReadStream.EventEmitter.emit (domain.js:441:20)
    at ReadStream.input.on.input._keypressHandler (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/program.js:398:18)
    at ReadStream.emit (events.js:182:13)
    at ReadStream.EventEmitter.emit (domain.js:441:20)
    at /usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/keys.js:318:14
    at Array.forEach (<anonymous>)
    at emitKeys (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/keys.js:134:10)
    at ReadStream.onData (/usr/lib/node_modules/tidal-cli-client/node_modules/blessed/lib/keys.js:49:14)
    at ReadStream.emit (events.js:187:15)
    at ReadStream.EventEmitter.emit (domain.js:441:20)
    at addChunk (_stream_readable.js:287:12)
    at readableAddChunk (_stream_readable.js:268:11)
    at ReadStream.Readable.push (_stream_readable.js:223:10)
    at TTY.onStreamRead [as onread] (internal/stream_base_commons.js:122:17)

@okonek You can track it with that eventId 7c462acc0a164d039e3e0e0c604f3662 d31efc9267d849bfac7c1285472fa624 321867a4841a424fbf39a08377535833 e4e6e9b5a63644fc85808b8f54ad2de4 e33976283d644a8883b98b1b5f3354e1

okonek commented 5 years ago

@kecef Thank you so much for reporting so many bugs. It's very helpful. I'll try to spot the problem in the code.