Closed thinktapper closed 3 months ago
Thanks for reporting this Starting with the first error
file:///Users/{{REDACTED}}/.npm/_npx/00e04e11bd4e38b3/node_modules/yt2alt/src/youtube.js:199
title: playlist.title.text
^
TypeError: Cannot read properties of undefined (reading 'text')
When you open https://www.youtube.com/feed/playlists, do you see a playlist that is not normal / does not have a title? (perhaps a special type of playlist or something)? I assumed all playlists would have a title
I see two playlists with emojis in the titles - which could be considered abnormal/non-text..
Emojis seem to be captured fine
I might need to add some sort of flag to dump the request/response payload and get a more clear picture
You can try the new version with npx yt2alt -- --debug
, it wouldn't fix it, but maybe there are some logs that could indicate something it going wrong. It's not a full dump of the response, so it might or might not help
Here's most of the output of running npx yt2alt --debug
:
There was session data printed out before this step that I didn't include due to the potential sensitivity of its content, but let me know if session data/client identity stuff could be useful
@iBicha should I elevate this to youtube.js?
Actually, I went ahead and did some debugging on my own and tracked down the issue 🏋️♂️
I have a fix for it too, but wondering if I should submit the fix here or upstream to youtube.js itself? Edit: nvm the fix is for yt2alt's src/youtube.js not the dependency
This is the playlist that caused the title: playlist.title.text
undefined
error:
There's a check in the toPlaylist()
method that checks
if (playlist.type === 'LockupView' && playlist.content_type === 'PLAYLIST')
...but not
playlist.content_type === 'PODCAST'
which this single playlist on my account has.
Submitting a pr now :)
@thinktapper Thanks for keeping the issue updated with your debugging, it helped me to use the tool without having to wait for the PR to be merged (which helped my anxiety haha)
yt2alt worked successfully as expected on my first run using one of my google accounts. However, I encountered multiple errors when attempting a second time using a different google account.
I tried updating node/npm versions to no avail.
I received this output 5/6 of my troubleshooting attempts:
Interestingly, I received a different error in this output from my 3rd attempt:
Please let me know if any other info could be useful.
Edit by @iBicha : removed pairing code in second log