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

0.23.1 - Exceptions -> timeout, or problem with resolving youtube domain #8579

Closed
5 tasks done
pawlosck opened this issue Jul 6, 2022 · 7 comments
Closed
5 tasks done
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background) youtube Service, https://www.youtube.com/

Comments

@pawlosck
Copy link

pawlosck commented Jul 6, 2022

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

23.1

Steps to reproduce the bug

Just start play any movie.

Expected behavior

No response

Actual behavior

NewPipe throws exceptions and stops playing. After some time (few seconds), movie is resumed, but not always.

Screenshots/Screen recordings

No response

Logs

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT] occurred while playing https://www.youtube.com/watch?v=Nf9XKjemDg0
  • Content Country: PL
  • Content Language: pl
  • App Language: en
  • Service: YouTube
  • Version: 0.23.1
  • OS: Linux Android 9 - 28
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.loop(Looper.java:214)
	at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: java.net.SocketTimeoutException: timeout
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.read(YoutubeHttpDataSource.java:502)
	at com.google.android.exoplayer2.upstream.DefaultDataSource.read(DefaultDataSource.java:263)
	at com.google.android.exoplayer2.upstream.TeeDataSource.read(TeeDataSource.java:70)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.read(CacheDataSource.java:622)
	at com.google.android.exoplayer2.upstream.StatsDataSource.read(StatsDataSource.java:92)
	at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromUpstream(DefaultExtractorInput.java:291)
	at com.google.android.exoplayer2.extractor.DefaultExtractorInput.read(DefaultExtractorInput.java:68)
	at com.google.android.exoplayer2.source.SampleDataQueue.sampleData(SampleDataQueue.java:178)
	at com.google.android.exoplayer2.source.SampleQueue.sampleData(SampleQueue.java:590)
	at com.google.android.exoplayer2.extractor.TrackOutput$-CC.$default$sampleData(TrackOutput.java:157)
	at com.google.android.exoplayer2.source.SampleQueue.sampleData(Unknown Source:0)
	at com.google.android.exoplayer2.source.chunk.BundledChunkExtractor$BindingTrackOutput.sampleData(BundledChunkExtractor.java:233)
	at com.google.android.exoplayer2.extractor.TrackOutput$-CC.$default$sampleData(TrackOutput.java:157)
	at com.google.android.exoplayer2.source.chunk.BundledChunkExtractor$BindingTrackOutput.sampleData(Unknown Source:0)
	at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.readSample(FragmentedMp4Extractor.java:1444)
	at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.read(FragmentedMp4Extractor.java:342)
	at com.google.android.exoplayer2.source.chunk.BundledChunkExtractor.read(BundledChunkExtractor.java:153)
	at com.google.android.exoplayer2.source.chunk.ContainerMediaChunk.load(ContainerMediaChunk.java:127)
	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:764)
Caused by: java.net.SocketTimeoutException: timeout
	at com.android.okhttp.okio.Okio$3.newTimeoutException(Okio.java:221)
	at com.android.okhttp.okio.AsyncTimeout.exit(AsyncTimeout.java:261)
	at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:215)
	at com.android.okhttp.okio.RealBufferedSource.read(RealBufferedSource.java:60)
	at com.android.okhttp.internal.http.Http1xStream$FixedLengthSource.read(Http1xStream.java:602)
	at com.android.okhttp.okio.RealBufferedSource$1.read(RealBufferedSource.java:396)
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.readInternal(YoutubeHttpDataSource.java:841)
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.read(YoutubeHttpDataSource.java:500)
	... 21 more
Caused by: java.net.SocketException: socket is closed
	at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:584)
	at com.android.okhttp.okio.Okio$2.read(Okio.java:141)
	at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:211)
	... 26 more


Affected Android/Custom ROM version

Android 9

Affected device model

Samsung Galaxy s8

Additional information

It happened, when I installed latest 23.1 version. When I restore previous version (23.0) problem disappear.

NewPipe throws 2 exceptions.

  1. timeout
  2. problem with resolving youtube domain (movie is playing, so it's strange) -> I saw it one times, so I can't attach to issue
@pawlosck pawlosck added the bug Issue is related to a bug label Jul 6, 2022
@AudricV
Copy link
Member

AudricV commented Jul 6, 2022

When the issue happens in the player, can you play the same resolution (and if applicable, the audio stream) in an external player?

Does it happens with all qualities?

Also, do you have network issues when downloading the contents in the app and/or with tools such as yt-dlp? Network issues has been reported in it by some users, for which the fallback server provided by YouTube in its streaming URLs seems to work.

@AudricV AudricV changed the title 23.1 - Exceptions -> timeout, or problem with resolving youtube domain 0.23.1 - Exceptions -> timeout, or problem with resolving youtube domain Jul 6, 2022
@AudricV AudricV added youtube Service, https://www.youtube.com/ player Issues related to any player (main, popup and background) waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. labels Jul 6, 2022
@AudricV AudricV mentioned this issue Jul 12, 2022
@ghost
Copy link

ghost commented Sep 24, 2022

I have similar issue with v0.23.3 and v0.24.0-RC3 builds for the last days: most of YouTube videos are failed to load after trying to play it (in video screen, in popup and in background mode).

FTR, I have stable Internet connection, but trying to play almost all videos it appears infinity loading failed in 1-2 minutes with next error:

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT] occurred while playing https://www.youtube.com/watch?v=vw_WxslG_A4
  • Content Country: US
  • Content Language: en
  • App Language: en_US
  • Service: YouTube
  • Version: 0.23.3
  • OS: Linux Android 6.0.1 - 23
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:98)
	at android.os.Looper.loop(Looper.java:148)
	at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: java.net.SocketTimeoutException: failed to connect to rr2---sn-8ph2xajvh-n8vs.googlevideo.com/85.249.244.45 (port 443) after 8000ms
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.open(YoutubeHttpDataSource.java:389)
	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.InitializationChunk.load(InitializationChunk.java:99)
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
	at java.lang.Thread.run(Thread.java:818)
Caused by: java.net.SocketTimeoutException: failed to connect to rr2---sn-8ph2xajvh-n8vs.googlevideo.com/85.249.244.45 (port 443) after 8000ms
	at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
	at libcore.io.IoBridge.connect(IoBridge.java:122)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:452)
	at java.net.Socket.connect(Socket.java:884)
	at com.android.okhttp.internal.Platform.connectSocket(Platform.java:117)
	at com.android.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:438)
	at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:178)
	at com.android.okhttp.Connection.connect(Connection.java:1324)
	at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:1412)
	at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:131)
	at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:481)
	at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:462)
	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:368)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:476)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:418)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:540)
	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.open(YoutubeHttpDataSource.java:385)
	... 10 more


@AudricV
Copy link
Member

AudricV commented Sep 25, 2022

@pawlosck @Symbian9 Does increasing connection timeout and read timeout to 30 seconds (for all requests, including the playback ones), and using Cronet for playback improves the issue, or better, fixes it?

Here is a debug APK with these changes: app-debug-use-cronet-for-playback.zip

Note: the source code of these changes is not published yet.

Edit: now available at AudricV@6b5baba, sorry for the delay

@AudricV AudricV added waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. and removed waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. labels Sep 25, 2022
@pawlosck
Copy link
Author

My problem was solved, when I installed next version after 0.23.1. Currently, I can play any movie without any problems. Sometimes, NewPipe show info about some error, but I can play movie, so I don't read it and I don't know if this is the same error.

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Sep 25, 2022
@opusforlife2
Copy link
Collaborator

Thanks for confirming.

@Symbian9 Please open a new issue.

@ghost
Copy link

ghost commented Sep 26, 2022

Please open a new issue.

JFTR, I guess my issue might be related to existed one issue report:

@AudricV
Copy link
Member

AudricV commented Sep 27, 2022

JFTR, I guess my issue might be related to existed one issue report

Not at all, please open a new issue, like opusforlife2 said.

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) youtube Service, https://www.youtube.com/
Projects
None yet
Development

No branches or pull requests

3 participants