Skip to content

Can't resume YouTube videos after not playing for a long time #8627

@timsu92

Description

@timsu92

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.23.1

Steps to reproduce the bug

  1. Goto a channel in YouTube
  2. Press background to play in the background
  3. Shuffle the playlist using the notification
  4. ...Listen to music...
  5. Pause and wait for a long time
  6. Play it

Expected behavior

Continue fluently or try to load the video/audio again just like a click on the video, but start from the current time

Actual behavior

HTTP 403 and play the next video.
This behavior is new in this new version.
Before, it stucks somewhat like #5730, except I didn't face what that user said, nor totally the actual behavior:

  1. Try to go back to previously paused video via History, Playlists tab, etc (problem is here again)

Details below.

Screenshots/Screen recordings

No response

Logs

HTTP error 403 happened after a long time not listening to YouTube (eg. a good night's sleep😴; a nap isn't suffice)
Before updating to 0.23.1, it used to behave somewhat like #5730.

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_IO_BAD_HTTP_STATUS] occurred while playing https://www.youtube.com/watch?v=mnvsE7UtFVA
  • Content Country: TW
  • Content Language: zh-TW
  • App Language: zh_TW_#Hant
  • Service: YouTube
  • Version: 0.23.1
  • OS: Linux Android 12 - 31
Crash log

com.google.android.exoplayer2.ExoPlaybackException: Source error
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:641)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:613)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loopOnce(Looper.java:226)
	at android.os.Looper.loop(Looper.java:313)
	at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 403
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.open(YoutubeHttpDataSource.java:422)
	at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:258)
	at com.google.android.exoplayer2.upstream.TeeDataSource.open(TeeDataSource.java:52)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.openNextSource(CacheDataSource.java:786)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.open(CacheDataSource.java:599)
	at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
	at com.google.android.exoplayer2.source.chunk.ContainerMediaChunk.load(ContainerMediaChunk.java:124)
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:920)


Affected Android/Custom ROM version

Android 12 stock image

Affected device model

Samsung Galaxy S21 5G

Additional information

In the previous versions, I did things similar to #5730 and I got something similar.

Steps to reproduce the bug

  1. Goto a YouTube channel and play by pressing background to play in the background
  2. Shuffle the playlist using the notification
  3. Do the same from 2 to 6 of App can't continue YouTube video that was paused some hours ago #5730
  4. The video in the background stucks, with the loading funnel in the notification eternally.

Workaround

  1. Play. It might be consuming the cache.
  2. Switch to next track (since I'm in a playlist)
  3. It needs few seconds to start playing, but it always successes.
  4. Switch to previous track, which is the one I want to continue to listen to
  5. Excellent! It continues to play right from the time I paused it after few seconds just like it did in the third point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    YouTubeService, https://www.youtube.com/bugIssue is related to a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions