ajayyy / SponsorBlock

Skip YouTube video sponsors (browser extension)
https://sponsor.ajay.app
GNU General Public License v3.0
10.33k stars 326 forks source link

SponsorBlock not skipping sponsors the first time. #1820

Closed Iaotle closed 1 year ago

Iaotle commented 1 year ago

I've been noticing that SponsorBlock isn't skipping sponsored segments. When I rewind and play the video again, the sponsored segments are skipped as normal. I can't see any errors or other logs in the console. Let me know if I need to attach any logs or something similar.

P.S.: I'm also running Enhancer for Youtube, uBlock Origin and Return Youtube Dislike extensions.

1nikolas commented 1 year ago

I have the same problem

jitz101 commented 1 year ago

Same here

ajayyy commented 1 year ago

Browser? Is it always, sometimes? Or rarely? List extensions or userscripts installed

Iaotle commented 1 year ago

Every single time on first video open. Extensions:

ahfgeienlihckogmohjhadlkjgocpleb : Web Store : version 0_2
bigefpfhnfcobdlfbedofhhaibnlghod : MEGA : version 4_42_1
cjpalhdlnbpafiamejdnhcphjbkeiagm : uBlock Origin : version 1_51_0
fdpohaocaechififmbbbbbknoalclacl : GoFullPage - Full Page Screen Capture : version 7_12
fmkadmapgofadopljbjfkapdkoienihi : React Developer Tools : version 4_28_0
gamlckmepdclkglolaedeigblmmpmfhf : Dark theme for VK.COM | Night Mode for Vkontakte™ : version 3_4_0_1
gbaokejhnafeofbniplkljehipcekkbh : Tab Organizer : version 4_3_1
gebbhagfogifgggkldgodflihgfeippi : Return YouTube Dislike : version 3_0_0_10
ghbmnnjooekpmoecnnnilnnbdlolhkhi : Google Docs Offline : version 1_62_0
gmmnidkpkgiohfdoenhpghbilmeeagjj : Sci-Hub X Now! : version 0_2_2
hbdmelobmfcompinikjdaiphhonbgfpn : Youtube™ Actual Top Comments : version 1_3
hoboppgpbgclpfnjfdidokiilachfcbb : VkOpt : version 3_0_8_3
hompjdfbfmmmgflfjdlnkohcplmboaeo : Allow Right-Click : version 1_5_2_4
kbmfpngjjgdllneeigpgjifpgocmfgmb : Reddit Enhancement Suite : version 5_22_17
kmendfapggjehodndflmmgagdbamhnfd : CryptoTokenExtension : version 0_9_74
ldipcbpaocekfooobnbcddclnhejkcpn : Google Scholar Button : version 3_2
mhjfbmdgcfjbbpaeojofohoefgiehjai : Chrome PDF Viewer : version 1
mnjggcdmjocbbbhaepdhchncahnbgone : SponsorBlock for YouTube - Skip Sponsorships : version 5_4_13
neajdppkdcdipfabeoofebfddakdcjhd : Google Network Speech : version 1_0
nkeimhogjdpnpccoofpliimaahmaaome : Google Hangouts : version 1_3_18
nmmhkkegccagdldgiimedpiccmgmieda : Chrome Web Store Payments : version 1_0_0_6
ofbbahodfeppoklmgjiokgfdgcndngjm : TTV LOL : version 0_0_0_3
oiaejidbmkiecgbjeifoejpgmdaleoha : Stylebot : version 3_1_3
okfiigkfppbpfjaiffmllkkfbpdnhofn : ytb not-interested button : version 0_1_1
ponfpcnoihfmfllpaingbgckeeldkhle : Enhancer for YouTube™ : version 2_0_117_1

I don't think I have any userscripts. Running

CHROME VERSION 104.0.5112.81
OS VERSION Windows NT: 10.0.22000
1nikolas commented 1 year ago

Browser? Is it always, sometimes? Or rarely? List extensions or userscripts installed

Firefox Happens most of the times (if not all)

Youtube-related extensions:

Also, when this happens, I can make the extension skip the segment (when I'm currently watching that segment) by hitting the refresh segments button. Enabling/disabling skipping doesn't help.

Also, if I go back the video before the segment starts, then it skips.

ajayyy commented 1 year ago

Can you send your enhancer settings

1nikolas commented 1 year ago

Can you send your enhancer settings

settings.txt

staridiot commented 1 year ago

I am getting the same thing, I'm running the following extensions

Alternate Player for Twitch.tv
Bypass Paywalls
Redirector
SponsorBlock
uBlock Origin

And here's some console errors when it happened image

Iaotle commented 1 year ago

I'm not getting any sponsorblock errors and even if I disable everything it's still not skipping.

1nikolas commented 1 year ago

I'm not getting any sponsorblock errors and even if I disable everything it's still not skipping.

same no errors

ajayyy commented 1 year ago

Can you go to options -> import/export -> copy debug info

BaconCatBug commented 1 year ago

Same issue for me. Firefox, Linux, only youtube extension is "Tweaks for Youtube", I don't run Enhancer or anything else like that. I do run DeArrow though

Debug.txt

ajayyy commented 1 year ago

Is there a specific pattern to when it appears. Is it when opening videos in new tabs with the middle mouse button? Or when clicking videos from the homepage? Or only when directly visiting a video from a URL in the browser.

1nikolas commented 1 year ago

Is there a specific pattern to when it appears. Is it when opening videos in new tabs with the middle mouse button? Or when clicking videos from the homepage? Or only when directly visiting a video from a URL in the browser.

most of the times I open videos in new tab. This tends to break some Youtube addons now that I think about it

ElliotFoley commented 1 year ago

I've been running into this issue very frequently recently. I know it happens when I CTRL+click to open a video in a new tab as I usually do, but I haven't thoroughly tested other cases.

Is there a specific pattern to when it appears. Is it when opening videos in new tabs with the middle mouse button? Or when clicking videos from the homepage? Or only when directly visiting a video from a URL in the browser.

ajayyy commented 1 year ago

Perfect, I think my fix will work then, thanks!

BaconCatBug commented 1 year ago

I always open my videos via Middle Mouse Click to a new tab, as I use Inoreader to manage my subscriptions

ajayyy commented 1 year ago

Let me know if it is still happening in 5.4.15

Iaotle commented 1 year ago

@ajayyy yep it's still happening in 5.4.15 Noticed this behavior from SB: image

Here is debug info:

Click to open ```json { "debug": { "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36", "platform": "Win32", "language": "en-NL", "extensionVersion": "5.4.15" }, "config": { "autoSkipOnMusicVideosUpdate": true, "categoryPillUpdate": true, "categorySelections": [ { "name": "sponsor", "option": 2 }, { "name": "intro", "option": 2 }, { "name": "interaction", "option": 2 }, { "name": "selfpromo", "option": 2 }, { "name": "preview", "option": 2 }, { "name": "poi_highlight", "option": 1 }, { "name": "music_offtopic", "option": 2 }, { "name": "exclusive_access", "option": 0 }, { "name": "chapter", "option": 0 } ], "chapterCategoryAdded": true, "dontShowNotice": false, "hideDiscordLaunches": 4, "invidiousInstances": 23, "isVip": false, "manualSkipOnFullVideo": false, "minutesSaved": 10531.90994811656, "payments": { "chaptersAllowed": true, "freeAccess": true, "lastCheck": 1664869014594, "licenseKey": null }, "permissions": { "chapter": true, "exclusive_access": true, "filler": true, "interaction": true, "intro": true, "music_offtopic": true, "outro": true, "poi_highlight": true, "preview": true, "selfpromo": true, "sponsor": true }, "previewCategoryUpdate": true, "renderSegmentsAsChapters": false, "showChapterInfoMessage": false, "showDeArrowPromotion": false, "showPopupDonationCount": 5, "showSegmentNameInChapterBar": true, "showUpsells": false, "showZoomToFillError": false, "showZoomToFillError2": false, "skipCount": 17468, "sponsorTimesContributed": 42, "submissionCountSinceCategories": 42, "unsubmittedSegments": { "-Ry7SVwnsEA": [ { "UUID": null, "category": "chooseACategory", "segment": [ 5.56983 ] } ], "DIHy6J23FVk": [ { "UUID": null, "actionType": "skip", "category": "chooseACategory", "segment": [ 479.878373 ], "source": 1 } ], "FBQaV0JidZs": [ { "UUID": null, "category": "sponsor", "segment": [ 573.864059, 622.853319 ] } ], "INjgdhFzIEY": [ { "UUID": "jCGU1LUrq19z1whmfs781ByRHzEygF46fijL", "actionType": "skip", "category": "sponsor", "description": "", "segment": [ 6.514, 82.858 ], "source": 1 } ], "JaD_Ze-544E": [ { "UUID": null, "category": "chooseACategory", "segment": [ 26.746552 ], "source": 1 } ], "PUKfmMH157U": [], "QeyQ1SNd6fQ": [ { "UUID": "tb3TtdBNz2alkpVInObJWjxugME224nB0Xri", "actionType": "skip", "category": "sponsor", "segment": [ 93.972, 149.32 ], "source": 1 } ], "UK-lGSYKaaM": [ { "UUID": null, "actionType": "skip", "category": "chooseACategory", "segment": [ 0, 51.222887 ], "source": 1 } ], "YZ96Ay7YDIg": [ { "UUID": null, "category": "chooseACategory", "segment": [ 1.81335 ] } ], "_h8-SBO-RKo": [ { "UUID": null, "category": "chooseACategory", "segment": [ 29.700321 ] } ], "jfQAAmz59bk": [ { "UUID": "iWEyUmNqe8BfJaL3GRwQVNNaO1gbnpGLPERp", "actionType": "skip", "category": "sponsor", "description": "", "segment": [ 0, 17.485 ], "source": 1 } ], "lUXz_OF-cIc": [ { "UUID": "DT01SX99RAgVFCMYobMSX35kpBKWHhFThez9", "actionType": "skip", "category": "sponsor", "description": "", "segment": [ 148.485, 200.71 ], "source": 1 } ], "pJIrdzhsWRM": [ { "UUID": null, "category": "chooseACategory", "segment": [ 3.565164 ] } ], "qgMRLQGK3R8": [ { "UUID": "gSZMBUQbILx2LlMWrP1u7IJuNs0drwpUBMRU", "actionType": "skip", "category": "sponsor", "segment": [ 0, 6.236 ], "source": 1 } ], "w5EjHfQ6r40": [ { "UUID": null, "actionType": "skip", "category": "chooseACategory", "segment": [ 1491.125 ], "source": 1 } ] }, "defaultCategory": "chooseACategory", "whitelistedChannels": 0, "forceChannelCheck": false, "showTimeWithSkips": true, "disableSkipping": false, "muteSegments": true, "fullVideoSegments": true, "fullVideoLabelsOnThumbnails": true, "trackViewCount": true, "trackViewCountInPrivate": true, "trackDownvotes": true, "noticeVisibilityMode": 3, "hideVideoPlayerControls": false, "hideInfoButtonPlayerControls": false, "hideDeleteButtonPlayerControls": false, "hideUploadButtonPlayerControls": false, "hideSkipButtonPlayerControls": false, "hideDiscordLink": false, "supportInvidious": false, "serverAddress": "Default server address", "minDuration": 0, "skipNoticeDuration": 4, "audioNotificationOnSkip": false, "checkForUnlistedVideos": false, "testingServer": false, "refetchWhenNotFound": true, "ytInfoPermissionGranted": false, "allowExpirements": true, "showDonationLink": true, "showNewFeaturePopups": true, "donateClicked": 0, "autoHideInfoButton": true, "autoSkipOnMusicVideos": false, "scrollToEditTimeUpdate": false, "darkMode": true, "showCategoryGuidelines": true, "showCategoryWithoutPermission": false, "useVirtualTime": true, "showSegmentFailedToFetchWarning": true, "allowScrollingToEdit": true, "deArrowInstalled": false, "categoryPillColors": {}, "skipKeybind": { "key": "Enter" }, "startSponsorKeybind": { "key": ";" }, "submitKeybind": { "key": "'" }, "nextChapterKeybind": { "key": "ArrowRight", "ctrl": true }, "previousChapterKeybind": { "key": "ArrowLeft", "ctrl": true }, "colorPalette": { "red": "#780303", "white": "#ffffff", "locked": "#ffc83d" }, "barTypes": { "preview-chooseACategory": { "color": "#ffffff", "opacity": "0.7" }, "sponsor": { "color": "#00d400", "opacity": "0.7" }, "preview-sponsor": { "color": "#007800", "opacity": "0.7" }, "selfpromo": { "color": "#ffff00", "opacity": "0.7" }, "preview-selfpromo": { "color": "#bfbf35", "opacity": "0.7" }, "exclusive_access": { "color": "#008a5c", "opacity": "0.7" }, "interaction": { "color": "#cc00ff", "opacity": "0.7" }, "preview-interaction": { "color": "#6c0087", "opacity": "0.7" }, "intro": { "color": "#00ffff", "opacity": "0.7" }, "preview-intro": { "color": "#008080", "opacity": "0.7" }, "outro": { "color": "#0202ed", "opacity": "0.7" }, "preview-outro": { "color": "#000070", "opacity": "0.7" }, "preview": { "color": "#008fd6", "opacity": "0.7" }, "preview-preview": { "color": "#005799", "opacity": "0.7" }, "music_offtopic": { "color": "#ff9900", "opacity": "0.7" }, "preview-music_offtopic": { "color": "#a6634a", "opacity": "0.7" }, "poi_highlight": { "color": "#ff1684", "opacity": "0.7" }, "preview-poi_highlight": { "color": "#9b044c", "opacity": "0.7" }, "filler": { "color": "#7300FF", "opacity": "0.9" }, "preview-filler": { "color": "#2E0066", "opacity": "0.7" } } } } ```
ajayyy commented 1 year ago

@Iaotle are there errors in the console?

Iaotle commented 1 year ago

None related to Sponsorblock. Just errors from adblocker and the like. You can contact me on discord if u wanna debug it at some point, same username.

staridiot commented 1 year ago

I'm getting this on 5.4.15 as well. I open videos with middle click almost exclusively, but I just had it happen on a video where I didn't. No error in console, and I do see the sponsor spot, but I only check when I notice its not skipping.

Debug:

Click me ```json { "debug": { "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0", "platform": "Win32", "language": "en-US", "extensionVersion": "5.4.15" }, "config": { "autoSkipOnMusicVideosUpdate": true, "chapterCategoryAdded": true, "invidiousInstances": 15, "categorySelections": [ { "name": "sponsor", "option": 2 }, { "name": "exclusive_access", "option": 0 }, { "name": "chapter", "option": 0 } ], "showZoomToFillError2": false, "skipCount": 4, "muteSegments": false, "minutesSaved": 3.062949999999982, "dontShowNotice": true, "isVip": false, "permissions": { "sponsor": true, "selfpromo": true, "exclusive_access": true, "interaction": true, "intro": true, "outro": true, "preview": true, "music_offtopic": true, "filler": true, "poi_highlight": true, "chapter": false }, "unsubmittedSegments": {}, "defaultCategory": "chooseACategory", "renderSegmentsAsChapters": false, "whitelistedChannels": 0, "forceChannelCheck": false, "sponsorTimesContributed": 0, "submissionCountSinceCategories": 0, "showTimeWithSkips": true, "disableSkipping": false, "fullVideoSegments": true, "fullVideoLabelsOnThumbnails": true, "manualSkipOnFullVideo": false, "trackViewCount": true, "trackViewCountInPrivate": true, "trackDownvotes": true, "noticeVisibilityMode": 3, "hideVideoPlayerControls": false, "hideInfoButtonPlayerControls": false, "hideDeleteButtonPlayerControls": false, "hideUploadButtonPlayerControls": false, "hideSkipButtonPlayerControls": false, "hideDiscordLaunches": 0, "hideDiscordLink": false, "supportInvidious": false, "serverAddress": "Default server address", "minDuration": 0, "skipNoticeDuration": 4, "audioNotificationOnSkip": false, "checkForUnlistedVideos": false, "testingServer": false, "refetchWhenNotFound": true, "ytInfoPermissionGranted": false, "allowExpirements": true, "showDonationLink": true, "showPopupDonationCount": 0, "showUpsells": true, "showNewFeaturePopups": true, "donateClicked": 0, "autoHideInfoButton": true, "autoSkipOnMusicVideos": false, "scrollToEditTimeUpdate": false, "categoryPillUpdate": false, "showChapterInfoMessage": true, "darkMode": true, "showCategoryGuidelines": true, "showCategoryWithoutPermission": false, "showSegmentNameInChapterBar": true, "useVirtualTime": true, "showSegmentFailedToFetchWarning": true, "allowScrollingToEdit": true, "deArrowInstalled": false, "showDeArrowPromotion": true, "categoryPillColors": {}, "skipKeybind": { "key": "Enter" }, "startSponsorKeybind": { "key": ";" }, "submitKeybind": { "key": "'" }, "nextChapterKeybind": { "key": "ArrowRight", "ctrl": true }, "previousChapterKeybind": { "key": "ArrowLeft", "ctrl": true }, "payments": { "licenseKey": null, "lastCheck": 0, "lastFreeCheck": 0, "freeAccess": false, "chaptersAllowed": false }, "colorPalette": { "red": "#780303", "white": "#ffffff", "locked": "#ffc83d" }, "barTypes": { "preview-chooseACategory": { "color": "#ffffff", "opacity": "0.7" }, "sponsor": { "color": "#00d400", "opacity": "0.7" }, "preview-sponsor": { "color": "#007800", "opacity": "0.7" }, "selfpromo": { "color": "#ffff00", "opacity": "0.7" }, "preview-selfpromo": { "color": "#bfbf35", "opacity": "0.7" }, "exclusive_access": { "color": "#008a5c", "opacity": "0.7" }, "interaction": { "color": "#cc00ff", "opacity": "0.7" }, "preview-interaction": { "color": "#6c0087", "opacity": "0.7" }, "intro": { "color": "#00ffff", "opacity": "0.7" }, "preview-intro": { "color": "#008080", "opacity": "0.7" }, "outro": { "color": "#0202ed", "opacity": "0.7" }, "preview-outro": { "color": "#000070", "opacity": "0.7" }, "preview": { "color": "#008fd6", "opacity": "0.7" }, "preview-preview": { "color": "#005799", "opacity": "0.7" }, "music_offtopic": { "color": "#ff9900", "opacity": "0.7" }, "preview-music_offtopic": { "color": "#a6634a", "opacity": "0.7" }, "poi_highlight": { "color": "#ff1684", "opacity": "0.7" }, "preview-poi_highlight": { "color": "#9b044c", "opacity": "0.7" }, "filler": { "color": "#7300FF", "opacity": "0.9" }, "preview-filler": { "color": "#2E0066", "opacity": "0.7" } } } } ```
ajayyy commented 1 year ago

@staridiot

can you install this (disable the original) and try to reproduce the issue.

ChromeBuild.zip

FirefoxBuild.zip

Then send me the console logs along and the order of videos you clicked

https://github.com/ajayyy/SponsorBlock/wiki/Chromium-Unpacked-Install#install-the-extension

You can email it if you want (dev @ ajay. app)

staridiot commented 1 year ago

@ajayyy

Unfortunately, I cannot. Chrome does not work for me, videos don't load at all. Its not related to SponsorBlock, I have no idea why it won't load and have very little interest in fixing it. I use Firefox as my main browser, if you can give me a debug build for Firefox I can test it.

ajayyy commented 1 year ago

@staridiot You can load this in Firefox as well https://github.com/ajayyy/SponsorBlock/wiki/Testing-a-Pull-Request#installing

staridiot commented 1 year ago

@ajayyy

Getting a load of errors unrelated to this issue. That build seems to be broken out right.

After loading the build:

sponsorblock errors 2

I get the can't convert undefined to object when opening the sponsorblock window from the extension in the top right.

sponsorblock errors 1
Hakkin commented 1 year ago

Also experiencing this issue, and can also confirm that above debug build does not work with Firefox.

ajayyy commented 1 year ago

Sorry about that, I have updated the builds in that comment. It was pointing to my debug server and not the main one

Hakkin commented 1 year ago

I was able to reproduce it with the debug build, I don't know if it matters, but I middle mouse clicked multiple videos from https://www.youtube.com/feed/subscriptions and let them load in the background, then went through them and found the first one with a sponsor segment (https://www.youtube.com/watch?v=o69WALtFpI0) and watched (at 2x speed, maybe important?) through until the sponsor section. The sponsor section was properly marked on the timeline, but wasn't skipped once it entered the section. Manually opening the SB panel and refreshing the segments made SB properly skip it. Here's the log, there is also a CSP violation error that seem to stem from SB so I included that as well.

``` 06:36:14.992 [SponsorBlock Debug] Pausing skipping content.js:2:324258 06:36:14.994 [SponsorBlock Debug] Considering to start skipping: false, true, o69WALtFpI0 content.js:2:324258 06:36:15.465 checking for start ones o69WALtFpI0 false [ { "category": "sponsor", "actionType": "skip", "segment": [ 239.488, 300.593 ], "UUID": "469edf9f28b31c6b166a58088e32947578d6b5d68f1446916bc0068dec50b7d07", "videoDuration": 759.421, "locked": 0, "votes": 1, "description": "" } ] content.js:2:248854 06:36:15.475 [SponsorBlock Debug] Pausing skipping content.js:2:324258 06:36:15.505 [SponsorBlock Debug] Considering to start skipping: false, true, o69WALtFpI0 content.js:2:324258 06:36:17.467 Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). content.js:2:157258 06:37:20.821 video playing 4 0 false true content.js:2:232283 06:37:20.823 video playing p2 o69WALtFpI0 1 true 1692452240824 content.js:2:232374 06:37:20.824 [SponsorBlock Debug] Setting switching videos to false content.js:2:324258 06:37:20.824 checking for start ones o69WALtFpI0 false [ { "category": "sponsor", "actionType": "skip", "segment": [ 239.488, 300.593 ], "UUID": "469edf9f28b31c6b166a58088e32947578d6b5d68f1446916bc0068dec50b7d07", "videoDuration": 759.421, "locked": 0, "votes": 1, "description": "" } ] content.js:2:248854 06:37:20.825 [SponsorBlock Debug] Pausing skipping 2 content.js:2:324258 06:37:20.828 [SponsorBlock Debug] Considering to start skipping: false, false, o69WALtFpI0 content.js:2:324258 06:37:20.834 [SponsorBlock Debug] Ready to start skipping: 0 at 0 content.js:2:324258 06:37:20.834 [SponsorBlock Debug] Next step in starting skipping: false, true content.js:2:324258 06:37:20.835 [SponsorBlock Debug] Starting timeout to skip 0 to skip at 239.488 content.js:2:324258 06:37:20.836 [SponsorBlock Debug] Considering to start skipping: false, false, o69WALtFpI0 content.js:2:324258 06:37:20.839 [SponsorBlock Debug] Ready to start skipping: 0 at 0 content.js:2:324258 06:37:20.839 [SponsorBlock Debug] Next step in starting skipping: false, true content.js:2:324258 06:37:20.840 [SponsorBlock Debug] Starting timeout to skip 0 to skip at 239.488 content.js:2:324258 -- watching video, sponsor section properly marked on timeline, but entered without skipping -- -- manually open SB panel and hit refresh button, skips once refreshed-- 06:39:37.917 checking for start ones o69WALtFpI0 false [ { "category": "sponsor", "actionType": "skip", "segment": [ 239.488, 300.593 ], "UUID": "469edf9f28b31c6b166a58088e32947578d6b5d68f1446916bc0068dec50b7d07", "videoDuration": 759.421, "locked": 0, "votes": 1, "description": "" } ] content.js:2:248854 06:39:37.920 [SponsorBlock Debug] Pausing skipping content.js:2:324258 06:39:37.937 [SponsorBlock Debug] Considering to start skipping: false, false, o69WALtFpI0 content.js:2:324258 06:39:37.940 [SponsorBlock Debug] Ready to start skipping: 0 at 239.488 content.js:2:324258 06:39:37.940 [SponsorBlock Debug] Next step in starting skipping: false, true content.js:2:324258 06:39:37.945 [SponsorBlock Debug] Pausing skipping content.js:2:324258 06:39:37.953 [SponsorBlock Debug] Considering to start skipping: false, false, o69WALtFpI0 content.js:2:324258 06:39:37.957 [SponsorBlock Debug] Ready to start skipping: -1 at 300.593 content.js:2:324258 06:39:38.079 [SponsorBlock Debug] Pausing skipping content.js:2:324258 06:39:38.081 [SponsorBlock Debug] Considering to start skipping: false, false, o69WALtFpI0 content.js:2:324258 06:39:38.087 [SponsorBlock Debug] Ready to start skipping: -1 at 300.601 content.js:2:324258 06:39:38.099 [SponsorBlock Debug] [SB] Not skipping due to buffering content.js:2:324258 06:39:38.101 [SponsorBlock Debug] Pausing skipping content.js:2:324258 06:39:38.122 [SponsorBlock Debug] [SB] Playing event after buffering: true content.js:2:324258 06:39:38.125 [SponsorBlock Debug] Pausing skipping content.js:2:324258 06:39:38.127 [SponsorBlock Debug] Considering to start skipping: false, false, o69WALtFpI0 content.js:2:324258 06:39:38.133 [SponsorBlock Debug] Ready to start skipping: -1 at 300.593 content.js:2:324258 06:39:39.535 [SponsorBlock Debug] Pausing skipping content.js:2:324258 06:41:19.758 [SponsorBlock Debug] Pausing skipping content.js:2:324258 06:41:19.759 [SponsorBlock Debug] Considering to start skipping: false, true, o69WALtFpI0 content.js:2:324258 ```
ajayyy commented 1 year ago

@hakkin do you use videospeed extension?

BaconCatBug commented 1 year ago

For what it's worth this happens to me too and I watch at 2x speed with the extension tweaks for YouTube

On Sat, 19 Aug 2023, 2:31 pm Ajay Ramachandran, @.***> wrote:

Sorry about that, I have updated the builds in that comment

— Reply to this email directly, view it on GitHub https://github.com/ajayyy/SponsorBlock/issues/1820#issuecomment-1684944402, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFLTC55VL3N2F5EGOAP4NDXWC5Z3ANCNFSM6AAAAAA3HNJ3CA . You are receiving this because you commented.Message ID: @.***>

Hakkin commented 1 year ago

@Hakkin do you use videospeed extension?

The YouTube extensions I have are "Enhancer for YouTube", "HyperChat", "ytcFilter" and "YouTube Livestreams Theater Mode". Enhancer for YouTube offers higher than 2x playback, but I rarely go above 2x, and I change the speed using YouTube's keyboard shortcut (Shift+.) rather than Enhancer's (Ctrl+Mousewheel).

Hakkin commented 1 year ago

I also just reproduced this with all those extensions disabled though, only SponsorBlock + YouTube's built-in 2x playback.

ajayyy commented 1 year ago

@Hakkin thanks for being so specific on when the skip didn't happen in the logs!

Could you try this again with this build with even more logging?

Firefox.zip

Hakkin commented 1 year ago

@ajayyy Here are the logs, from https://www.youtube.com/watch?v=3rjnRJlJyAY

``` -- open single video via middle mouse click from subscriptions tab -- 21:55:32.218 [SponsorBlock Debug] Pausing skipping content.js:2:324702 21:55:32.220 [SponsorBlock Debug] Considering to start skipping: false, true, 3rjnRJlJyAY content.js:2:324702 21:55:32.565 checking for start ones 3rjnRJlJyAY false [ { "category": "sponsor", "actionType": "skip", "segment": [ 87.386, 159.727 ], "UUID": "332b42feb84afb885ebd31cb584ed7aebbf88c798b320e4e06483004380a0bc77", "videoDuration": 483.101, "locked": 0, "votes": 0, "description": "" } ] content.js:2:249141 21:55:32.566 [SponsorBlock Debug] Pausing skipping content.js:2:324702 21:55:32.573 [SponsorBlock Debug] Considering to start skipping: false, true, 3rjnRJlJyAY content.js:2:324702 -- start playing -- 21:55:34.467 video playing 4 0 false true content.js:2:232283 21:55:34.468 video playing p2 3rjnRJlJyAY 1 true 1692507334469 content.js:2:232374 21:55:34.468 [SponsorBlock Debug] Setting switching videos to false content.js:2:324702 21:55:34.468 checking for start ones 3rjnRJlJyAY false [ { "category": "sponsor", "actionType": "skip", "segment": [ 87.386, 159.727 ], "UUID": "332b42feb84afb885ebd31cb584ed7aebbf88c798b320e4e06483004380a0bc77", "videoDuration": 483.101, "locked": 0, "votes": 0, "description": "" } ] content.js:2:249141 21:55:34.469 [SponsorBlock Debug] Pausing skipping 2 content.js:2:324702 21:55:34.474 [SponsorBlock Debug] Considering to start skipping: false, false, 3rjnRJlJyAY content.js:2:324702 21:55:34.477 [SponsorBlock Debug] Ready to start skipping: 0 at 0 content.js:2:324702 21:55:34.477 [SponsorBlock Debug] Next step in starting skipping: false, true content.js:2:324702 21:55:34.478 [SponsorBlock Debug] Starting timeout to skip 0 to skip at 87.386 for 87386 content.js:2:324702 21:55:34.480 [SponsorBlock Debug] Considering to start skipping: false, false, 3rjnRJlJyAY content.js:2:324702 21:55:34.483 [SponsorBlock Debug] Ready to start skipping: 0 at 0 content.js:2:324702 21:55:34.483 [SponsorBlock Debug] Next step in starting skipping: false, true content.js:2:324702 21:55:34.485 [SponsorBlock Debug] Starting timeout to skip 0 to skip at 87.386 for 87386 content.js:2:324702 21:55:36.518 Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). content.js:2:157258 -- watching video at 2x speed, sponsor appears in timeline, doesn't skip -- -- manually refresh segments, forces skips -- 21:56:26.070 checking for start ones 3rjnRJlJyAY false [ { "category": "sponsor", "actionType": "skip", "segment": [ 87.386, 159.727 ], "UUID": "332b42feb84afb885ebd31cb584ed7aebbf88c798b320e4e06483004380a0bc77", "videoDuration": 483.101, "locked": 0, "votes": 0, "description": "" } ] content.js:2:249141 21:56:26.074 [SponsorBlock Debug] Pausing skipping content.js:2:324702 21:56:26.089 [SponsorBlock Debug] Considering to start skipping: false, false, 3rjnRJlJyAY content.js:2:324702 21:56:26.094 [SponsorBlock Debug] Ready to start skipping: 0 at 87.386 content.js:2:324702 21:56:26.095 [SponsorBlock Debug] Next step in starting skipping: false, true content.js:2:324702 21:56:26.095 [SponsorBlock Debug] Skipping Function false, 3rjnRJlJyAY, {"category":"sponsor","actionType":"skip","segment":[87.386,159.727],"UUID":"332b42feb84afb885ebd31cb584ed7aebbf88c798b320e4e06483004380a0bc77","videoDuration":483.101,"locked":0,"votes":0,"description":"","scheduledTime":87.386} content.js:2:324702 21:56:26.095 [SponsorBlock Debug] Skipping Function true, false content.js:2:324702 21:56:26.096 [SponsorBlock Debug] Skipping Function 87.386, 87.383, 159.727 content.js:2:324702 21:56:26.096 [SponsorBlock Debug] Actually skipping 87.386,159.727 content.js:2:324702 21:56:26.097 [SponsorBlock Debug] About to skip false, undefined, true, false, 102.138754, 159.727 content.js:2:324702 21:56:26.101 [SponsorBlock Debug] Pausing skipping content.js:2:324702 21:56:26.108 [SponsorBlock Debug] Considering to start skipping: false, false, 3rjnRJlJyAY content.js:2:324702 21:56:26.110 [SponsorBlock Debug] Ready to start skipping: -1 at 159.727 content.js:2:324702 21:56:26.201 [SponsorBlock Debug] Pausing skipping content.js:2:324702 21:56:26.203 [SponsorBlock Debug] Considering to start skipping: false, false, 3rjnRJlJyAY content.js:2:324702 21:56:26.211 [SponsorBlock Debug] Ready to start skipping: -1 at 159.735 content.js:2:324702 21:56:26.220 [SponsorBlock Debug] [SB] Not skipping due to buffering content.js:2:324702 21:56:26.221 [SponsorBlock Debug] Pausing skipping content.js:2:324702 21:56:26.674 [SponsorBlock Debug] [SB] Playing event after buffering: true content.js:2:324702 21:56:26.676 [SponsorBlock Debug] Pausing skipping content.js:2:324702 21:56:26.678 [SponsorBlock Debug] Considering to start skipping: false, false, 3rjnRJlJyAY content.js:2:324702 21:56:26.683 [SponsorBlock Debug] Ready to start skipping: -1 at 159.727 content.js:2:324702 21:56:31.601 [SponsorBlock Debug] Pausing skipping content.js:2:324702 ```
Hakkin commented 1 year ago

It definitely seems to have something to do with the playback speed. I was testing with this video: https://www.youtube.com/watch?v=TCJrC9KRnrQ Playing at 1x playback rate, SB skips the ad at the beginning 10/10 times, but at 2x speed it only skips it maybe 1/10 times. More specifically, it seems to have something to do with changing the playback speed during playback. If the playback speed is changed while the video is paused, then unpaused, or if you change the video speed then either seek or pause/unpause the video, the skipping will work correctly, even at 2x. It's only when you adjust the playback speed while the video is playing and then continue watching without any further interactions (pausing, seeking) that skipping seems to break. For example, if you start playing the video at 1x, then hit Shift+. x4 to increase the speed to 2x, and continue watching, the skipping will be broken, but if you refresh, then pause the video, hit Shift+. x4, then unpause the video, the skipping will work fine. Seeking in the video also seems to "reset" the skipping and fixes it as well. So a current work around is to change the playback rate to 2x, then either pause and unpause, or seek back 5s (left arrow key). Both of these seem to reliably fix it for me.

CodeOptimist commented 1 year ago

I regularly encounter this, I also watch every video sped-up and change playback rates live, usually with Video Speed Controller (Chrome) keyboard shortcuts.

ajayyy commented 1 year ago

Can you try out this build and see if you can reproduce the issue? I added code to check every 2 seconds if the playback rate has changed incase for some reason the playbackChanged browser event isn't being sent.

If it still fails, can you send the logs again?

EDIT: Actually I need to change one thing sorry will post another comment

ajayyy commented 1 year ago

Okay, fixed the issue in the build from last comment, please try these builds

Firefox.zip Chrome.zip

Hakkin commented 1 year ago

Testing with a few videos, that build seems to have fixed it for me. Skipping works at 2x and even 3x via Enhancer for YouTube.

Hakkin commented 1 year ago

Maybe you've already caught it, but I think I found the issue. The code at https://github.com/ajayyy/SponsorBlock/blob/64ece9cb733864924b1457e4a181662134b00a51/src/content.ts#L937 seems incorrect, it should just be getVideo().addEventListener('ratechange', rateChangeListener) rather than () => rateChangeListener. When the event is triggered, it's currently calling (() => rateChangeListener)(event), which just returns the rateChangeListener function rather than calling it.

It seems this was introduced in this commit which converted rateChangeListener from an anonymous arrow function to a named variable, but forgot to remove the arrow function declaration in the addEventListener call.

ajayyy commented 1 year ago

oh wow! good catch that makes sense! I'll look to see if I can get eslint to warn me about these things

Owen000 commented 3 months ago

@ajayyy im having this same issue still on firefox

philmatik commented 3 months ago

Also still having this issue on the latest Firefox build.

NothingCtrl commented 2 months ago

I have the same issue on Vivaldi, It's only working if I play the same video second times (play → stop, play → stop), but, if I swich to another video, the previous video will not skipping when I play it (need click stop → play again to make it work).

danispringer commented 4 weeks ago

I have this issue on brave browser on macos, thanks

afat123 commented 2 days ago

having this issue right now.

HumanInterfaceDevices commented 1 day ago

Started having this issue on Firefox after updating to 132.0.

Fully up-to-date. Youtube settings: stable audio:off, ambient mode:off, subtitles:off, playback:normal, sleep timer:off, quality:Auto(1080p60).

I turned off all other add-ons and restarted Firefox so SponsorBlock is the only running add-on. It loads the blocks and shows them on the progress bar, it just doesn't skip them until I reload the page. It always fails to skip on the first load. Rewinding doesn't help, only reloading.

Potential snag: I open every video by right clicking -> open link in new tab. I'll open several videos from the main or sub page this way, then watch them one at a time, closing each tab afterwards. This means they only fully load once I actually switch to the tab. The page, script, or both may not be loading as expected compared to clicking through.

I have not tested just clicking through to a video because I'll never actually do that when using youtube... not since they added the miniplayer that continues playing the video after clicking back in the browser. Latter pages should never affect how a former page is presented when returning to it.

Hakkin commented 1 day ago

You would probably be better off opening a new issue, whatever you're experiencing is most likely unrelated to this issue, which has already been fixed.

danispringer commented 1 day ago

What makes it seem like this issue has been fixed? I don’t use the mentioned “enhancer” and still have the issue as of last night.Thanks On Nov 17, 2024, at 1:03 PM, Hakkin Lain @.***> wrote: You would probably be better off opening a new issue, whatever you're experiencing is most likely unrelated to this issue, which has already been fixed.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>