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

Firefox Scripts broken #267

Closed
livvydoodlez opened this issue Jul 17, 2024 · 14 comments
Closed

Firefox Scripts broken #267

livvydoodlez opened this issue Jul 17, 2024 · 14 comments

Comments

@livvydoodlez
Copy link

I was noticing ads getting through for affiliate streamers, but not so much partner streamers, so I decided to upgrade to the latest scripts on everything for firefox.

Now that I did so, the video NEVER loads.

I'm forced to use the Twitch Alternative Player now in order to watch any stream.

@stevenya97
Copy link

Are you using uBlock Origin scripts or the userscript versions? What is the exact version you are on?

@Hotaru89
Copy link

Hotaru89 commented Jul 18, 2024

Same issue as OP. latest firefox w/ ublock origin Version1.58.0

Was working fine until ads started to get through so I updated to https://raw.githubusercontent.com/pixeltris/TwitchAdSolutions/2eefb984c10ba64e9528b8cf4350d5fab653bd3a/video-swap-new/video-swap-new-ublock-origin.js
& now it just never loads but if you disable it then loads.

edit: and i have tried all the optional urls and same result (videos never load)

@stevenya97
Copy link

stevenya97 commented Jul 18, 2024

uBlock Origin has some known issues of applying the scripts, see #200 . The currently recommended ad block method by Pixeltris is to use the userscript versions, which runs independently of uBo. The README has additional info. I can suggest trying the following:

  1. There is a report from Vaft broken in Chromium browsers #262 that proxies can break the scripts. Disable any twitch proxy extensions temporarily(i.e. TTV LOL PRO, Alternate Player for Twitch.tv) and see if that fixes it. Multiple ad block solutions can potentially interfere with each other.

  2. If you want to stay on the uBlock versions, re-apply your uBo setup. Your permalink url is good, have it be the only url under userResourcesLocation. Make sure the filter twitch.tv##+js(twitch-videoad) is added to My Filters tab in the uBo settings. Disable and re-enable uBlock Origin extension. Restart your browser. It seems to be a lottery if uBo applies the script correctly.

  3. If you want to use the more stable userscript versions, first REVERT any uBO applied changes from above(remove script url from Advanced Options, remove filter under My Filters). This avoids duplicate scripts running. Go ahead and install a userscript manager like Violentmonkey(open source) or Tampermonkey(closed source). Open the link to the userscript of your choice from the README, which should prompt an install. Relaunch Firefox and test a stream out. Make sure you only have one script enabled at a time in userscript manager if you have both. You can swap between them easily to see which works best for you.
    Screenshot 2024-07-18 at 11 40 14 AM

@livvydoodlez
Copy link
Author

livvydoodlez commented Jul 19, 2024

Okay I wiped EVERYTHING that has to do with twitch adblocking (Via Ublock origin), and I only used tampermonkey to install the vaft userscript via tampermonkey, and it DOES start to block some ads.

However, it blocks in-video ads, which also make the stream quality drop, but also doesn't stop smaller ads that also go in-video but doesn't interrupt the actual video (if ublock origin is turned off that is).

The quality stays dropped until the actual ad WOULD be over, if it played. However, the issue is once another ad starts to play, the video quality drops, AND stops the video from playing. Audio still works and still continues like normal, but the actual video stops playing.

@stevenya97
Copy link

stevenya97 commented Jul 19, 2024

If I'm understanding correctly, the video is pausing and the audio continues to play during and after ads? The video quality dropping is how the scripts work yes, both scripts look for available m3u8 video streams during ads. Since it is server-side inserted, typically only 360p streams are available during an ad. The script inserts the 360p stream and switches back to the clean high quality one after the ad is over.

(vaft) The same as video-swap-new but attempts to get a clean stream faster (may suffer from more freezing / playback issues).

As noted in the README, vaft tries to switch faster but can have playback/audio sync issues because of it.. #164 tracks the vaft freezing issues. If you want a hands-off fix, try using video-swap-new userscript instead, which is less prone with a different switching method. That is the one I'm using atm and don't get playback issues(knock on wood). If you want to stick with vaft, here's a comment from Pixeltris with code you can try adding to the script if you know how. It adds an additional 4th request to address cases where the video stops playing and the first three requests don't fetch the stream.

If you want to explore options where you don't get quality drops, you can check out the proxy methods in the README. The idea is that they can route twitch streams to regions where twitch doesn't serve ads due to local laws. However they can have downtime if the proxy has an outage, which will result in ads/buffering.

Once you cleanup uBo settings after setting up Tampermonkey, you can continue to enable uBo normally to block any other ads. Userscripts + uBo for Twitch is fine. uBo catches other ads on the page like banner ads over the video player, banner ads along the bottom of the page, and chat sidebar ads. If you want to disable other upsells like the Turbo button and Prime gaming, you can check out FrankerFaceZ.

@comfortablemilk4454
Copy link

got an ad with tampermonkey 5.1.1 with the vaft userscript:
CleanShot 2024-07-19 at 18 29 07@2x

@comfortablemilk4454
Copy link

also happens with violentmonkey

@stevenya97
Copy link

stevenya97 commented Jul 20, 2024

Do you have any other extensions running?

Try open up the dev console(F12), do you see any messages with Found ads, switch to backup during ads? If not, the script is not running and there is an issue with Tampermonkey setup.
Screenshot 2024-07-19 230906

There is a respective message No more ads on main stream. Triggering player reload to go back to main stream... when ads are over.

@comfortablemilk4454
Copy link

i have these extensions & ffz userscript running on twitch in addition to vaft
CleanShot 2024-07-20 at 02 23 59@2x
where would i find the messages in the dev console?

@comfortablemilk4454
Copy link

nvm i went to the errors section and saw a lot of stuff:
CleanShot 2024-07-20 at 02 33 09@2x

@comfortablemilk4454
Copy link

@stevenya97 ^

@stevenya97
Copy link

I don't see the vaft related messages in there, is this still occurring? Something seems to be preventing the script from running.

@matirion
Copy link

Personally getting this error on both vaft and video swap new:
Script error in [Greasemonkey script https://github.com/pixeltris/TwitchAdSolutions/TwitchAdSolutions (vaft); version 10.0.0]:
TypeError: "fetch" is read-only. It seems to happen in the HookFetch function, and after the error it just doesn't run the rest of the function.

@livvydoodlez
Copy link
Author

My apologizes that I didn't respond earlier, but it seems clearing everything out and NOT using Vaft and only the video-swap worked.

It does suck that the quality of the video drops heavily, but I'll still take that over ads, so it is working for me now.

however, as I can see you are still helping other people with other issues related, but figured i'd at least close the case with just me.

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

No branches or pull requests

6 participants