muse icon indicating copy to clipboard operation
muse copied to clipboard

node-ytsr deprecated and broken for certain inputs

Open WaverlyCole opened this issue 1 year ago • 5 comments

/home/container/node_modules/ytsr/lib/parseItem.js:415 rawItems = (obj.content.verticalListRenderer || obj.content.horizontalMovieListRenderer).items; ^ TypeError: Cannot read properties of undefined (reading 'items') at parseShelf (/home/container/node_modules/ytsr/lib/parseItem.js:415:94) at parseItem (/home/container/node_modules/ytsr/lib/parseItem.js:32:14) at catchAndLogFunc (/home/container/node_modules/ytsr/lib/parseItem.js:90:12) at module.exports (/home/container/node_modules/ytsr/lib/parseItem.js:119:46) at (/home/container/node_modules/ytsr/lib/main.js:53:34) at Array.map () at module.exports (/home/container/node_modules/ytsr/lib/main.js:53:25) at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5) at KeyValueCacheProvider.wrap (/home/container/src/services/key-value-cache.ts:53:20) /******************************************************************************************************************************************************************************************************** failed at func parseItem: Cannot read properties of undefined (reading 'items') pls post the the files in /home/container/node_modules/ytsr/dumps to https://github.com/TimeForANinja/node-ytsr/issues os: linux-x64, node.js: v16.20.2, ytsr: 3.8.4
/home/container/node_modules/ytsr/lib/parseItem.js:415 rawItems = (obj.content.verticalListRenderer || obj.content.horizontalMovieListRenderer).items; ^ TypeError: Cannot read properties of undefined (reading 'items') at parseShelf (/home/container/node_modules/ytsr/lib/parseItem.js:415:94) at parseItem (/home/container/node_modules/ytsr/lib/parseItem.js:32:14) at catchAndLogFunc (/home/container/node_modules/ytsr/lib/parseItem.js:90:12) at module.exports (/home/container/node_modules/ytsr/lib/parseItem.js:119:46) at (/home/container/node_modules/ytsr/lib/main.js:53:34) at Array.map () at module.exports (/home/container/node_modules/ytsr/lib/main.js:53:25) at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5) at KeyValueCacheProvider.wrap (/home/container/src/services/key-value-cache.ts:53:20) /
failed at func parseItem: Cannot read properties of undefined (reading 'items') pls post the the files in /home/container/node_modules/ytsr/dumps to https://github.com/TimeForANinja/node-ytsr/issues os: linux-x64, node.js: v16.20.2, ytsr: 3.8.4 ********************************************************************************************************************************************************************************************************\

WaverlyCole avatar Feb 20 '24 15:02 WaverlyCole

command was /play https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M

WaverlyCole avatar Feb 20 '24 15:02 WaverlyCole

Apparently the module throwing this error is now deprecated, happy to accept a PR replacing this. Otherwise I may be able to get to it this weekend.

codetheweb avatar Feb 23 '24 05:02 codetheweb

It does seem to still work for most tracks.

codetheweb avatar Feb 23 '24 06:02 codetheweb

Distube's fork of ytsr seems to work fine. Its being actively maintained until now and I mostly use their fork now instead.

Kinuseka avatar Mar 24 '24 11:03 Kinuseka

Apparently the module throwing this error is now deprecated, happy to accept a PR replacing this. Otherwise I may be able to get to it this weekend.

What's the status on this? I set up the bot yesterday and it crashes after a single song every time. Would it be possible to just drop in a fork like the one from distube (like @Kinuseka is suggesting)?

(Would try and PR myself but I currently have no time :/)

C0ntroller avatar Apr 09 '24 20:04 C0ntroller

It worked for me for months and now its broken, with this exact same error

xxtensazenxx avatar Jul 10 '24 03:07 xxtensazenxx

🚀 Released in Release v2.9.0.

github-actions[bot] avatar Jul 18 '24 04:07 github-actions[bot]