museofficial / muse

🎧 a self-hosted midwestern Discord music bot that doesn't suck
MIT License
880 stars 229 forks source link

node-ytsr deprecated and broken for certain inputs #1000

Closed WaverlyCole closed 3 months ago

WaverlyCole commented 8 months ago

/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 commented 8 months ago

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

codetheweb commented 8 months ago

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 commented 8 months ago

It does seem to still work for most tracks.

Kinuseka commented 7 months ago

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

C0ntroller commented 6 months ago

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 :/)

xxtensazenxx commented 3 months ago

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

github-actions[bot] commented 3 months ago

🚀 Released in Release v2.9.0.