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

Very frequent Player Error on VAFT #271

Closed
TsukiZero opened this issue Aug 11, 2024 · 31 comments
Closed

Very frequent Player Error on VAFT #271

TsukiZero opened this issue Aug 11, 2024 · 31 comments

Comments

@TsukiZero
Copy link

I know not why, but the player keeps getting errors far frequently. Good thing I got a script to reset on error.

@pixeltris
Copy link
Owner

There was a fix for error 1000 a little while ago 644ac7a

I haven't been watching Twitch much lately but I've seen a few midrolls without issues. Which browser are you using?

@xxAlex7
Copy link

xxAlex7 commented Aug 12, 2024

I have the same problem here and it started recently. Player errors, black screen with infinite loading when trying to start a broadcast and freezing. I tested the userscript and uBlock versions, both with the same problem (I don't know why but the uBlock version has more problems than userscript version). I also tested video-swap and vaft, video-swap is a little more stable than vaft but still has problems. I use Windows 11, Google Chrome and Tampermonkey, both updated to the latest version available.

@TsukiZero
Copy link
Author

TsukiZero commented Aug 12, 2024

It appears Amazon has another new check? This pops up in the console when the error happens
Player stopping playback - error MediaPlaylist:4 (ErrorInvalidData code 0 - Response body is not a valid M3U8.)

@pixeltris
Copy link
Owner

Are you sure you're using the latest version of the script? That's the same error log as the previous problem. The following is the only place where the m3u8 body is modified now:

if (streamM3u8Response.status == 200) {
textStr = await streamM3u8Response.text();
}

@TsukiZero
Copy link
Author

I'm using the VAFT, since it still allows me to see the latency to streamer.

@pixeltris
Copy link
Owner

OK I'll change the title of this issue to VAFT then. The scripts work in slightly different ways.

@pixeltris pixeltris changed the title Very frequent Player Error on Video Swap. Very frequent Player Error on VAFT Aug 12, 2024
@TsukiZero
Copy link
Author

I've had put Video Swap? huh, my bad, brain wasn't functioning from half sleeps.

@xxAlex7
Copy link

xxAlex7 commented Aug 21, 2024

OK I'll change the title of this issue to VAFT then. The scripts work in slightly different ways.

After the last update userscript versions of vaft and video-swap-new works fine, thanks for the update

@TsukiZero
Copy link
Author

VAFT hasn't been changed yet, so this still happens, Alex.
image

@xxAlex7
Copy link

xxAlex7 commented Aug 22, 2024

VAFT hasn't been changed yet, so this still happens, Alex. image

I'm using Tampermonkey + vaft userscript without any errors so far. I also removed twitch.tv##+js(twitch-videoad) from the My filters tab in uBlock and in I am an advanced user I set userResourcesLocation to unset

@trinlol
Copy link

trinlol commented Aug 22, 2024

I'm using Tampermonkey + vaft userscript without any errors so far. I also removed twitch.tv##+js(twitch-videoad) from the My filters tab in uBlock and in I am an advanced user I set userResourcesLocation to unset

This works.
Was using the ublock + vaft script - kept causing the player to blackscreen with the 'force reload' button that did nothing.

@stevenya97
Copy link

Yup related to #200 , userscript version is always recommended over uBlock scripts. Similar issues reported at #220 and #252 .

@wundertuete
Copy link

so I have been using userscript, anyone else getting constant stream freezes? sound goes on but the video freezes. Also getting constant error 3000 etc. It's been for weeks now. Has twitch changed something or why is the script not working as good as before anymore?

@stevenya97
Copy link

stevenya97 commented Sep 17, 2024

Error 3000 usually means some sort of player related issue where the userscript is conflicting with something. Do you have both vaft and video-swap-new scripts loaded? Or use the Adguard Extra script(contains a version of vaft)? VPNs or Twitch ad block extensions like TTV LOL Pro can also conflict. Try to use one ad solution at a time and don't mix them.

@wundertuete
Copy link

I only use Ublock Origin and Tampermonkey with VAFT script. I also use nextdns, not sure if this causes conflicts?

@stevenya97
Copy link

stevenya97 commented Sep 17, 2024

Just uBlock Origin for general ad blocking right? Not vaft applied in both uBo and Tampermonkey? Not too familiar with NextDNS but shouldn't be an issue if its just used for general dns requests and you aren't using a specific content-blocking variant like Cloudflare offers. Try using without it and report back. If it's a reproducible issue, it can be made note of.

Not seeing any issues with streams atm on my end with vaft & Firefox but will also keep an eye out today. Ads are blocking correctly and video does not freeze over the audio. #164 tracks most of the vaft playback issue reports. We did have error #1000 issues over the summer that is already updated that might be related. If the script is already up to date, have you tried using video-swap-new userscript instead? video-swap-new ended up being more stable for me over vaft.

@TsukiZero
Copy link
Author

Problem with Video Swap is that it masks the latency, so you don't know how behind you are in relation to the streamer. One time I was ONE MINUTE behind, didn't figure it until the streamer kept asking me to explain something I had explained 45+ seconds ago.

@pixeltris
Copy link
Owner

pixeltris commented Sep 18, 2024

@TsukiZero is this player error still happening for you on vaft? If so could you add a console.log(weaverText); above this line:

resolve(new Response(weaverText));

And check what the last console log was prior to the error ErrorInvalidData code 0 - Response body is not a valid M3U8.

@TsukiZero
Copy link
Author

And now to wait until the error happens again...

@EleZer0
Copy link

EleZer0 commented Sep 19, 2024

I'm frequently getting this error, today being the first its ever happened. Error#1000
Using Vaft Script on Tampermonkey, Firefox
Is this me or happening to everyone else?

image

@EleZer0
Copy link

EleZer0 commented Sep 19, 2024

image
image

@baker8491
Copy link

I'm frequently getting this error, today being the first its ever happened. Error#1000 Using Vaft Script on Tampermonkey, Firefox Is this me or happening to everyone else?

image

experiencing the same today

@pixeltris
Copy link
Owner

@EleZer0 from what I can see processM3U8 has HTTP error code handling but the following line does not:

var responseText = await response.text();

Try changing the following code from:

//Here we check the m3u8 for any ads and also try fallback player types if needed.
var responseText = await response.text();
var weaverText = null;
weaverText = await processM3U8(url, responseText, realFetch, PlayerType2);
if (weaverText.includes(AdSignifier)) {
weaverText = await processM3U8(url, responseText, realFetch, PlayerType3);
}
if (weaverText.includes(AdSignifier)) {
weaverText = await processM3U8(url, responseText, realFetch, PlayerType4);
}
resolve(new Response(weaverText));

To:

if (response.status === 200) {
    //Here we check the m3u8 for any ads and also try fallback player types if needed.
    var responseText = await response.text();
    var weaverText = null;
    weaverText = await processM3U8(url, responseText, realFetch, PlayerType2);
    if (weaverText.includes(AdSignifier)) {
        weaverText = await processM3U8(url, responseText, realFetch, PlayerType3);
    }
    if (weaverText.includes(AdSignifier)) {
        weaverText = await processM3U8(url, responseText, realFetch, PlayerType4);
    }
    console.log(weaverText);
    resolve(new Response(weaverText));
} else {
    console.log(url + ' failed with error code ' + response.status);
    resolve(response);
}

This should let the player handle the original error rather than giving it an invalid m3u8.

@EleZer0
Copy link

EleZer0 commented Sep 19, 2024

it seems to have helped? I'll report back if it seems to frequent again

@Vemigog
Copy link

Vemigog commented Sep 20, 2024

@pixeltris That code change seems to have worked. The error still occurs, but is now handled and doesn't interrupt playback.

e8zzee

@Psych32
Copy link

Psych32 commented Sep 20, 2024

How do I access this. Under "my filters" All I have typed is
twitch.tv##+js(twitch-videoad)

@TsukiZero
Copy link
Author

this is for the userscript approach. You'd need Greasymonkey or Tampermonkey.

@TsukiZero
Copy link
Author

Now I'm getting this problem where a LONG EXTM3U (or something like that) error causes the stream to get stuck in a long buffer that can crank the latency to 30s

@pixeltris
Copy link
Owner

@TsukiZero that would be a #164 thing. If the error 1000/3000 is fixed by the above code I'll push it and close this issue.

@TsukiZero
Copy link
Author

Might be. If the error happens again we just need to reopen the issue.

@pixeltris
Copy link
Owner

Should be fixed by 055e1ad

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

10 participants