FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.25k stars 824 forks source link

[Bug]: Video stops loading during playback #5350

Open ArthurKun21 opened 3 months ago

ArthurKun21 commented 3 months ago

Guidelines

Describe the bug

  1. Watch videos/playlist for some time.
  2. Every now and then, the video would stop loading.
  3. Exit the video and just click the video again and it would load just fine

Expected Behavior

Consistent watching of the video.

Issue Labels

content not loading

FreeTube Version

fcee43c

Operating System Version

Windows 11, Macos 14.5

Installation Method

.dmg

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

Nightly Build

absidue commented 3 months ago

I've changed the title to mention the playback stopping, as so far none of the information you've provided points to it being caused by server-side ad injection. The whole point of server-side ad injection is that the ads are part of the audio and video streams, like they are on cable TV. If YouTube adding server-side ad injection caused videoplayback to stop, then they have severely failed in their implementation of it.

YouTube's MerchandiseShelf component is used to display the channel's own merchandise e.g. t-shirts, mugs, stickers. So it's highly unlikely that it would be connected to server-side ad injection.

Could you please check if there is any red text in the console, as those are errors, yellow text is just warnings? Additionally please check the network tab too (you need to open it before starting the video, so that it can keep track of all of the requests), things that could cause problems are requests talking really long e.g. multiple seconds or one that errored (e.g. marked red or with a status code of 400 or higher).

ArthurKun21 commented 3 months ago

on console

red error

renderer.js:2 

       POST https://rr2---sn-gvt5ajj2i-hoal.googlevideo.com/videoplayback?expire=1719755795&ei=sw-BZpaHN_Ov2roP4tmLyAI&ip=REDACTED&id=o-AGmi6yTkTO8BKBa4j1usmRMRnTPYCk9R_XD9dsFfGppE&itag=398&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C271%2C278%2C313%2C394%2C395%2C396%2C397%2C398%2C399%2C400%2C401&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=7P&mm=31%2C29&mn=sn-gvt5ajj2i-hoal%2Csn-hoa7kn7z&ms=au%2Crdu&mv=m&mvi=2&pl=22&initcwndbps=1327500&bui=AbKP-1OZFD6UHiMH2V4H7hmxNeOCsmzYBqnBe1ZU5YOgZBUAUn-95ZL9GpC-iicsHUGBjFRohYIjfbIa&spc=NO7bAVsCJQdncXEefx-N2B2_zMDsKiv44ihsNWQa3C_pr45E-3X6plibOKbW&vprv=1&svpuc=1&mime=video%2Fmp4&ns=LdTt5dSDcSSRO40gKkPFPsYQ&rqh=1&gir=yes&clen=34950954&dur=343.409&lmt=1619652034876210&mt=1719733737&fvip=4&keepalive=yes&c=WEB&sefc=1&txp=5532434&n=fYpp9oUgSzLQ-w&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHlkHjAwRQIhAI4NvBWdahRV3nPpPRAMNr8DaGDxXZe2rKkTN2lpCvLgAiAEM_kkl7anjsdBH4wxJxrgaJcWewXHrA2woLhVUbCfWQ%3D%3D&sig=AJfQdSswRAIgQvfQ61jsLPDPR1x871nAyIWNGjpVzXcAoWZBqbndSuwCIG-sPXt9VaDqYbSAiJrHCISAwCg1H4Vj-Uem3363ru89&cver=2.20240111.09.00&cpn=REDACTED&range=15688902-16309756 403 (Forbidden)

yellow warning

VIDEOJS: WARN: Problem encountered with playlist 4-placeholder-uri-4. HLS request errored at URL: https://rr2---sn-gvt5ajj2i-hoal.googlevideo.com/videoplayback?expire=1719755795&ei=sw-BZpaHN_Ov2roP4tmLyAI&ip=REDACTED&id=o-AGmi6yTkTO8BKBa4j1usmRMRnTPYCk9R_XD9dsFfGppE&itag=398&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C271%2C278%2C313%2C394%2C395%2C396%2C397%2C398%2C399%2C400%2C401&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=7P&mm=31%2C29&mn=sn-gvt5ajj2i-hoal%2Csn-hoa7kn7z&ms=au%2Crdu&mv=m&mvi=2&pl=22&initcwndbps=1327500&bui=AbKP-1OZFD6UHiMH2V4H7hmxNeOCsmzYBqnBe1ZU5YOgZBUAUn-95ZL9GpC-iicsHUGBjFRohYIjfbIa&spc=NO7bAVsCJQdncXEefx-N2B2_zMDsKiv44ihsNWQa3C_pr45E-3X6plibOKbW&vprv=1&svpuc=1&mime=video%2Fmp4&ns=LdTt5dSDcSSRO40gKkPFPsYQ&rqh=1&gir=yes&clen=34950954&dur=343.409&lmt=1619652034876210&mt=1719733737&fvip=4&keepalive=yes&c=WEB&sefc=1&txp=5532434&n=fYpp9oUgSzLQ-w&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHlkHjAwRQIhAI4NvBWdahRV3nPpPRAMNr8DaGDxXZe2rKkTN2lpCvLgAiAEM_kkl7anjsdBH4wxJxrgaJcWewXHrA2woLhVUbCfWQ%3D%3D&sig=AJfQdSswRAIgQvfQ61jsLPDPR1x871nAyIWNGjpVzXcAoWZBqbndSuwCIG-sPXt9VaDqYbSAiJrHCISAwCg1H4Vj-Uem3363ru89&cver=2.20240111.09.00&cpn=REDACTED&range=15688902-16309756 Switching to playlist 4-placeholder-uri-4.
VIDEOJS: WARN: Problem encountered with playlist 4-placeholder-uri-4. HLS request errored at URL: https://rr2---sn-gvt5ajj2i-hoal.googlevideo.com/videoplayback?expire=1719755795&ei=sw-BZpaHN_Ov2roP4tmLyAI&ip=REDACTED&id=o-AGmi6yTkTO8BKBa4j1usmRMRnTPYCk9R_XD9dsFfGppE&itag=398&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C271%2C278%2C313%2C394%2C395%2C396%2C397%2C398%2C399%2C400%2C401&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=7P&mm=31%2C29&mn=sn-gvt5ajj2i-hoal%2Csn-hoa7kn7z&ms=au%2Crdu&mv=m&mvi=2&pl=22&initcwndbps=1327500&bui=AbKP-1OZFD6UHiMH2V4H7hmxNeOCsmzYBqnBe1ZU5YOgZBUAUn-95ZL9GpC-iicsHUGBjFRohYIjfbIa&spc=NO7bAVsCJQdncXEefx-N2B2_zMDsKiv44ihsNWQa3C_pr45E-3X6plibOKbW&vprv=1&svpuc=1&mime=video%2Fmp4&ns=LdTt5dSDcSSRO40gKkPFPsYQ&rqh=1&gir=yes&clen=34950954&dur=343.409&lmt=1619652034876210&mt=1719733737&fvip=4&keepalive=yes&c=WEB&sefc=1&txp=5532434&n=fYpp9oUgSzLQ-w&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHlkHjAwRQIhAI4NvBWdahRV3nPpPRAMNr8DaGDxXZe2rKkTN2lpCvLgAiAEM_kkl7anjsdBH4wxJxrgaJcWewXHrA2woLhVUbCfWQ%3D%3D&sig=AJfQdSswRAIgQvfQ61jsLPDPR1x871nAyIWNGjpVzXcAoWZBqbndSuwCIG-sPXt9VaDqYbSAiJrHCISAwCg1H4Vj-Uem3363ru89&cver=2.20240111.09.00&cpn=REDACTED&range=15688902-16309756 Switching to playlist 4-placeholder-uri-4.
(anonymous) @ renderer.js:2
a.warn @ renderer.js:2
i.blacklistCurrentPlaylist @ renderer.js:2
(anonymous) @ renderer.js:2
n.dispatcher.n.dispatcher @ renderer.js:2
dn @ renderer.js:2
bn.trigger @ renderer.js:2
i.segmentRequestFinished_ @ renderer.js:2
(anonymous) @ renderer.js:2
(anonymous) @ renderer.js:2
No @ renderer.js:2
(anonymous) @ renderer.js:2
i @ renderer.js:2
a @ renderer.js:2
load (async)
c @ renderer.js:2
l @ renderer.js:2
t @ renderer.js:2
xl @ renderer.js:2
i.updateTransmuxerAndRequestSegment_ @ renderer.js:2
i.loadSegment_ @ renderer.js:2
i.fillBuffer_ @ renderer.js:2
i.monitorBufferTick_ @ renderer.js:2
setTimeout (async)
i.monitorBufferTick_ @ renderer.js:2
setTimeout (async)
i.monitorBuffer_ @ renderer.js:2
i.load @ renderer.js:2
i.load @ renderer.js:2
i.setCurrentTime @ renderer.js:2
i.setCurrentTime @ renderer.js:2
(anonymous) @ renderer.js:2
n.dispatcher.n.dispatcher @ renderer.js:2
seeking (async)
i.setCurrentTime @ renderer.js:2
e.techWaiting_ @ renderer.js:2
a @ renderer.js:2
n.dispatcher.n.dispatcher @ renderer.js:2

on network

red error

c @ app://bundle/renderer.js:2
l @ app://bundle/renderer.js:2
t @ app://bundle/renderer.js:2
xl @ app://bundle/renderer.js:2
i.updateTransmuxerAndRequestSegment_ @ app://bundle/renderer.js:2
i.loadSegment_ @ app://bundle/renderer.js:2
i.fillBuffer_ @ app://bundle/renderer.js:2
i.monitorBufferTick_ @ app://bundle/renderer.js:2
i.monitorBufferTick_ @ app://bundle/renderer.js:2
i.monitorBuffer_ @ app://bundle/renderer.js:2
i.load @ app://bundle/renderer.js:2
i.load @ app://bundle/renderer.js:2
i.setCurrentTime @ app://bundle/renderer.js:2
i.setCurrentTime @ app://bundle/renderer.js:2
(anonymous) @ app://bundle/renderer.js:2
n.dispatcher.n.dispatcher @ app://bundle/renderer.js:2
i.setCurrentTime @ app://bundle/renderer.js:2
e.techWaiting_ @ app://bundle/renderer.js:2
a @ app://bundle/renderer.js:2
n.dispatcher.n.dispatcher @ app://bundle/renderer.js:2
https://i.ytimg.com/vi_webp/_ZyD4n5zqxA/maxresdefault.webp?v=5ece6f06
absidue commented 3 months ago

Looks like the cause of the problem is YouTube returning a 403 error code. We definitely need to look into that.

P.S. I've edited your comment and deleted the previous revisions of it, to redact your IP address for you.

efb4f5ff-1298-471a-8973-3d47447115dc commented 2 months ago

@ArthurKun21 could you provide the video that this error happened on

ArthurKun21 commented 2 months ago

I don't have specific video where this keeps happening. But I mostly encounter this when listening to songs in a playlist for a long time. Lately the frequency of this error is getting lower though

Syldiana commented 2 months ago

I have the same thing happening for me, for about the last week. It's extremely random. Sometimes it happens for several videos in a row, other times I didn't see it for an entire day (and thought it was fixed). However, the one thing I have found is that it happens more frequently with randomized playlist turned on.

uncharted-user commented 2 months ago

Clicking on any video showing the following error,

SyntaxError: Unexpected token (1:47)
Faling back to invidious API

However, I can play a video, but the video gets paused or not playing when FreeTube is minimized or window is covered by another window. Video stops loading randomly at any point of a video.

ArthurKun21 commented 2 months ago

Clicking on any video showing the following error,

SyntaxError: Unexpected token (1:47)
Faling back to invidious API

However, I can play a video, but the video gets paused or not playing when FreeTube is minimized or window is covered by another window. Video stops loading randomly at any point of a video.

this is already known at the pinned issue #5378 and already got fixed with b2fe59d commit, just check the nightly build on the actions tab for the build that you can install

uncharted-user commented 2 months ago

this is already known at the pinned issue #5378 and already got fixed with b2fe59d commit,

Thanks for the information.

ArthurKun21 commented 2 months ago

Update: It appears the issue is still present on the newest update.

ArthurKun21 commented 2 months ago
WARN: Problem encountered with playlist 4-placeholder-uri-4. Problem encountered loading the default audio track. Switching to playlist 4-placeholder-uri-4.
aaronsql2019 commented 2 months ago

This happens to me. Note, my ISP is 'Starlink' and I have intermittent disconnections every 2-3 minutes.

I just started using FreeTube. I was watching a relatively large playlist. It just STOPPED PLAYLING in the middle of the 3rd or 4th song.

Other than that, I LOVE what I've seen about FreeTube so far.

You guys were asking for a specific URL earlier. I hope it's kosher to paste a YouTube link? https://www.youtube.com/playlist?list=PL28g2Q5SquTxFyIc06UctaxxWX4CLZzVg

I think that after playing 3-4 songs, it just 'hung' with a spinning circle (looking for the internet).

I have some apps that have a 'watchdog' type service. If the app is supposed to be playing, and the program thinks the internet is broken.. then re-check for internet connectivity in 5, 10, 30, 60, 300 second timeframe. (to cut down the chance of sending too many requests).

efb4f5ff-1298-471a-8973-3d47447115dc commented 2 months ago

@aaronsql2019 could you also check for errors in the console? Open it before you start watching the playlist.

aaronsql2019 commented 2 months ago

I actually haven't been hit by this in the last 36 hours. I'll report if and when I do.

I finally figured out how to 'make my own playlist' in FreeTube. I'm pretty darn stoked about that. Time for me to break out my SQL skills :)

mokahless commented 2 months ago

Just want to add that this has always happened to me with freetube for at least a year now in the circumstance where I pause a video and return to continue watching a few hours later.

efb4f5ff-1298-471a-8973-3d47447115dc commented 2 months ago

@mokahless your issue is unrelated to this, see #4160

Pamilg9 commented 2 months ago

Now this problem happened

Troughy commented 2 months ago

Happening to me too, usually around the 1:20-1:30 mark. Starts with the video freezing, audio will continue for a few seconds, then it will stop, and the loading circle will appear. Example: this video froze at 1:25. Same errors and warnings others posted before

aaronsql2019 commented 1 month ago

check for errors in the console? Open it before you start watching the pl

Yes, I finally got a chance to open the console (CTRL+SHIFT+I+3). I did have 'a hang' this morning when I was trying to play the same "FreeTube Playlist".

PS - I'm still SUPER confused. I just wanna LEACH a youtube playlist, the WHOLE playlist, and convert it to a FreeTube Channel ( I think that is the correct Syntax). I just can't figure out how to modify my 'Saved Playlists' through the youtube interface (I want to FORK someones playlist and remove ONE song).

Thanks. I'll add the relevant info if I get some console messages and / or a hang.

I'm currently getting these 2 messages: renderer.js:2 VIDEOJS: WARN: using Vhs.BANDWIDTH_VARIANCE is UNSAFE be sure you know what you are doing 48 Third-party cookie will be blocked in future Chrome versions as part of Privacy Sandbox.

aaronsql2019 commented 1 month ago

Hey I'm so sorry, I'm not trying to fill this issue up with random log entries. Please delete if you don't want to see this crap.

I advanced from song #1 to song #2. It is NOT 'hung' but I did get a bunch of new console messages, wanted to share

renderer.js:2 VIDEOJS: WARN: Problem encountered with playlist 4-placeholder-uri-4. Aborted early because there isn't enough bandwidth to complete the request without rebuffering. Switching to playlist 5-placeholder-uri-5.

absidue commented 1 month ago

Aborted early because there isn't enough bandwidth to complete the request without rebuffering.

That means the player thinks your internet connection is too slow to handle the stream it was previously playing, so it switched to a different one. Although it's definitely odd if it happened in the middle of playing the video.

Pamilg9 commented 1 month ago

Aborted early because there isn't enough bandwidth to complete the request without rebuffering.

That means the player thinks your internet connection is too slow to handle the stream it was previously playing, so it switched to a different one. Although it's definitely odd if it happened in the middle of playing the video.

Exoplayer doesn't have a solution for this?

absidue commented 1 month ago

ExoPlayer is a player for Android apps, FreeTube is a Windows, macOS and Linux app...

aaronsql2019 commented 1 month ago

Yeah.

I have Starlink. My internet is up and down like a _____ panties in church (or whatever I'm supposed to joke about). I think that Starlink tells me I'm obstructed ONCE a minute, I can't get it to provide those stats any longer.

2 years ago, it was every 3 minutes, at the old trailer. Now, last I saw, I think I have an obstruction once a minute

Now, on a different playlist I'm getting errors.

Am I just supposed to share the BOTTOM (most recent) errors in the console?

The VERY last error says '3rd Party Cookies will be blocked in future Chrome Versions'. This is NO LONGER true, right?

The 2nd to last error says this: renderer.js:2 VIDEOJS: WARN: Problem encountered with playlist 4-placeholder-uri-4. HLS request errored at URL: https://rr4---sn-nx5s7nee.googlevideo.com/videoplayback?expire=1723028711&ei=hwCzZsOMOITBsfIPhObn2Ak&ip=98.97.43.105&id=o-APPE6K9WyD4rnNMlubDgTwTRxSZ2FOXzC1MZP38BIc0X&itag=137&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=bN&mm=31%2C26&mn=sn-nx5s7nee%2Csn-vgqsrnsr&ms=au%2Conr&mv=m&mvi=4&pl=21&gcr=us&initcwndbps=1156250&vprv=1&svpuc=1&mime=video%2Fmp4&rqh=1&gir=yes&clen=39342952&dur=220.094&lmt=1703306928239519&mt=1723006862&fvip=1&keepalive=yes&c=IOS&txp=4532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cgcr%2Cvprv%2Csvpuc%2Cmime%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIgLxhgMgDaq8aK5LLX6ZRoQiYFS8bvNQCNZuToe_coZ4gCIQD73AHXxCidMUZPTcNDxaOuMalePxg6d9D4MbyjUVFw-w%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AGtxev0wRgIhAMuPPemrTIWK3gGpu5nm_m5mw3WFbo5T33uzLFI9WHE9AiEAmC9sghjX_fxFczY3fywbIzhWdPuybWXOPor7d2MSUJw%3D&cpn=9_Epogx2KHSNQLe5&range=23377815-24551169 Switching to playlist 4-placeholder-uri-4.

The VERY last error is in red. I've attached the file, because it's quite lengthy.

bundle-1723082139637.log

I'm planning on closing FreeTube and probably going back to Ariana not Sabrina Carpenter :)

aaronsql2019 commented 1 month ago

Yeah, I got one more major hang today. I've clicked to Pause / Play again, and it's not working.

I'm still trying to play the same Ariana Grande playlist. I hope It's OK I'm posting these. I'm planning on exiting the app and re-entering momentarily.

rr4---sn-nx57ynsk.googlevideo.com/videoplayback?expire=1723558402&ei=ohW7ZsmYNeDnsfIPsqelwA8&ip=98.97.40.36&id=o-AKIEx-oxuRASSmdybM0RV5QAg6G6cmgtCdNUR3Lyr870&itag=137&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=L_&mm=31%2C26&mn=sn-nx57ynsk%2Csn-a5msenek&ms=au%2Conr&mv=m&mvi=4&pl=21&gcr=us&initcwndbps=1712500&vprv=1&svpuc=1&mime=video%2Fmp4&rqh=1&gir=yes&clen=66875539&dur=238.154&lmt=1723037020247680&mt=1723536552&fvip=3&keepalive=yes&c=IOS&txp=4535434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cgcr%2Cvprv%2Csvpuc%2Cmime%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRAIgY6wL3vZCZaQk4PGgDC7_8vlxcW4VtdyJrc8pZ518Hb0CIHeAoJBA0whOBoIobymCKY0nx7_73y0KHBu2ws0iV25d&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AGtxev0wRQIgR16oSQCzzw9twu5wi_cfqwAT6KVX7SBRAQzrkv7YHpICIQD_v-PyPRn876dA1UtZtiE0enE2pHOWHh-OO9MPavUgMA%3D%3D&cpn=vDfpfHvZzpktUDCG&range=41902060-43601267:1

   Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

uncharted-user commented 1 week ago

It's still happening on Fedora 40 Gnome 46 Wayland session.