Iridium icon indicating copy to clipboard operation
Iridium copied to clipboard

Videos stop loading - Chrome

Open Xores opened this issue 1 year ago • 34 comments

Since the beginning of October all my Youtube Videos stop loading around the 20 second mark and after buffering the "Something went wrong" Error appears I went through the whole Troubleshooting section and the Problem still persists

Iridium 2.1.2 Chrome Version 129.0.6668.90

Xores avatar Oct 08 '24 06:10 Xores

Hi there, thank you for taking the time to help me figure out what is going on with this issue.

Since you already followed the troubleshooting guide, I will assume that you already tested to see if the problem still exists with all extensions turned off except Iridium.

One other scenario I would like for you to test when you can is to do the above, but in incognito mode.

Simply go to the extension details in the Chrome Extensions settings, and you can enable that option to allow Iridium to run in incognito mode.

image

Then disable all other extensions, including uBlock or any other adblocker.

Finally, open a new incognito window in Chrome and check to see if the issue is still there.

If it is, please take a screenshot of the page and share it here.

My biggest suspicion is you're being served with a YouTube change that is not compatible with Iridium, in which case I will need to get it in order to find out what is breaking, and unfortunately I have no control of when YouTube could serve me that change. Either way, at least confirming the above could help me find out more about this problem.

ParticleCore avatar Oct 08 '24 12:10 ParticleCore

Interestingly enough the Issue does not persist in an Incoginto Window in Chrome with Iridium active

Xores avatar Oct 08 '24 13:10 Xores

That's good and bad news, it seems like it is indeed a YouTube website change on your end (when you use a non-incognito mode window), but unfortunately that means I will have to hope to eventually get it on my side in order to find out what is causing that problem for you.

If you can, would it be possible for you to share the console logs when the videos stop loading in your normal session? I am hoping there might be some crash information that could point out what the issue is.

To access the console when the problem occurs press Ctrl + Shift + J and make sure to select the top left filter to allow all messages to show on the console:

image

It should show a bunch of text in the console like this, just copy or screenshot what shows:

image

Other than that, if you want to use Iridium without this issue in normal mode you can try deleting all the YouTube history/cache in your Chrome browser to force YouTube to serve you with a different version.

I would love to give you a proper fix right now, but unfortunately it will really depend on anything useful showing in your logs, or me eventually receiving the YouTube website version that has the same problem as you.

Thank you for all the feedback you've provided.

ParticleCore avatar Oct 08 '24 15:10 ParticleCore

Just letting you know that I have the exact same problem. This isn't an isolated issue.

I'll add that all videos stop precisely at 0:19. If you need aditional feedback, let me know.

Good luck fixing the bug, I'll disable the extension and wait.

fccfc5d245c avatar Oct 08 '24 20:10 fccfc5d245c

@fccfc5d245c Thanks for letting me know, so far this seems restricted to a YouTube website change that I have yet not received, so until that happens (or a user has any logs that point to the problem) I am completely unable to fix it.

Until that happens, my only recommendation is to clear the YouTube history/cache from your browser to try and load a version of their website without the change that is causing that problem.

Just to note, they run at any time over 100 experiments (some are small tweaks to likes, others can be big changes like UI revamp), so it is possible that whatever is causing that problem is an unstable experiment of theirs. By clearing the website cookies/history in the browser, YouTube typically serves the user with another version of experiments.

That's why the other user noted that the issue was no longer happening when he tried it in incognito mode.

ParticleCore avatar Oct 08 '24 21:10 ParticleCore

Understood. I'll clear those so YouTube can run a different experiment on me, hoping that the new one will be compatible with your extension. And I'll send my log if I see anything of interest.

I can't imagine how annoying YT's bullshit must be for devs like you. Anyway, thank you for your work, Iridium is great when Google doesn't mess with it.

fccfc5d245c avatar Oct 08 '24 21:10 fccfc5d245c

So apparently I got moved to another experiment in the meantime and Videos are loading again.

Xores avatar Oct 11 '24 06:10 Xores

@Xores Thanks for letting me know, then it is as I suspected, it is a change on YouTube that I have yet to receive. When it happens I will address it and push a new update with a fix for it.

ParticleCore avatar Oct 11 '24 13:10 ParticleCore

Same here, everything's fine now.

fccfc5d245c avatar Oct 11 '24 17:10 fccfc5d245c

Hello, i've also been having this issue. opera_Oxn8WH34k8 image Here are some log files in case those help

Vuuni avatar Nov 30 '24 23:11 Vuuni

This has begun to happen to me aswell as of late 19-29 seconds in. Logs if necessary

Image

TheConfusedlol avatar Feb 13 '25 05:02 TheConfusedlol

This has started happening to me too all of a sudden. On both Chrome and Brave but still works fine on Firefox

BonusChromosome avatar Feb 19 '25 22:02 BonusChromosome

I've been doing some debugging, and I think the problem might just be the variable named mainScript. I guess maybe it clashes with a function YouTube themselves are using?

If I find-and-replace mainScript with mainScript2 and reload the extension it seems like it works fine again. :confused:

https://github.com/user-attachments/assets/b68c0936-2bbf-4673-ad80-dff530b7c18a

chrisgavin avatar Feb 21 '25 11:02 chrisgavin

I've been doing some debugging, and I think the problem might just be the variable named mainScript. I guess maybe it clashes with a function YouTube themselves are using?

If I find-and-replace mainScript with mainScript2 and reload the extension it seems like it works fine again. 😕 screen-2025-02-21_11.17.50.mp4

Could you search for mainScript (Ctrl+Shift+F) in the YouTube video page debugger/sources console to see what shows up?

Image

I have yet to face this problem, so I have to rely on you guys to help me find out the source of the problem.

ParticleCore avatar Feb 21 '25 18:02 ParticleCore

I do not find anything unfortunately. (Other than Iridium itself.)

image

Sorry to be so vague, I still have not worked out why it's breaking. :sob:

chrisgavin avatar Feb 21 '25 23:02 chrisgavin

I'm noticed that it occurs only when I'm logged in my acc. As soon as I'm logging out - videos play perfectly fine, but if logged in - it stops on 19 sec mark. It happened to me 2 days ago in 10 minutes: i finished watching one vid, clicked on next and it stopped working.

Viallein avatar Feb 22 '25 03:02 Viallein

I do not find anything unfortunately. (Other than Iridium itself.)

image

Sorry to be so vague, I still have not worked out why it's breaking. 😭

If it isn't too much trouble, could you confirm if the same issue exists when using FireFox?

ParticleCore avatar Feb 23 '25 15:02 ParticleCore

If it isn't too much trouble, could you confirm if the same issue exists when using FireFox?

I'm not seeing it immediately, but it's not completely reliably reproducible in Chrome-based browsers either. I'll keep using Firefox for a few days and see if it pops up there.

chrisgavin avatar Feb 23 '25 17:02 chrisgavin

@chrisgavin Wondering if there might be another extension trying to inject content in YouTube as well, which coincidentally also uses the same function name, leading to racing conditions. This would explain the inconsistency, but to confirm this it would basically mean disabling any other extensions and see if the issue ever occurs with only Iridium, which might not be very practical. Or disabling every extension except Iridium when the issue happens, and see if it goes away.

ParticleCore avatar Feb 24 '25 05:02 ParticleCore

I am experiencing the same issue when using Brave & Iridium. At the same time, Iridium works just fine in Firefox. I am using Firefox for the past week or so (since the issues started in Brave), but have not noticed any issues whatsoever. Also I am not sure if it helps at all -- in Brave I have 2 youtube accounts for 2 different Brave profiles, neither works. When I am logged in in Firefox with one of these accounts, there are no issues. A single extension I have in Brave apart from Iridium is Wikiwand (an extension for Wikipedia, so I doubt it interferes). Live streams don't play for me in Brave at all, and the rest of the videos just get stuck in infinite loading at 00:19...

blauberr avatar Feb 24 '25 11:02 blauberr

I've been doing some debugging, and I think the problem might just be the variable named mainScript. I guess maybe it clashes with a function YouTube themselves are using?

If I find-and-replace mainScript with mainScript2 and reload the extension it seems like it works fine again. 😕

screen-2025-02-21_11.17.50.mp4

This "patch" worked for me. Thanks @chrisgavin.

RafaelGouveia-1017 avatar Feb 25 '25 23:02 RafaelGouveia-1017

@RafaelGouveia-1017 Could you follow the steps in this reply https://github.com/ParticleCore/Iridium/issues/1006#issuecomment-2675262638

To see if there is something that might explain why this is happening?

ParticleCore avatar Feb 26 '25 01:02 ParticleCore

Image

Unfortunately nothing else besides Iridium shows up on my end either. This bug started happening to me just today. After turning off Iridium directly, video buffering? returned to normal.

I searched all relevant files of extensions that I use besides Iridium and none of them used the 'mainScript' keyword.

I truly haven't the faintest idea what this could be. Thanks @chrisgavin again for sparing me a lot of headaches.

RafaelGouveia-1017 avatar Feb 26 '25 02:02 RafaelGouveia-1017

Checking in because I just started having the same issue people are having here.

With Iridium active on incognito mode, videos still stop buffering past ~20 seconds.

I have cleared the cache of youtube, cookies, adjusted flags (hardware acceleration etc), updated chrome, all that stuff; when Iridium is disabled things start working again.

I cannot find any instance of 'mainScript' in the console.

JoshS-dev avatar Feb 26 '25 03:02 JoshS-dev

This issue just started for me. I run Iridium on Opera GX, which is built upon the Google Chrome architecture. If it works on chrome, it works on opera AFAIK. The debug log for the issue from Youtube is enclosed.

iridiumcrashlog.log

GamerMan27 avatar Feb 26 '25 04:02 GamerMan27

Important to note that I can use Iridium on Firefox, so it is specifically a Chrome issue, not a YouTube issue.

GamerMan27 avatar Feb 26 '25 04:02 GamerMan27

I've been playing around a bit more and I've found that to reproduce this all you have to do is make an extension that says window.mainScript = undefined; in the content script. Literally just having mainScript be a property on window is enough to break playback.

If I had to guess why this is so difficult to debug, my first thought is that this is some kind of anti-adblock feature in YouTube. Iridium does offer some ad-blocking features so it's possible they're targeting it deliberately. It would make sense if they've attempted to obfuscate this detection so it's hard to identify.

Would it be okay to just change the function name? It's unsatisfying to not know what's happening, but it seems like the easiest way around the problem for now. It would also help confirm whether Iridium was being targeted specifically if the issue reappears later with a less generic function name.

chrisgavin avatar Feb 28 '25 22:02 chrisgavin

I'm not someone who's any good at programming or troubleshooting, just hopping in here to say that I also had this issue, only Iridium seemed to cause it, and changing 'mainScript' to 'mainScript2' fixed the issue for me. I tested a lot of things, including disabling all of my adblockers and anything that said it had access to YouTube, but only disabling Iridium made the videos load again. I have Iridium installed on Firefox as well, along with all common extensions between the two browsers, and the loading issue doesn't happen on Firefox. I'm definitely willing to aid in experimenting to figure out the cause, but I might need simple instruction so that's up to our dev here to decide.

In case anyone as bad at programming as I am shows up here, I found mainScript in these two files: background-inject.js chrome-wrapper.js

Used Chrome extension source viewer, another extension, to get a zip of iridium. Unzip it and change the above two files, and load unpacked extension using a dev toggle at the top right of the 'manage extensions' menu.

I'm sure this is a really novice way to go about doing any of this, so if anyone has a better way or a better workaround I am absolutely all ears.

Windamier avatar Mar 01 '25 02:03 Windamier

Disabled this extension because videous plays for exactly 19 seconds and will start buffering forever. Waiting for an update.

sharkman avatar Mar 16 '25 13:03 sharkman

I would like to add that the PR #1012 is a fix for now I installed both the official version and the PR version side by side I keep getting the "Something went wrong!" error with the official version and with the PR version it works perfectly fine

Hope @ParticleCore can check it out asap

Meanwhile, anyone wanting a quick temporary fix, just download the repo code go to src//js/ and change the respective files as shown in the PR

for chrome, you'd change src/chrome/js/background-inject.js and src/chrome/js/chrome-wrapper.js

for firefox, src/firefox/js/background-inject.js and src/firefox/js/content-script.js

for the changes, you just find and replace all the "mainScript" instances with something unique like "iridium" as in the PR

then just go to your browser's extension/addon manager and enable developer tools

then just select "load unpacked" or equivalent and select the corresponding folder from "src" for your browser

MCUxDaredevil avatar Mar 25 '25 19:03 MCUxDaredevil