Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-ytsr deprecated and broken for certain inputs #1000

Open
WaverlyCole opened this issue Feb 20, 2024 · 5 comments · May be fixed by #1024
Open

node-ytsr deprecated and broken for certain inputs #1000

WaverlyCole opened this issue Feb 20, 2024 · 5 comments · May be fixed by #1024
Labels
bug Something isn't working support

Comments

@WaverlyCole
Copy link

/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
Copy link
Author

@codetheweb
Copy link
Owner

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
Copy link
Owner

It does seem to still work for most tracks.

@codetheweb codetheweb changed the title Bot crashes when trying to play a spotify playlist node-ytsr deprecated and broken for certain inputs Feb 23, 2024
@codetheweb codetheweb added bug Something isn't working support and removed support labels Feb 23, 2024
@Kinuseka
Copy link

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

@C0ntroller
Copy link

C0ntroller commented Apr 9, 2024

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

@sonroyaalmerol sonroyaalmerol linked a pull request Apr 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants