-
-
Notifications
You must be signed in to change notification settings - Fork 561
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
Cannot read properties of undefined (reading 'playlistData') #1720
Comments
adding if (this.elements.ytd_watch.playlistData) |
yay my old bug, lets revisit youtube/js&css/web-accessible/www.youtube.com/playlist.js Lines 7 to 21 in 85bf124
Not this horrible code again ! :D reminds me of autoplayDisable :]. Similarly here it does nothing but crashes because this.elements.ytd_watch.playlistData doesnt exist inside setinterval. At least here its inside try{} and could actually work in theory with fixed scope, but it would be much better to fix it properly. There is no need for trying to force run it, proper fix is testing for |
almost young |
Bug Report:
⚬ BUG:
extension crashes with "Cannot read properties of undefined (reading 'playlistData')"
⚬ HOW:
1 satus.storage.clear()
2 import settings attached below
3 go to a playlist, for example: https://www.youtube.com/playlist?list=PLqPaeYdiNYymLVvaUjj4AzIDJBGQ2kCOl
4 click on one of the videos, for example position 11 with this link url: https://www.youtube.com/watch?v=Y0fiNUqqRic&list=PLqPaeYdiNYymLVvaUjj4AzIDJBGQ2kCOl&index=11&pp=iAQB
5 we land on url: https://www.youtube.com/watch?v=zvBZ-Tm2fbU&list=PLqPaeYdiNYymLVvaUjj4AzIDJBGQ2kCOl&index=11
6 console gets this:
I tried narrowing it down by cutting settings in half, error doesnt show up if I try either upper or just lower half of attached settings :o Its a combination of playlist_up_next_autoplay = false to jump into
youtube/js&css/web-accessible/www.youtube.com/playlist.js
Line 12 in 3e1b34e
and one other settings somehow causing ytd_watch creation that is happening here
youtube/js&css/web-accessible/functions.js
Line 197 in 3e1b34e
youtube/js&css/web-accessible/functions.js
Line 383 in 3e1b34e
Edit: it might not even be a specific setting delaying, I just noticed playlistUpNextAutoplay is triggered automagically by playerOnPause here https://github.com/code-charity/youtube/blob/3e1b34e35e73743161100f06ce6d6e2cdb466060/js%26css/web-accessible/functions.js#L305C35-L305C61 as soon as video starts playing and is auto paused. It might be as simple as number of settings to process is enough to delay? in any case this is a logical error (use before initialization).
Setup:
⚬ ImprovedTube Version: 4.20
⚬ Browser: Chrome/114.0.0.0
⚬ Settings:
{"player_hide_skip_overlay":false,"player_popup_button":false,"player_quality":"hd1080","player_remaining_duration":false,"player_rotate_button":false,"player_show_cards_on_mouse_hover":false,"player_size":"max_width","player_subtitles":false,"player_transparent_background":false,"playlist_autoplay":false,"playlist_up_next_autoplay":false}
⚬ OS: W10
The text was updated successfully, but these errors were encountered: