Closed drspod closed 2 weeks ago
I will say that this is also happening with video-swap-new and vaft, using uBlock Origin or Tamper Monkey. The console logs the following error when it happens:
An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#%7B%22version%22%3A%223.8.7%22%2C%22message%22%3A12%2C%22args%22%3A%5B%22slug%22%2C%22%7B%5Cn%20%20%5C%22__typename%5C%22%3A%20%5C%22Game%5C%22%2C%5Cn%20%20%5C%22name%5C%22%3A%20%5C%22Just%20Chatting%5C%22%2C%5Cn%20%20%5C%22displayName%5C%22%3A%20%5C%22Just%20Chatting%5C%22%2C%5Cn%20%20%5C%22id%5C%22%3A%20%5C%22509658%5C%22%5Cn%7D%22%5D%7D
followed by
Player stopping playback - error MediaPlaylist:4 (ErrorInvalidData code 0 - Response body is not a valid M3U8.)
Same error with vaft, very regularly, on a stream without ads.
Same error with purple commercial breaks
Until it's fixed, is there a way to catch the error and just restart the player when it happens?
Same here, I think Twitch may have updated its code in a way to block the adblocking Script. I hope there's a new script in the futur
I will say that this is also happening with video-swap-new and vaft, using uBlock Origin or Tamper Monkey. The console logs the following error when it happens:
An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#%7B%22version%22%3A%223.8.7%22%2C%22message%22%3A12%2C%22args%22%3A%5B%22slug%22%2C%22%7B%5Cn%20%20%5C%22__typename%5C%22%3A%20%5C%22Game%5C%22%2C%5Cn%20%20%5C%22name%5C%22%3A%20%5C%22Just%20Chatting%5C%22%2C%5Cn%20%20%5C%22displayName%5C%22%3A%20%5C%22Just%20Chatting%5C%22%2C%5Cn%20%20%5C%22id%5C%22%3A%20%5C%22509658%5C%22%5Cn%7D%22%5D%7D
followed by
Player stopping playback - error MediaPlaylist:4 (ErrorInvalidData code 0 - Response body is not a valid M3U8.)
If you have multiple scripts enabled in Tampermonkey or both uBo script applied and userscripts enabled, the scripts can conflict with each over trying to grab the clean m3u8 video stream and you can see that error. Try using only one solution/script
Until it's fixed, is there a way to catch the error and just restart the player when it happens?
Are you still seeing this happen? I can't reproduce it. I'm trying to find the div where this error appears. Theoretically it is simple to have a userscript check for the error appearing every couple of seconds and reload if detected. Would be better if I could just scan the exact place it'll be instead of scanning the entire page
Are you still seeing this happen? I can't reproduce it.
Yes, I only had to watch a stream for 10min before it reproduced the issue. This time the error response was a 502 Bad Gateway
instead of the 400 Bad Request
. Regardless of whatever is going on in twitch's backend, the script needs to handle any HTTP error returned from this request and not crash the stream.
GET /v1/playlist/Ct0FNAPBim<... snipped ...>.m3u8 HTTP/1.1
Host: video-weaver.cdg10.hls.ttvnw.net
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0
Accept: application/x-mpegURL, application/vnd.apple.mpegurl, application/json, text/plain
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Referer: https://www.twitch.tv/
Origin: https://www.twitch.tv
DNT: 1
Sec-GPC: 1
Connection: keep-alive
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
Priority: u=4
HTTP/1.1 502 Bad Gateway
content-length: 107
cache-control: no-cache
content-type: text/html
access-control-allow-origin: *
The twitch player fails with the same "The video download was cancelled. Please try again. (Error #1000)" error.
If you have multiple scripts enabled in Tampermonkey or both uBo script applied and userscripts enabled, the scripts can conflict with each over trying to grab the clean m3u8 video stream and you can see that error. Try using only one solution/script
Do you mean just uBlock Origin, or specifically running with the userResources set to vaft or video-swap-new? I do have uBlock Origin on, but reset the userResources property before installing vaft through TamperMonkey.
However, I got rid of the "twitch.tv##+js(twitch-videoad)" filter like someone mentionned, and so far I've had no new errors.
@stevenya97 no it's definitely a problem with the script I just haven't had time to address it.
The problem is when it detects an ad it returns an empty m3u8 response which results in the error on every midroll.
There is also another issue which I think is due to not properly handling error codes such as 404. These ones should be slightly more rare such as when a stream is restarted but I'm not certain on that. Hopefully passing the correct error code to the player fixes those.
This is a duplicate of #228. I'll leave this open and try to fix stuff up this weekend.
@pixeltris Noted, thanks. I must have confused this with a different previous issue. I only tested with prerolls no midrolls which could be why I didn't come across this error.
Browser: Firefox 126.0.1 (Desktop) Filter: video-swap-new (uBO)
Since a couple of days ago I have been experiencing streams regularly cutting out with this error: "The video download was cancelled. Please try again. (Error #1000)" This happens every couple of minutes or so, and usually at the moment when an ad would have been run.
The problem is resolved when commenting out the line
twitch.tv##+js(twitch-videoad)
from my filter list, so it must be caused by the filter script in some way. The problem also does not occur on channels that do not show ads (eg. because I am subscribed to the channel).Checking the network log, I see that whenever this problem occurs, it coincides with an error returned to the following request:
I have tried clearing my browser cache and cookies but this did not change the behavior.
Please let me know if there is any additional information I can provide to help debug this issue. Thank you.