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

not playing video after youtube changes. more (confused?) uninstalls #1809

Open
1 task
ImprovedTube opened this issue Oct 29, 2023 · 42 comments
Open
1 task
Labels
bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) Riddle

Comments

@ImprovedTube
Copy link
Member

ImprovedTube commented Oct 29, 2023

hi :) @code-charity/contributors ( "assignments" are just a vain hope.. "random ping" )

  • if you also get the issue/s already, please paste the DOM Youtube gives you through copying the root element <html> when errors appear after pressing F12

    Firefox
    • there are different versions depending if you open a new window or clicked a link on youtube

TYSM! ♥

@dodieboy
Copy link
Member

dodieboy commented Oct 29, 2023

v4.339 and 4.401 working fine for me, video all playing for me.

@ImprovedTube
Copy link
Member Author

ImprovedTube commented Oct 29, 2023

@dodieboy
Copy link
Member

V4.400 from the store is working fine for me. Did any user with the problem send their setting export file so we can test?

@dodieboy
Copy link
Member

Can the problem come from user having other ad block extension installed?

Few week ago, I need to add this filter to my ad block extension

! Youtube Anti Anti Ad Blocker
www.youtube.com##+js(set, yt.config_.openPopupConfig.supportedPopups.adBlockMessageViewModel, false)
www.youtube.com##+js(set, Object.prototype.adBlocksFound, 0)
www.youtube.com##+js(set, ytplayer.config.args.raw_player_response.adPlacements, [])
www.youtube.com##+js(set, Object.prototype.hasAllowedInstreamAd, true)

@ImprovedTube
Copy link
Member Author

Can the problem come from user having other ad block extension installed?

sure, besides i believe the uninstall counter and when multiple users say "unless i disable the extension"

Few week ago, I need to add this filter to my ad block extension

can be converted to JS with chatgpt or any

Screenshot_1169

@Desric88
Copy link

Hi, I also had the issue with videos not playing since the latest update. I found some odd things with addon/extension combinations, some helped, some made it worse. This is only for webpages with a video, browsing youtube didn't change.

First off, I have 25 addons for firefox, a 7 of them for Youtube (although I normally dont have all enabled). I tested videos with a variety of combinations, including using only ImprovedYoutube. In particular I found strange interactions with ImprovedYoutube (IY), Ublock Origin (UO) and Enhancer for YouTube (EfY) (although I normally dont have Enhancer for YouTube enabled)

  1. If IY and UO are enabled and EfY is disabled, the page will load, but the video won't play.
  2. If IY is enabled and UO is disabled (EfY makes no difference), then the webpage only loads a few things, leaving 95% of it blank.
  3. If all 3 are enabled: IY, UO, EfY. Then everything loads and plays normally. If IY is disabled then things will also play normally.

I have no idea why EfY is making a difference. I've had it installed but disabled for months. I only discovered the interaction when I was testing some combinations of addons.

@ImprovedTube
Copy link
Member Author

ImprovedTube commented Oct 29, 2023

thanks @Desric88 interesting!

  1. If IY is enabled ... only loads a few things, leaving 95% of it blank.

So our's alone makes the new YouTube not load?😲
Is that even without any features enabled? Did you enable our ad-skipping/-blocking?

  • Please help us figure out what happens. Please check your browser console (f12) for errors when/before they happen.

    • You can even copy the whole root element with everything in it.
      • This is the ultimate method /the main problem, that we cant get the new versions before users do afaik? And often not even at the same time but weeks or month later (years ago https://www.youtube.com/new was for that)
  • Btw Extension errors might also appear at and chrome://extensions/?errors=bnomihfieiccainjcjblhegjgglakjdd after they happened.

@ImprovedTube ImprovedTube pinned this issue Oct 29, 2023
@Desric88
Copy link

Desric88 commented Oct 29, 2023

*As soon as I posted this message, I realised that I didnt post the error logs of normal mode with IY disabled. But now Im getting the 'not loading bug' here too!
**I decided to try clearing cookies and the cache (again), this time for absolutely everything. It appears to have fixed the problem! I'm not able to stick around and make sure everything's working though as I should of been in bed an hour ago.

I've since restarted my computer from my last post. Not only have I found new things, but some things are behaving differently.

  1. How I get to a video matters. If I refresh the page, CTRL click video into a new page, or copy/paste the address to a new page: the wepage doesnt load 95% of the stuff there, leaving it mostly blank and black. If UO is enabled as well then like before it loads the webpage, but the video doesnt play. If I click on a video as normal, so it loads from the existing page, then there are no issues. My previous tests were all from me refreshing the page each time I made a change.
  2. This is only effecting one of my youtube accounts (I knew this previously but forgot to say it). I've had issues with my account before, but those issues happened regardless of my browser, addons, device etc.
  3. When I tried it in incognito mode with my effected account, youtube worked just fine.
  4. I left one of the blank, not loading, webpages idle for a while and after 1-5 minutes the video loaded and played.

While writing this I was tinkering more and now my homepage is acting weird, again. Once I had a few things load on a sidebar where they shouldnt have. Other times I got an old problem where the 'bar' with buttons like All, Music, New to You wont load, no matter what I do, even if I use my phone with the app or a browser. I'm certain that this account is bugged.

Other things Ive tested:

  1. With and without Firefox's "enhanced tracking protection". No difference
  2. Using Chrome, instead of Firefox. Working fine.
  3. (I did this 1 or 2 days ago, to try and fix the problem): clearing cookies+site data for youtube, and cached content for all websites

Attached are 3 txt documents with error logs that I copy pasted from Firefox's console. Incognito with and without IY enabled and another in the normal mode with IY enabled (and IY is the only addon enabled)
Also attached a picture of the not loading bug.

Incognito with IY.txt
Icognito without IY.txt
Normal test.txt
The not loading bug

If anyone knows anything about the the 'bar' not loading, or wants pics of what it looks like, ask. It's really annoying how it randomly chooses what weeks it wants to show up.

@D-Rekk
Copy link
Contributor

D-Rekk commented Oct 29, 2023

I just tried 4.40 and 4.41. No issues at all, even with UBlock Origin and friendly AdBlock activated 😓. I'm using Chromium 118.

@ImprovedTube
Copy link
Member Author

ImprovedTube commented Oct 29, 2023

🥰 thank you! @Desric88

Incognito with IY.txt

(shows nothing broken and you said it works in incognito. Can you send one where errors happen?)

  • You can even copy the whole root element with everything in it.
    - This is the ultimate method /the main problem, that we cant get the new versions before users do afaik? And often not even at the same time but weeks or month later (years ago https://www.youtube.com/new was for that)

this will really help so that we can compare the DOM with what we still get /the old one
thanks

(and long term we should have people /a script doing this every single time youtube changes for anyone.)

@Desric88
Copy link

@ImprovedTube Good news, Im not getting the bugs any more, but bad news, Im not getting the bugs anymore so no additional reports unfortuantly.
Also I didnt know what or how to get the 'root element' and at the time I didn't think I had the time to learn how, sorry.

The thing that appears to have fixed it for me was clearing all data/cache/cookies from my whole browser instead of just things from youtube. Since then I cant reproduce any of the bugs.

@Venryx
Copy link
Contributor

Venryx commented Oct 31, 2023

Don't have time to debug this issue specifically, but just wanted to mention that when working on a Youtube-related chrome extension, I noticed that the elements on the page were loaded very differently depending on if you started on the page, clicked there from another video, or clicked there from the homescreen; my interpretation at the time was that YouTube was "sending the full page contents with the initial HTML response" in some of those loading conditions (presumably when loading page anew or refreshing), whereas in others it would load it dynamically (presumably when autoplaying to or clicking the next video), with the varying routes resulting in different DOM structures.

So basically: Any testing for this issue will need to cover each of the different "page loading conditions", since the DOM structure differs between them. (Oh also: Not only does the DOM structure differ, I remember that youtube liked to "keep around" the DOM for the video that was initially loaded, even after the user had moved onto the next video. So you can't just globally search for classname matches, for example, you have to make sure you only look in the DOM elements for the "current video". It was kind of a mess IIRC, and even my fixes for it were not 100% comprehensive.)

@ImprovedTube
Copy link
Member Author

ImprovedTube commented Oct 31, 2023

@Venryx exactly! what code of yours are you referring to? thanks!

@IntrepidWanderer
Copy link

Hello, I'd like to help but as a complete non-coder, I can only describe the issues I'm having. If any debug logs are needed, I can also provide that, if there are detailed instructions on how to obtain the logs.

Primary issues I'm experiencing with playback on Youtube since a few days ago has persisted with the latest 4.401, even after complete restart of browser, along with clearing of all cache and cookies.

I'm mostly experiencing it as an inability to use the defined play/pause keyboard shortcut, which I've set as the spacebar (I believe this is also default key for Youtube?) After opening a video's page, pressing spacebar doesn't start the video, I see the player's play button go from pause to play very rapidly (less than a second) then switch back, without the video playing at all. The only way to get the video to start playing is by clicking on the play button with my mouse. Then after it's started, pressing spacebar cannot stop the video either. Same symptom of seeing the player's play button status rapidly switching from play to puase and then play again. In step with the button status change, the video would incrementally pause briefly during that short time, but ultimately resumes playing. In this case I have to use the mouse again to click on the button in order to get the video to stop. Even then, actual video pausing is always a half second later, rather than immediately.

I'm on Windows 7 SP1, browser Slimjet Version 38.0.9.0 (based on Chromium 109.0.5414.74) (Official Build) (32-bit). I only have a very few number of extensions installed and enabled, none of which have changed since before the problems began. Among these, uBlock Origin and Autoplay Stopper are the only ones also enabled on Youtube. I have Autoplay Stopper set to allow autoplay for http:// and https:// for www.youtube.com, and I've also tried disabling the extension outright. Nothing changes, so I don't think that's the issue. The same thing for uBlock Origin, I've tried disabling the extension, leaving nothing but ImproveYoutube running, and deleted cookies, reloaded the same video's page, the same symptoms with playback's shortcut not working persists.

For testing I used the same video, and was not logged in to Youtube. Here are all the errors I copied from the browser console:
Console Errors (Only IY).txt

Also wanted to say a big Thank You to all contributors for ImproveYoutube plugin. Considering how frequently Youtube updates their code and breaks things, the amount of work required in maintaining the extension and ensuring everything works properly must be staggering. Thank you for everything you do and for making ImproveYoutube free, allowing everyone to use it and enjoy Youtube with a little less annoyance. :)

@ImprovedTube
Copy link
Member Author

hi @PoorChameleon, removing since it didn't help the uninstalls count... - had to try since we still see many uninstalls (since YouTube's updates, October 18).

@stuart-brown
Copy link

stuart-brown commented Nov 10, 2023

I encountered this problem. Disabling the extension allowed videos to play. So I uninstalled and reinstalled. Videos still worked after the reinstall. Then I turned off "Video> Autoplay", and video playback stopped. Toggle this option back on, and videos play again. So it seems the bug is related to the autoplay feature. Hope this information is useful. My version is 4.404 on Brave Version 1.60.114 Chromium: 119.0.6045.124 (Official Build) (64-bit)

@ImprovedTube
Copy link
Member Author

ImprovedTube commented Nov 11, 2023

hi @stuart-brown, thanks, so then does the player stay black and impossible to start? ( - or is it just that the feature works, and that is is confusing in our menu, just to represent YouTube's default).

Please look for errors in the browser console while errors happend and chrome://extensions/?errors=bnomihfieiccainjcjblhegjgglakjdd after they happened - and copy the DOM (the <html> element in the top (screenshot above), and the html source ( ctrl+U)


...please stay alert guy & let us know if you catch the issue #1809 or any... thanks!

@stuart-brown
Copy link

hi @stuart-brown, thanks, so then does the player stay black and impossible to start? ( - or is it just that the feature works, and that is is confusing in our menu, just to represent YouTube's default).

Please look for errors in the browser console while errors happend and chrome://extensions/?errors=bnomihfieiccainjcjblhegjgglakjdd after they happened - and copy the DOM (the element in the top (screenshot above), and the html source ( ctrl+U)

...please stay alert guy & let us know if you catch the issue #1809 or any... thanks!

Hi.

No the screen is not black, it shows the preview image. But the play button does nothing, the video never plays. It is not a case of confusing configuration.

I did not see any errors in the extension page (chrome://extensions/?errors=bnomihfieiccainjcjblhegjgglakjdd).

I have attached the errors from the browser console.
www.youtube.com-1699752277055.log. The attached log includes a page load and a press on the play button. When pressing the play button the following error pops up in the console:

POST https://www.youtube.com/api/stats/qoe?fmt=399&afmt=251&cpn=rvlM8Kf71_96W6EI&el=detailpage&ns=yt&fexp=v1%2C23983296%2C2721%2C18627%2C2602%2C73492%2C54572%2C633%2C72822%2C10616%2C152017%2C381%2C13949%2C53633%2C84737%2C17228%2C1867%2C4%2C4%2C6585%2C672%2C8868%2C1090%2C5877%2C394%2C3200%2C130012%2C26306282%2C4054%2C445%2C808%2C677%2C5181%2C9369%2C820%2C736%2C2040%2C7229%2C859%2C406%2C688%2C1431%2C885%2C2345%2C681%2C1556%2C1864%2C877%2C3887%2C2898%2C1616%2C946%2C806&cl=580336156&seq=5&docid=ShBh8GSaHdM&ei=NilQZfS6AbGgz7sP1OWi4Ac&event=streamingstats&plid=AAYJ6mjVz2BdRLOi&qclc=ChBydmxNOEtmNzFfOTZXNkVJEAU&embargoed=0&cbr=Chrome&cbrver=119.0.0.0&c=WEB&cver=2.20231110.00.00&cplayer=UNIPLAYER&cos=Windows&cosver=10.0&cplatform=DESKTOP&vps=313.484:B,313.493:PB,313.993:PA,316.924:B,316.938:PB,317.444:PA,317.845:B,317.868:PB,318.369:PA&bwe=320.017:2694995&bat=320.017:1:1&bh=320.017:55.931 net::ERR_BLOCKED_BY_CLIENT
goa @ base.js:1956
(anonymous) @ base.js:1941
J7a @ base.js:6474
(anonymous) @ base.js:6495
(anonymous) @ base.js:8436
T7a @ base.js:6494
(anonymous) @ base.js:11985
(anonymous) @ base.js:6499
(anonymous) @ base.js:1909
base.js:1956  

Hope this helps clear things up.

@ImprovedTube
Copy link
Member Author

TYSM @stuart-brown!! hopefully we figure it out!

(And the amount of uninstalls remains a riddle, a bug with autoplay most single features may result in fewer uninstalls)

@ImprovedTube
Copy link
Member Author

hi! @raingart thank you, not sure i understood. did you implement that?

@ImprovedTube ImprovedTube changed the title not playing video after youtube changes - many uninstalls. not playing video after youtube changes. more (confused?) uninstalls Dec 1, 2023
@PoorChameleon
Copy link

Here are a few observations I've made, which could be totally wrong:

What seems to be happening is YT detecting that you're using an adblock and flagging your account either with a cookie, internally, or both. This results in the player not loading a video, or taking a while to load with a weird, almost blank screen and then having the video paused after the whole page has loaded.

Okay, why does disabling the addon help for some people then? I don't know, but somehow it can be tracked and linked to your account and/or cookies identifier. Even if it did, the same behavior would probably occur eventually.

Things I've tried:

  1. Disabling the addon

    • Didin't work for me
  2. Deleting all YT/ Google cookies, restarting the browser and logging in again

    • This works, at least for a while or until you're detected again
  3. Changing your user-agent or using a different browser

    • This might work temporarily, but eventually all of your user-agents will get blocked
  4. Incognito/Private window (or anything that results in fresh or different cookies like no account/etc)

    • Works, but inconvenient

Also when this starts happening and you open videos in a new tab (middle click), the addon will fail to set video volume if you have a default one set (and of course autoplay), but player size is set correctly. If you open a video in the same tab you're already on (left click), everything works just fine including page loading and autoplay.

Most of this has been said before, but I just wanted to clarify that it probably is just YT detecting you adblocking and screwing things up until you clear cookies or use a different method.

To clarify this is with Firefox and could be completely different for other users, I haven't really kept up with things lately.

One way to semi fix this might be to detect this happening and re-initialize autoplay/volume and whatever else

@ImprovedTube
Copy link
Member Author

ImprovedTube commented Jan 4, 2024

hi! @PoorChameleon
thanks! so you have no automated way yet(?)

detect this happening and re-initialize autoplay/volume and whatever else

after you manually confirmed the alert?

re-initialize

(or maybe it could be detected before the first try)

just wanted to clarify that it probably is just YT detecting you adblocking and screwing things up until you clear cookies or use a different method

lets tag the people from the recent issues about autoplay, volume, etc. to discuss this.

@ImprovedTube
Copy link
Member Author

ImprovedTube commented Jan 4, 2024

(uninstalls /re-installs are still increased.)

ImprovedTube added a commit that referenced this issue Jan 12, 2024
@JLewis1309
Copy link

I encountered this problem. Disabling the extension allowed videos to play. So I uninstalled and reinstalled. Videos still worked after the reinstall. Then I turned off "Video> Autoplay", and video playback stopped. Toggle this option back on, and videos play again. So it seems the bug is related to the autoplay feature. Hope this information is useful. My version is 4.404 on Brave Version 1.60.114 Chromium: 119.0.6045.124 (Official Build) (64-bit)

Sorry if this is old but ive had ImprovedTube disabled for months because of this issue and turning Autoplay on worked for me

@ImprovedTube
Copy link
Member Author

ImprovedTube commented Feb 18, 2024

hi! also using brave? @JLewis1309 reinstalls/uninstalls still seem slightly increased, so will have a close look after editing our feature to disable auto play. (and we should re-structure all features to clean/reduce Youtube, since it might confuses if the switch is representing youtube's default directly (instead of calling our feature "autoplay-off")

@ugackMiner53
Copy link
Contributor

I'm using Firefox, and with version 4.615, I can confirm that with the "Autoplay" setting off, the video will not start, instead playing a few milliseconds of the video before pausing again (when the video is opened in a new tab). However, when clicking on a video from the homepage, I haven't had this problem.

video.mp4

The attached video should show the difference between opening the video in a new tab and clicking on a video from an already loaded tab.
(The video first shows opening in a new tab, pressing K, holding down K, spam clicking, and clicking the play/pause button before showing what happens when the video is clicked from the original tab.)

Turning on "Autoplay" fixed this issue for me.

@ImprovedTube ImprovedTube added Riddle and removed Bug Bug or required update after YouTube changes important Critical? (bad or common issue) labels Feb 22, 2024
@ImprovedTube
Copy link
Member Author

ImprovedTube commented Feb 22, 2024

hi, @ugackMiner53 thank you!

our autoplay:off function itself should now only try once (global variable):

AUTOPLAY
------------------------------------------------------------------------------*/
ImprovedTube.autoplay = function () {

...
{if (!ImprovedTube.autoplayDeniedOnce) {
setTimeout(function () { video.pauseVideo(); });
ImprovedTube.autoplayDeniedOnce = true;
} else { console.log("autoplay:off - should we pause here again?"); } }
};


code is also prepared to pause here:

} else if (request.action === 'pause') {
extension.messages.send({
pause: true
});
but thats code isn't used


does it depend what youtube account? - #1851 (then you can look up all the experiements YouTube activated for that account)

@ImprovedTube
Copy link
Member Author

ImprovedTube commented Feb 22, 2024

I'm using Firefox, and with version 4.615, I can confirm that with the "Autoplay" setting off, the video will not start

..please try old versions, starting with 3.9xx, two years ago @ugackMiner53 @Evoden1 @ballo @xeophyte @Anoaxx ,
https://web.archive.org/web/20231026140135/https://addons.mozilla.org/en-US/firefox/addon/youtube-addon/versions/

(https://addons.mozilla.org/en-US/firefox/addon/youtube-addon/versions/ )

#1495

thanks!

@ImprovedTube
Copy link
Member Author

hi! @ugackMiner53 @stuart-brown @JLewis1309
i guess the bug repeatedly pausing with our autoplay-off feature is gone for you since ~6 weeks?

@xeophyte
Copy link

For me on Firefox 124 and IYT v4.805 autoplay doesn't work, v3.901 also doesn't work, without IYT extension also doesn't work.

@ImprovedTube
Copy link
Member Author

ImprovedTube commented Mar 21, 2024

without IYT extension also doesn't work.

"amazing" 🤣

@JLewis1309
Copy link

hi! also using brave? @JLewis1309 reinstalls/uninstalls still seem slightly increased, so will have a close look after editing our feature to disable auto play. (and we should re-structure all features to clean/reduce Youtube, since it might confuses if the switch is representing youtube's default directly (instead of calling our feature "autoplay-off")

Sorry for late reply
I use Opera GX

@ImprovedTube
Copy link
Member Author

thanks! what about

@JLewis1309
i guess the bug repeatedly pausing with our autoplay-off feature is gone for you since ~6 weeks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) Riddle
Projects
None yet
Development

No branches or pull requests