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

🟥 ALL YouTube issues: D-O-N-'T COMMENT without reading the 1st post🟥 #20586

Open
5 tasks done
stephenhawk8054 opened this issue Nov 10, 2023 · 2,210 comments
Open
5 tasks done
Labels
ongoing ongoing issue

Comments

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Nov 10, 2023

⚠️ P-L-E-A-S-E, PLEASE, PLEASE, PLEASE read and follow all of the instructions first ⚠️

Note: After each step, close your current tabs and open new tab to test again or it won't work.

If you got 282054944 error on player, DO NOT CLEAR COOKIES.

  • I updated uBO to the latest versions (1.60.0+)
video tutorial
1-update-uBO.mp4
video tutorials
2-disabling-custom-filter-config.mp4
2-2-reset-to-defaults.mp4
  • My filter lists are up to date.

click this link then load Youtube in a new tab.

Some browsers with built-in blockers

  • Opera, Vivaldi, Brave
  • Edge: Click on "lock" icon at the left of URL bar -> Turn off Tracking Prevention
video tutorial
4-disabling-extensions.mp4
  • I did not remove any of the default filter lists, or I have verified that the issue was not caused by removing any of the default lists.

Restarting your browser afterwards may help too. On Chromium-based browsers uBO can't reliably block ads after you launched browser or switched profiles including "Open link in incognito" and "Open link as User X". This state of unable-to-block will be kept until you do manual refresh of the page.


🟥 When reporting, A-L-W-A-Y-S provide your Troubleshooting Information! ALWAYS!! 🟥

  • On YouTube page that has issue: click 🛡️ uBO's icon > 💬 Report > Click "Troubleshooting information" > Select all > Copy > Share it.
video tutorial
5-copying-troubleshooting-info.mp4
  • Then share the EXACT links / URLs that you see the issue.
  • Describe the steps to reproduce in the most details as possible.
  • Provide video recordings of how to reproduce the issue.

It is Youtube's own issue that endcards are shown too early if SSAP ads play. Do not report them as uBO's issue unless you're 100% sure this is caused by filters.


If you suffer slow loading, test

www.youtube.com##+js(nano-stb, resolve(1), *, 0.001)
www.youtube.com##+js(set, yt.config_.EXPERIMENT_FLAGS.web_enable_ab_rsp_cl, false)
www.youtube.com##+js(set, yt.config_.EXPERIMENT_FLAGS.ab_pl_man, false)
||googlevideo.com/videoplayback$xhr,3p,method=get,domain=www.youtube.com

at your own risk.


Old youtube threads

@stephenhawk8054 stephenhawk8054 added the ongoing ongoing issue label Nov 10, 2023
@stephenhawk8054
Copy link
Member Author

stephenhawk8054 commented Nov 10, 2023

June 2024 - YouTube SSAP ads issue: PLEASE UPDATE QUICK FIX LIST by clicking this link

When reporting, please tell exactly which BROWSER you are using, which METHOD you are testing and DESCRIBE the steps to reproduce the issue in details, including the URLs where you see the issue.

@stephenhawk8054 stephenhawk8054 pinned this issue Nov 10, 2023
@mapx- mapx- mentioned this issue Nov 10, 2023
10 tasks
@TheAGames10

This comment was marked as off-topic.

@iam-py-test

This comment was marked as off-topic.

@TheAGames10

This comment was marked as off-topic.

@iam-py-test
Copy link
Contributor

iam-py-test commented Nov 10, 2023

Disable everything other than uBlock Origin and see if it does away.
Then, enable them one-by-one and see which one caused it.
Thanks

@TheAGames10

This comment was marked as resolved.

@u-RraaLL

This comment was marked as resolved.

@FrostedNiips

This comment was marked as outdated.

@stephenhawk8054
Copy link
Member Author

@FrostedNiips Please follow the instructions in the top post

stephenhawk8054 added a commit that referenced this issue Nov 12, 2023
stephenhawk8054 added a commit that referenced this issue Nov 12, 2023
@somebody0278

This comment was marked as outdated.

@stephenhawk8054

This comment was marked as outdated.

@somebody0278

This comment was marked as outdated.

@stephenhawk8054

This comment was marked as off-topic.

@somebody0278

This comment was marked as outdated.

@stephenhawk8054

This comment was marked as outdated.

@mapx- mapx- mentioned this issue Nov 12, 2023
10 tasks
@stephenhawk8054
Copy link
Member Author

@somebody0278 Can you do these steps (follow strictly the step order, don't mix the steps orders, or skip any steps):

  1. Click on uBO icon > ▤ "The logger" icon, it will open a logger window
  2. Open new tab and reproduce the issue
  3. Switch to the logger window that was opened in step 1, click on search bar, choose blocked
  4. Copy the logger via 📋 export/copy button at the top right
  5. Paste the logs here

@MandiYang

This comment was marked as outdated.

@stephenhawk8054

This comment was marked as outdated.

@MandiYang

This comment was marked as outdated.

@MandiYang

This comment was marked as outdated.

@stephenhawk8054

This comment was marked as outdated.

@MandiYang

This comment was marked as outdated.

@stephenhawk8054

This comment was marked as outdated.

@stephenhawk8054
Copy link
Member Author

@MRxShoody Can you do that in chromium?

@MRxShoody
Copy link

@MRxShoody Can you do that in chromium?

you mean chrome ? edge uses chrionium already no ?

@stephenhawk8054
Copy link
Member Author

@MRxShoody Yes, I mean Edge

@MRxShoody
Copy link

@MRxShoody Yes, I mean Edge

then all the tests/screens above were on edge

@stephenhawk8054
Copy link
Member Author

@MRxShoody Can you remove all custom fitlers and add these:

www.youtube.com#@#+js(trusted-rpnt, script, (function serverContract(), "YOUTUBE_PREMIUM_LOGO"!==ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType&&(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;if(!t.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP\, AD"))return;const e=t.getProgressState?.();e&&e.duration>0&&(e.loaded<e.duration||e.duration-e.current>1)&&t.seekTo?.(e.duration)};t()\,new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})})));(function serverContract(), sedCount, 1)

www.youtube.com#@#+js(trusted-replace-fetch-response, /"adPlacements.*?([A-Z]"\}|"\}{2\,4})\}\]\,/, , player?)
www.youtube.com#@#+js(trusted-replace-fetch-response, /"adSlots.*?\}\}\]\,"adBreakHeartbeatParams/, "adBreakHeartbeatParams, player?)
www.youtube.com#@#+js(json-prune-fetch-response, playerAds adPlacements adSlots playerResponse.playerAds playerResponse.adPlacements playerResponse.adSlots, , propsToMatch, /playlist?)
www.youtube.com#@#+js(json-prune-fetch-response, playerAds adPlacements adSlots playerResponse.playerAds playerResponse.adPlacements playerResponse.adSlots [].playerResponse.adPlacements [].playerResponse.playerAds [].playerResponse.adSlots, , propsToMatch, /player?)
www.youtube.com#@#+js(json-prune-fetch-response, reelWatchSequenceResponse.entries.[-].command.reelWatchEndpoint.adClientParams.isAd entries.[-].command.reelWatchEndpoint.adClientParams.isAd, , propsToMatch, url:/reel_watch_sequence?)

www.youtube.com##+js(trusted-rpnt, script, (function serverContract(), 'console.log("uBO - Injected");const applyHandler=function(target,thisArg,args){const fetchPromise=Reflect.apply(target,thisArg,args);return fetchPromise.then((responseBefore=>{const response=responseBefore.clone();const url=response.url;return response.json().then((objBefore=>{console.log(url,JSON.stringify(objBefore));return objBefore})).catch((reason=>responseBefore))})).catch((reason=>fetchPromise))};window.fetch=new Proxy(window.fetch,{apply:applyHandler});(function serverContract()', sedCount, 1)

then share the log from the console?

@stephenhawk8054
Copy link
Member Author

The log looks strange. @MRxShoody Can you screenshot the whole screen + devtools?

@stephenhawk8054
Copy link
Member Author

@MRxShoody Can you replace the last filter with this:

www.youtube.com##+js(trusted-rpnt, script, (function serverContract(), 'console.log("uBO - Injected");const applyHandler=function(target,thisArg,args){const fetchPromise=Reflect.apply(target,thisArg,args);return fetchPromise.then((responseBefore=>{const response=responseBefore.clone();const url=response.url;return response.json().then((objBefore=>{if(!url.includes("gstatic.com")){console.log(url,objBefore)}return objBefore})).catch((reason=>responseBefore))})).catch((reason=>fetchPromise))};window.fetch=new Proxy(window.fetch,{apply:applyHandler});(function serverContract()', sedCount, 1)

and get all the logs again?

@stephenhawk8054
Copy link
Member Author

@MRxShoody Can you remove all other filters and test this:

www.youtube.com##+js(set, yt.config_.EXPERIMENT_FLAGS.web_bind_fetch, false)

@MRxShoody
Copy link

@MRxShoody Can you remove all other filters and test this:

www.youtube.com##+js(set, yt.config_.EXPERIMENT_FLAGS.web_bind_fetch, false)

well done, that's the culprit

@lorddoskias

This comment was marked as resolved.

@stephenhawk8054
Copy link
Member Author

@lorddoskias Test again in a new browser profile with only uBO and its default settings. However, you are using an old version of chromium so we can't assure uBO can work properly on it.

Try testing again in an updated chromium browser.

@lorddoskias
Copy link

I updated my browser to Chromium 129.0.6668.70 for Linux Mint and indeed now I don't see the ads.

@Sarthak104
Copy link

Sarthak104 commented Oct 3, 2024

Issue facing: YouTube video takes some loading before it actually starts playing.
uBO version: 1.60 (Last updated on 2nd October 2024)
Tested on browser: Firefox v130.0.1 (64-bit)

Issue explained in detail: So basically, whenever I am trying to play any video on youtube, first it is showing the loading icon and then after some time the video starts playing. A delay is coming, between clicking on a video and the video actually playing. What I tried so far:

  • Did all the steps mentioned in the first post.
  • Tried the filter setting which is mentioned under the if you suffer loading section in the first post.
  • Tried multiple filters mentioned in previous responses by @stephenhawk8054

One of the fixes which I tried was, I created a new profile on Firefox. Just installed the uBO extension, no other extension. Then tried playing a YT video without logging in my YT account. It worked fine. There were no ads coming and there wasn't any loading as well.

As soon as I logged in, in my YT account, the loading appeared again.

Video of the issue:
https://github.com/user-attachments/assets/6982fe1b-9f0d-463d-9896-acfec5fce73f

Troubleshooting information:

uBlock Origin: 1.60.0
Firefox: 130
filterset (summary):
 network: 149817
 cosmetic: 48427
 scriptlet: 21108
 html: 2001
listset (total-discarded, last-updated):
 default:
  user-filters: 4-0, never
  ublock-filters: 40573-131, 4h.36m Δ
  ublock-badware: 11262-6, 4h.36m Δ
  ublock-privacy: 1270-22, 4h.36m Δ
  ublock-unbreak: 2537-1, 4h.36m Δ
  ublock-quick-fixes: 144-14, 16m
  easylist: 85686-185, 4h.36m Δ
  easyprivacy: 53129-62, 4h.36m Δ
  urlhaus-1: 24765-0, 21h.20m
  plowe-0: 3546-993, 21h.20m
filterset (user): [array of 4 redacted]
userSettings:
 userFiltersTrusted: true
hiddenSettings: [none]
supportStats:
 allReadyAfter: 440 ms
 maxAssetCacheWait: 218 ms
 cacheBackend: indexedDB
popupPanel:
 blocked: 60
 network:
  youtube.com: 26
  doubleclick.net: 3
  google.com: 25
  googlevideo.com: 6
 extended:
  ##.ytp-featured-product
  ###masthead-ad
  ###player-ads
  ##.ytd-merch-shelf-renderer
  ##.ytp-suggested-action > button.ytp-suggested-action-badge
  ##+js(set-constant, ytInitialPlayerResponse.playerAds, undefined…
  ##+js(set-constant, ytInitialPlayerResponse.adPlacements, undefi…
  ##+js(set-constant, ytInitialPlayerResponse.adSlots, undefined)
  ##+js(set-constant, playerResponse.adPlacements, undefined)
  ##+js(json-prune-fetch-response, playerAds adPlacements adSlots …
  ##+js(json-prune-fetch-response, reelWatchSequenceResponse.entri…
  ##+js(trusted-replace-node-text, script, (function serverContrac…
  ##+js(adjust-setTimeout, [native code], 17000, 0.001)
  ##+js(json-prune-xhr-response, playerAds adPlacements adSlots pl…
  ##+js(set-constant, yt.config_.EXPERIMENT_FLAGS.web_bind_fetch, …
  ##+js(adjust-setTimeout, resolve(1), *, 0.001)
  ##+js(set-constant, yt.config_.EXPERIMENT_FLAGS.web_enable_ab_rs…
  ##+js(set-constant, yt.config_.EXPERIMENT_FLAGS.ab_pl_man, false…

@stephenhawk8054
Copy link
Member Author

@Sarthak104 In the new profile, can you test these filters:

www.youtube.com#@#+js(trusted-rpnt, script, (function serverContract(), "YOUTUBE_PREMIUM_LOGO"!==ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType&&(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;if(!t.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP\, AD"))return;const e=t.getProgressState?.();e&&e.duration>0&&(e.loaded<e.duration||e.duration-e.current>1)&&t.seekTo?.(e.duration)};t()\,new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})})));(function serverContract(), sedCount, 1)

www.youtube.com##+js(trusted-rpnt, script, (function serverContract(), "YOUTUBE_PREMIUM_LOGO"!==ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType&&(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;if(!t.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP\, AD"))return;const e=t.getProgressState?.();e&&e.duration>0&&(e.loaded<e.duration||e.duration-e.current>1)&&t.seekTo?.(e.duration+.01)};t()\,new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})})));(function serverContract(), sedCount, 1)

Click on uBO icon > ⚙ Dashboard button > Add the filter(s) in "My filters" pane > ✓ Apply changes > Open new tab and test again.

Remember to turn on Allow custom filters requiring trust in "My filters" pane.

@Sarthak104
Copy link

Sarthak104 commented Oct 3, 2024

@Sarthak104 In the new profile, can you test these filters:
.......

I tried it, while logged in, in my YT account. This is what I noticed:

  • While the problem isn't exactly fixed, the loading time got reduced by more than half. In the video of the issue which I attached earlier, the loading was showing for around 20 odd seconds. It got reduced to around 5-6 seconds now.
  • Another thing which I noticed is, now a lot of videos are working without any loading delay.

That was pretty much I was able to notice at the first glance. Let me know if I can try anything else @stephenhawk8054 .

@stephenhawk8054
Copy link
Member Author

While the problem isn't exactly fixed, the loading time got reduced by more than half. In the video of the issue which I attached earlier, the loading was showing for around 20 odd seconds. It got reduced to around 5-6 seconds now.

@Sarthak104 In this case, is the issue consistent with some videos or it happens randomly? If it can be reproduced in some ways, can you record video of it?

@Sarthak104
Copy link

Sarthak104 commented Oct 4, 2024

@Sarthak104 In this case, is the issue consistent with some videos or it happens randomly? If it can be reproduced
...

@stephenhawk8054 From what I can tell and again this is just pure speculation, it is mostly happening on videos on which monetization is enabled, i.e. ads can appear on the video. Because, let's say if I try to play any video from 8 or 10 years ago, in most of the cases it works fine. But on newer videos, like < 5 years old, the loading delay still appears. I could be wrong as well.

I think it's consistent and I don't find it to be random. I am sharing a recording of it below:
https://drive.google.com/file/d/1g2a3PlDb0Iul1TvjGKvX-QzKxe6w-WvX/view?usp=sharing

In the above video, in the initial 2-3 videos, the issue appeared, Then I tried playing an old video and in that one, the problem didn't appear and it worked fine.

Let me know if anything else I can try.

@stephenhawk8054
Copy link
Member Author

I can't access the video btw.

I mean if it's consistent with some videos, you can test on those videos only to make sure if the new filters work or not.

@Sarthak104 Remove all of the previous filters, can you test these

www.youtube.com#@#+js(trusted-rpnt, script, (function serverContract(), "YOUTUBE_PREMIUM_LOGO"!==ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType&&(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;if(!t.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP\, AD"))return;const e=t.getProgressState?.();e&&e.duration>0&&(e.loaded<e.duration||e.duration-e.current>1)&&t.seekTo?.(e.duration)};t()\,new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})})));(function serverContract(), sedCount, 1)

www.youtube.com##+js(trusted-rpnt, script, (function serverContract(), "YOUTUBE_PREMIUM_LOGO"!==ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType&&(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;if(!t.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP\, AD"))return;const e=t.getProgressState?.();e&&e.duration>0&&(e.loaded<e.duration||e.duration-e.current>1)&&t.seekTo?.(e.duration+1)};t()\,new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})})));(function serverContract(), sedCount, 1)

@Sarthak104
Copy link

Sarthak104 commented Oct 4, 2024

I can't access the video btw.

Have updated the permissions. Please check now...

@stephenhawk8054
Copy link
Member Author

@Sarthak104 Have you tested the newest ones: #20586 (comment)

@Sarthak104
Copy link

@Sarthak104 Remove all of the previous filters, can you test these

www.youtube.com#

...

Tried these filters. Unfortunately no change whatsoever.
For some reason now the video starts from 1 second mark, instead of 0.

Thanks for the help. Let me know if I can try something else.

@stephenhawk8054
Copy link
Member Author

stephenhawk8054 commented Oct 4, 2024

Yeah, I adjusted the filter to skip the ads duration + 1s. The previous one is ads duration + 0.01s.

@Sarthak104 Can you remove the previous filters and add these ones:

www.youtube.com#@#+js(trusted-rpnt, script, (function serverContract(), "YOUTUBE_PREMIUM_LOGO"!==ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType&&(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;if(!t.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP\, AD"))return;const e=t.getProgressState?.();e&&e.duration>0&&(e.loaded<e.duration||e.duration-e.current>1)&&t.seekTo?.(e.duration)};t()\,new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})})));(function serverContract(), sedCount, 1)

www.youtube.com##+js(trusted-rpnt, script, (function serverContract(), '(()=>{if(ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType==="YOUTUBE_PREMIUM_LOGO")return;if(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||location.href.startsWith("https://www.youtube.com/subscribe_embed/"))return;document.addEventListener("DOMContentLoaded",(function(){const skipAd=()=>{const videoPlayer=document.getElementById("movie_player");if(!videoPlayer)return;console.log(videoPlayer.getStatsForNerds?.()?.debug_info,"uBO - debug");if(!videoPlayer.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP, AD"))return;const progress=videoPlayer.getProgressState?.();console.log(JSON.stringify(progress),"uBO - progress");if(progress&&progress.duration>0){if(progress.loaded<progress.duration||progress.duration-progress.current>1){videoPlayer.seekTo?.(progress.duration+1)}}};skipAd();const observer=new MutationObserver((()=>{skipAd()}));observer.observe(document,{childList:true,subtree:true})}))})();(function serverContract()', sedCount, 1)

then open new tab and reproduce the issue -> Click F12 to open browser devtools -> Go to Console tab in the devtools -> Choose only Log -> Right click on the console result -> Choose Copy all Messages -> Paste to https://logpasta.com and share the result link here.

@Sarthak104

This comment was marked as resolved.

@stephenhawk8054
Copy link
Member Author

@Sarthak104 Oh sorry, I copied wrong ones. These ones:

www.youtube.com#@#+js(trusted-rpnt, script, (function serverContract(), "YOUTUBE_PREMIUM_LOGO"!==ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType&&(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;if(!t.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP\, AD"))return;const e=t.getProgressState?.();e&&e.duration>0&&(e.loaded<e.duration||e.duration-e.current>1)&&t.seekTo?.(e.duration)};t()\,new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})})));(function serverContract(), sedCount, 1)

www.youtube.com##+js(trusted-rpnt, script, (function serverContract(), '(()=>{if(ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType==="YOUTUBE_PREMIUM_LOGO")return;if(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||location.href.startsWith("https://www.youtube.com/subscribe_embed/"))return;document.addEventListener("DOMContentLoaded",(function(){const skipAd=()=>{const videoPlayer=document.getElementById("movie_player");if(!videoPlayer)return;console.log(videoPlayer.getStatsForNerds?.()?.debug_info,"uBO - debug");if(!videoPlayer.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP, AD"))return;const progress=videoPlayer.getProgressState?.();console.log(JSON.stringify(progress),"uBO - progress");if(progress&&progress.duration>0){if(progress.loaded<progress.duration||progress.duration-progress.current>1){videoPlayer.seekTo?.(progress.duration+1)}}};skipAd();const observer=new MutationObserver((()=>{skipAd()}));observer.observe(document,{childList:true,subtree:true})}))})();(function serverContract()', sedCount, 1)

@Sarthak104
Copy link

@Sarthak104 Oh sorry, I copied wrong ones. These ones:
...

No worries @stephenhawk8054

Tried the filters. Ads are gone but the loading delay is still appearing.
Here are the logs: https://logpasta.com/paste/47f4a836-068b-442b-90ac-3dd20259b274

@stephenhawk8054
Copy link
Member Author

stephenhawk8054 commented Oct 4, 2024

@Sarthak104 Yeah, these are not the solutions, but just to get the logs

Can you remove all the filters and get the logs of the problematic videos with these:

www.youtube.com#@#+js(trusted-rpnt, script, (function serverContract(), "YOUTUBE_PREMIUM_LOGO"!==ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType&&(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;if(!t.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP\, AD"))return;const e=t.getProgressState?.();e&&e.duration>0&&(e.loaded<e.duration||e.duration-e.current>1)&&t.seekTo?.(e.duration)};t()\,new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})})));(function serverContract(), sedCount, 1)

www.youtube.com##+js(trusted-rpnt, script, (function serverContract(), '(()=>{if(ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType==="YOUTUBE_PREMIUM_LOGO")return;if(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||location.href.startsWith("https://www.youtube.com/subscribe_embed/"))return;document.addEventListener("DOMContentLoaded",(function(){const skipAd=()=>{const videoPlayer=document.getElementById("movie_player");if(!videoPlayer)return;console.log("[uBO - debug]",videoPlayer.getStatsForNerds?.()?.debug_info);const progress=videoPlayer.getProgressState?.();if(!progress)return;console.log("[uBO - progress]",JSON.stringify(progress));if(!videoPlayer.getStatsForNerds().debug_info.startsWith?.("SSAP, AD"))return;if(progress.duration>0){if(progress.loaded<progress.duration||progress.duration-progress.current>1){videoPlayer.seekTo?.(progress.duration+1);console.log("[uBO - skipped]",JSON.stringify(progress))}}};skipAd();const observer=new MutationObserver((()=>{skipAd()}));observer.observe(document,{childList:true,subtree:true})}))})();(function serverContract()', sedCount, 1)

@Sarthak104
Copy link

Sarthak104 commented Oct 4, 2024

@Sarthak104 Yeah, these are not the solutions, but just to get the logs
...

Oh, fine.
These are the logs after applying the filters: https://logpasta.com/paste/ad2be25d-b81b-4387-befd-acb4f1475390

Another log for another video: https://logpasta.com/paste/fad60667-dc25-4061-b9ba-c2f827494c5b

@stephenhawk8054
Copy link
Member Author

@Sarthak104 Can you remove the current filters and test these

www.youtube.com#@#+js(trusted-rpnt, script, (function serverContract(), "YOUTUBE_PREMIUM_LOGO"!==ytInitialData?.topbar?.desktopTopbarRenderer?.logo?.topbarLogoRenderer?.iconImage?.iconType&&(location.href.startsWith("https://www.youtube.com/tv#/")||location.href.startsWith("https://www.youtube.com/embed/")||document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;if(!t.getStatsForNerds?.()?.debug_info?.startsWith?.("SSAP\, AD"))return;const e=t.getProgressState?.();e&&e.duration>0&&(e.loaded<e.duration||e.duration-e.current>1)&&t.seekTo?.(e.duration)};t()\,new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})})));(function serverContract(), sedCount, 1)

www.youtube.com##+js(trusted-rpnt, script, (function serverContract(), (()=>{let e="";document.addEventListener("DOMContentLoaded"\,(function(){const t=()=>{const t=document.getElementById("movie_player");if(!t)return;const n=t.querySelector("video");if(!n)return;const o=t.getVideoStats?.()?.ssap;if(n.duration&&o&&o.includes("vid.nvd")){const i=parseInt(o.split("st.").at(-1).split(";")[0])/1e3;let r=[];for(const e of o.matchAll(/\bcpn\.([-\w]+)/g))r.push(e[1]);const s=r.join("\,");(!1===n.loop&&e!==s&&n.currentTime<i||!0===n.loop&&n.currentTime<i||.001===n.currentTime&&n.currentTime<i)&&(t.seekTo(i)\,e=s)}};t();new MutationObserver((()=>{t()})).observe(document\,{childList:!0\,subtree:!0})}))})();(function serverContract(), sedCount, 1)

This time no need to get the logs, just check if the issue is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ongoing ongoing issue
Projects
None yet
Development

No branches or pull requests