fgl27 / SmartTwitchTV

A Twitch web client that works on Android TVs and web base systems
GNU General Public License v3.0
366 stars 28 forks source link

New issue/behaviour #237

Open CristianGrecu opened 6 days ago

CristianGrecu commented 6 days ago

Hi, so my app starting doing something that I haven't seen before. As usual it's either me, Twitch or the app.

When watching some streams the screen would go black for a second with the buffering wheel showing and then back to normal. Sometimes it happens a a lot of times without any pattern. The speed is good, no dropped frames, nothing showing in the top right stats. Most of the times it comes back, but randomly I can see error code 2004. No one else seems to say anything in chat. Usually this happens when the stream ends for everyone if there's a serious problem.

Since it only happens with certain streams and no pattern (sometimes every few minutes, could even happen after half an hour) I assume this is Twitch again, right? The other issue that they admitted to still hasn't been fixed.

I wasn't sure if I should ask you, but I haven't seen this before and I've been using the app since 2022.

Thank you!

fgl27 commented 6 days ago

Yes, Twitch random server issue...

2004 is a network-related error:

image

as the error informs, the server returns something unexpected, even if all is fine there may be a random connection issue with the server providing the stream

This is also maybe related to how they randomly limit the speed of the connection.

CristianGrecu commented 6 days ago

That's just great, I've been using a VPN to fix the broken streams (many people have the same issue here in Eastern EU when watching US streams). Now the good streams start falling apart...

Thank you for the fast answer.

s1p2a3m commented 6 days ago

this is becoming super annoying, please reconsider adding a retry or something, because it throws this error and you have to click the stream again and again and again... it does not happen on every stream

CristianGrecu commented 5 days ago

When it was happening to me it usually went from black screen back to the stream on its own, but you are right, sometimes I have to press ok a bunch of times to stay.

I think they are doing some infrastructure changes because my latency to Twitch went from 50 to 10 on all streams and that's when the issues started. They also admitted they know about the problems. Not much we can do.

fgl27 commented 5 days ago

are you both using a VPN?

I already seen this type of issue but it was a single time when my internet was going on and off for a few seconds.

I can add a retry for a few of the player errors, I never did as most are unrecoverable, this 2004 for example...

For a few seconds, you may get the same error, as your network may be unable to reach the server for a few seconds, does a retry here will fail and fail.

Of course, I can add some checks on top of it to avoid infinity loops and crashes...

When I manage to make it I let you know.

s1p2a3m commented 5 days ago

I'm not using a VPN

CristianGrecu commented 5 days ago

No no, sorry I didn't explain correctly. There are 2 issues right now. The one I told you about a while ago, the streams that have low net speed in the top right corner. That's an issue a lot of people have when watching from EU to US servers.

I only use a VPN to route the connection through Seattle for those US streams. Most EU streams used to work perfectly, but some developed this black screen buffer. No VPN was active when it happened.

As I said in the previous message, my ping to twitch dropped from 45-50 to 10-15. Does that mean that they are installing new servers closer to me or? Maybe it had nothing to do with it.

So to summarise my 200 ping streams through VPN work fine, the black screen issue happened on an EU stream, no VPN. But it can happen on Asian streams as well.

Obviously this has happened in the past but I always read chat and usually I see a bunch of "F" messages. This time there was nothing, not even a single person and my stream would go black for a few secs and back to video.

CristianGrecu commented 5 days ago

Oh and it's not a temporary thing or related to a streamer's internet. It's been doing it today too, on a completely different stream that I haven't watched in weeks. It's random as usual...

lextra2 commented 5 days ago

same issue here twitch needs to fix this...

edit: not using a vpn

CristianGrecu commented 5 days ago

But I'm curious, how does this "error 2004" work on desktop? Like what do people using Chrome see? It's weird that nobody is saying anything in chat, maybe for most people it's just a buffer.

lextra2 commented 5 days ago

US streams are basically unwatchable for me right now. "Buffering" every 5 minutes followed by the stream cancelling itself...

CristianGrecu commented 5 days ago

I found a few that do this and tested a bit. VPN actually does seem to fix them, they run much better.

I use Nord VPN and route through Seattle, but please don't buy an expensive one just because I said it works.

So far I've had to pay for 3 months of VPN because Twitch never fixed my original issue... Back then I tried on PC as well and exactly the same thing happened. This app works perfectly so there's nothing he can do unfortunately.

CristianGrecu commented 5 days ago

Also, I was watching a stream just now and someone said : "is it me or has the stream stopped? ", so there's definitely something going on.

fgl27 commented 5 days ago

From Brazil is all fine, US and EU streams have no issues...

The ping is not direct to the Twitch server serving the stream but to Twitch itself, as their stream servers don't allow ping

But works as a metric to know if there is a network delay related to Twitch if the ping is high.

The Twitch site has an auto-recovery process, I watch from the site on a computer in a VPN and I have issues there, buffers and random freezes, but I see the player just recovering by resetting the stream or just retrying and retrying.

fgl27 commented 5 days ago

The way the player is configured today it already retries, it will try 3 times if fails due to an error, during this tries you probably see a back screen with a buffer spinner, and after that, it shows the error Player is lagging, quality changed to 'Auto mode' Error Code: XXXX

At this moment it tries to reset the stream and enable the AUTO playback...

If it fails here is because the connection was unuseful

this can be because Twitch denied the connection, or there is no way to connect to the server...

Then after a few seconds, all is fine you can open the stream again, and works.

This is what you all are getting right?

I can try to improve this but as the app is already doing a lot may not be possible.

Let me know if the process described here is the one you have so I can think of a solution.

CristianGrecu commented 5 days ago

Yes, exactly what you described, but on top of that, most of the times if a stream manages to "recover" on its own it also comes back with a 7+ second delay (at least for me) . So I have to adjust it with the remote anyway.

Today some streams worked perfectly, some almost unwatchable, at roughly the same time. I am sure it's not my internet. Also the fact that VPN actually fixes it.

But the fact that I managed to catch a comment that asked if the stream stopped while it was doing the black screen on my end means that it's Twitch, probably depending on our region.

lextra2 commented 5 days ago

The way the player is configured today it already retries, it will try 3 times if fails due to an error, during this tries you probably see a back screen with a buffer spinner, and after that, it shows the error Player is lagging, quality changed to 'Auto mode' Error Code: XXXX

At this moment it tries to reset the stream and enable the AUTO playback...

If it fails here is because the connection was unuseful

this can be because Twitch denied the connection, or there is no way to connect to the server...

Then after a few seconds, all is fine you can open the stream again, and works.

This is what you all are getting right?

I can try to improve this but as the app is already doing a lot may not be possible.

Let me know if the process described here is the one you have so I can think of a solution.

Yes but without the error code. (I have auto-switch resolution on lag disabled) It just closes the stream as if the streamer went offline.

fgl27 commented 5 days ago

OK I'll see what I can do to improve those scenarios retry and latency

Thanks

lextra2 commented 3 days ago

This issue now happens to EU streams, too.

CristianGrecu commented 3 days ago

Overall It's been a bit better for me today, only happened on one stream, but the worst example so far, kept going in a black screen loop even after I pressed "stay on stream".

fgl27 commented 3 days ago

Overall It's been a bit better for me today, only happened on one stream, but the worst example so far, kept going in a black screen loop even after I prssed "stay on stream".

you don't see the 'Checking if is live ...' ever in that scenario?

CristianGrecu commented 3 days ago

I did, it checked for live a few times > saw error 2004 > looked like stream ended > I pressed stay on stream and it went straight into another live check followed by another error 2004.

Only way to snap out of this was to go back to my followed list and refresh, of course the stream was still live and nobody was complaining.

And the VPN does still fix this like I said yesterday , it's just that if I can I'd rather not use it because the entire app is so slow with 200 ms ping, even refreshing the follow list takes seconds.

fgl27 commented 3 days ago

You can enable this option to auto always stay on the stream

Screenshot_2024-11-23-20-59-07-19_8fb930a926872f0234df725c011c783b

That is the only option for this type of problem

Is it fails again and again is because you have no path to the server

Exit, refresh and opening it again doesn't fix that, is just time passing and now whenever was your internet issues is now gone

The only information the app uses to get the stream is the streamers name something that doesn't change after any refresh

Not much to do here other then try yours ISP maybe they can do something.

CristianGrecu commented 2 days ago

I see. I don't think it has anything to do with my ISP at all. I'm pretty sure we are all from different countries anyways and like I said yesterday someone said "my stream ended" in a chat right around when I was having the issues. Also the fact that only 1 in 5 streams does it tells me it's Twitch.

Regarding the other problem that made me buy the VPN in the first place, that gave me another clue. Usually if an issue is due to ISP, a VPN should fix it universally, but it doesn't. Eu servers and even New York were doing the same thing. Only when I went through Seattle was the problem completely gone.

I'm 99% sure this is Twitch. I don't know if you saw one of my earlier messages, but my latency in the app dropped right around when the problems started. I used to have 50 ms for years in the top right corner. A few months back it dropped to 10 with a max of 20 on every single stream. Maybe it has something to do with it, maybe not.

fgl27 commented 2 days ago

OK, for now, who has this issue can you try to enable these setting options?

Settings > Player end dialog options > Always stay with... set to YES

image

image

If I make any change it will be the same as enable that...

In resume...

Error, the app will try to recover 3 times after that will try to change the quality to auto if allowed, else will just end the stream

If always stay is enabled it will... check if the stream info shows the streamer is live if yes will retrieve a new stream playback info and try to play it

CristianGrecu commented 2 days ago

I would try it, but I couldn't find any bad streams today. Maybe the others that posted here still have problems.

But it's pretty simple, I'm sure it's the best solution, it's not the app's fault anyway.

CristianGrecu commented 2 days ago

I was also curious, does your app have any way to pull info like the Chrome console does? Like when Twitch support ask you for a specific video/server id to troubleshoot.

fgl27 commented 2 days ago

I was also curious, does your app have any way to pull info like the Chrome console does? Like when Twitch support ask you for a specific video/server id to troubleshoot.

The server is geo base so is the same as in the browser.

The app can see the value but isn't exported to the user.

lextra2 commented 2 days ago

Its much better today. Only happened to one stream in 5 hours. Will probably fix itself within one week.