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

App can't continue YouTube video that was paused some hours ago #5730

Open
4 tasks done
JCU0 opened this issue Mar 2, 2021 · 13 comments
Open
4 tasks done

App can't continue YouTube video that was paused some hours ago #5730

JCU0 opened this issue Mar 2, 2021 · 13 comments
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background)

Comments

@JCU0
Copy link

JCU0 commented Mar 2, 2021

Checklist

Steps to reproduce the bug

  1. Start a video to play
  2. Pause a video.
  3. Lock your device.
  4. Sleep and relax for some hours
  5. Unlock your device
  6. Try to resume a video (problem is here)
  7. Try to play another video (no problem)
  8. Try to go back to previously paused video via History, Playlists tab, etc (problem is here again)

Actual behaviour

A video is starting to play for up to a minute (pre-loaded part), then it is freezing in an infinite load loop. When you try to switch to another video and return to that one, it's still not playable. You need to force close and reload the app to be able to continue with that video.

Expected behavior

A video should continue to play smoothly until end.

@JCU0 JCU0 added the bug Issue is related to a bug label Mar 2, 2021
@triallax triallax added the player Issues related to any player (main, popup and background) label Mar 3, 2021
@jonnyb49
Copy link

jonnyb49 commented Mar 3, 2021

This behavior happens even if paused in background mode. However this is not a new problem and has been observed in several last releases. Sometimes if there is enough of data queued up it could play for couple of seconds even a minute after this long pause , but as soon as it should fetch new data the play stops and stays like that forever.

It appears as if there was some kind of timer that overflows in this long pause and then it cannot start where it left off. Or the timestamp of the last queued data does not match current time thus unable to fetch new data from the source.

One workaround found is to stop the app, clear the storage cache in app settings, restart the app and via history restart the playback. However there is one big drawback to this action. It seems that the comments disappear completely after clearing the cache for all videos played afterwards. They sometimes resurface again after couple of day, but have not figured out what triggers this condition. But this is probably another bug issue that needs to be reported separately.

@XiangRongLin
Copy link
Collaborator

You can also just change the video quality to fix there current instance of the problem

@davidasunmo
Copy link

You can also just change the video quality to fix there current instance of the problem

And how to fix in background mode without having to force close the app and lose your current queue?

@FlareHeart
Copy link

FlareHeart commented Apr 10, 2021

I am still having this issue in 21.1. Now it won't even play buffered video and it seems newpipe thinks the video has ended since the icon changes to the "replay" arrow rather than the play triangle. Resuming is not possible and requires restarting the video.
This also occurs very quickly. After pausing and locking the device it only needs to be locked for a few minutes before the video is unable to be resumed.

@Ojd2000
Copy link

Ojd2000 commented Nov 6, 2021

I've been experiencing a similar issue for some releases (I can't tell for sure what ones). This may be related, so I'm reporting it here.
Currently I am using version 0.21.13.
Almost every time, when I pause a video, even for just a second, it displays the play triangle and I cannot resume it. Closing the video and reopening it fixes the issue (no need to restart the app), but it often happens that it is restarted from the beginning, instead of the last position (although the red indicator in the thumbnail showed it correctly until it was restarted).
I can also confirm that this also happens in background mode.
I could not find any indication on the conditions under which this issue presents, it seems random to me.

@Lomanic
Copy link

Lomanic commented Feb 27, 2022

Here are some logs for this issue. I started this video yesterday, paused it, set the phone under Airplane mode for the night, and the next day exited Airplane mode and tried continue watching the same video which triggered a An error occurred, see notification toast where I could get the following logs

Exception

  • User Action: play stream
  • Request: Player error[type=0] occurred while playing https://www.youtube.com/watch?v=Wp0sXD3vy1E
  • Content Country: US
  • Content Language: en
  • App Language: en_CA
  • Service: YouTube
  • Version: 0.22.1
  • OS: Linux Android 7.1.2 - 25
Crash log

com.google.android.exoplayer2.ExoPlaybackException: Source error
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:580)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:154)
	at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.ParserException: Invalid NAL length
	at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.readSample(Mp4Extractor.java:605)
	at com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.read(Mp4Extractor.java:249)
	at com.google.android.exoplayer2.source.BundledExtractorsAdapter.read(BundledExtractorsAdapter.java:127)
	at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1049)
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:417)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
	at java.lang.Thread.run(Thread.java:761)


@wombatch
Copy link

wombatch commented Mar 26, 2022

I too have this problem. I am now running 22.1,with previous releases changing the video resolution would allow the video to continue playing now with 22.1 this workaround does not help un the worst case I have had ( https://www.youtube.com/watch?v=rEOQMlICtpU )
I am not sure what sort of video stream is involved but for this case even clearing cache or restarting android did not make a difference.
Eventually I managed to get out of it by playing another video some made a difference others did not. The "history" technique in the post above also seemed to work

@cyphar
Copy link

cyphar commented May 29, 2022

I run into this issue very often (see #8455 and the screen recording). Changing resolutions only sometimes helps solve the issue and once you close the video there's a NewPipe crash each time you try to start the video. Clearing the cache is the only workable solution at the moment.

I don't know how NewPipe works internally but it seems like NewPipe doesn't seem to do a "from scratch" refresh of a video when it hits an error like this, and it seems like doing a complete refresh and re-fetch of the video if this error is hit for the first time would solve these issues?

@timsu92
Copy link

timsu92 commented Jun 5, 2022

Another workaround is to switch to the next video, wait for the next video to play, and then switch back to the original one. By doing this, no cache cleaning is required nor progress is lost, and it can play the next video normally

@onkq

This comment was marked as spam.

@opusforlife2
Copy link
Collaborator

@onkq Don't ping specific team members unless you're already in a discussion about some feature or bug.

@OldGuyInTheClub
Copy link

OldGuyInTheClub commented Jul 5, 2022

I am having this problem with Newpipe 0.23.0 on a Samsung Galaxy Note S10+, Android 12 and have had it in the past on other devices. Unfortunately now, none of the following work although they have in the past when the problem happened. It was trial and error among these options but one of them would eventually work.

  • Changing video resolution
  • Deleting video from watch history/reloading
  • Wipe cached metadata
  • Clear watch history
  • Delete playback positions
  • Try other app features including other videos and coming back
  • Force stop Newpipe/restart
  • Airplane mode on/off to force reconnection to the network
  • Reboot phone

I can download and watch the video in an external player but am hoping there's another way to work it in the app.

@TypicalScenario

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background)
Projects
None yet
Development

Successfully merging a pull request may close this issue.