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

NewPipe doesn't fallback to IPv4 when IPv6 fails #11141

Open
6 tasks done
arkkito opened this issue Jun 7, 2024 · 17 comments
Open
6 tasks done

NewPipe doesn't fallback to IPv4 when IPv6 fails #11141

arkkito opened this issue Jun 7, 2024 · 17 comments
Labels
bug Issue is related to a bug

Comments

@arkkito
Copy link

arkkito commented Jun 7, 2024

Checklist

  • I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • 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.27.0

Steps to reproduce the bug

1 - Open NewPipe
2 - Nothing Loads, a loading circle just keep spinning

Expected behavior

Videos, and feeds load.

Actual behavior

Nothing Loads, a loading circle just keep spinning

Screenshots/Screen recordings

No response

Logs

No response

Affected Android/Custom ROM version

Android 14

Affected device model

Samsung A52

Additional information

NewPipe is working fine on mobile data, when I switch to Wi-Fi nothing works.
Videos/Channels/Feeds, just don't load.
Official YouTube client works on Wi-Fi, so does YouTube's website.
I tried to load sound cloud from NewPipe and got the same behavior.
If you need any logs, let me know what logs, and where to get them.

EDIT:
I just noticed something.
I have no IPv6 connectivity on my Wi-Fi. Meaning I get a IPv6 public address (android grabs 2 with SLAAC), but my ISP is not forwarding any IPv6 packets, they are all dropped.
My mobile data network doesn't have IPv6, I suspect this is why I can connect using mobile data and not Wi-Fi.

I am suspecting NewPipe doesn't fall back to IPv4 connection if IPv6 fails? Or does it take a very long time to do it?
EDIT: If I disable IPv6 in my router, NewPipe works fine. It seems confirmed NewPipe doesn't change back to IPv4, if IPv6 drops all the packets. I guess this is not the most "normal" situation, but other apps seem to be able to handle it.

@arkkito arkkito added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Jun 7, 2024
@arkkito arkkito changed the title NewPipe doesn't load anything NewPipe doesn't fallback to IPv4 when IPv6 fails Jun 8, 2024
@opusforlife2
Copy link
Collaborator

There have been issues in the past mentioning IPv4 vs IPv6. Yours is the first one, I think, that has nothing to do with network switching, but different addresses on the same network.

@opusforlife2 opusforlife2 removed the needs triage Issue is not yet ready for PR authors to take up label Jun 8, 2024
@arkkito
Copy link
Author

arkkito commented Jun 9, 2024

I suppose is not expected to have a configured public IPv6, and then have no internet on it, would be the same as having no internet on IPv4.
My ISP is still deploying IPv6, is not something that they are officially offering yet. But so far, NewPipe is the only APP that I use that doesn't seem to switch back to IPv4, but I assume there are probably more.

@opusforlife2
Copy link
Collaborator

I wonder if it's a bug in Okhttp.

@lf-
Copy link

lf- commented Jun 10, 2024

I have also reproduced this after accidentally leaving DHCPv6 configured on my router with public addresses but no actual connectivity.

@arkkito
Copy link
Author

arkkito commented Jun 10, 2024

to help reproduce this issue, I think the problem only occurs if the DNS server servers both AA and AAA records.
I recently tried in a network behind Fortigate, Android configured IPv6 address, but there was no connectivity over IPv6, but the DNS server didn't serve any AAAA records.
NewPipe works good in this scenario.
I guess is obvious, if the dns retrieves only A records it will never connect to a IPv6 address, just reporting it for completeness and easiness to reproduce.

@bobdanek
Copy link

Sounds exactly like what I reported in #8863. Still happens all the time.

@Tux7486
Copy link

Tux7486 commented Nov 21, 2024

I did change recently Internet provider and noticed that my pi-hole was not working correctly with my WiFi at home.

I did follow this guide (https://docs.pi-hole.net/routers/fritzbox-de/) and activated ULA (universal local adress).

My clients started working again, but newpipe won't load any videos/music what so ever...

Any ideas how to fix this? All other apps are working fine, only newpipe that seems to have troubles with this setup.

`## Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_IO_NETWORK_CONNECTION_FAILED] occurred while playing https://www.youtube.com/watch?v=6JkOCY9btnM
  • Content Country: AT
  • Content Language: de-AT
  • App Language: de_AT
  • Service: YouTube
  • Version: 0.27.2
  • OS: Linux Android 15 - 35
Crash log

com.google.android.exoplayer2.ExoPlaybackException: Source error
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:644)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:616)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.os.HandlerThread.run(HandlerThread.java:85)
Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: java.net.ConnectException: Failed to connect to rr2---sn-4g5lzned.googlevideo.com/74.125.162.7:443
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.open(YoutubeHttpDataSource.java:389)
	at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:263)
	at com.google.android.exoplayer2.upstream.TeeDataSource.open(TeeDataSource.java:52)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.openNextSource(CacheDataSource.java:796)
	at com.google.android.exoplayer2.upstream.cache.CacheDataSource.open(CacheDataSource.java:609)
	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:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)
Caused by: java.net.ConnectException: Failed to connect to rr2---sn-4g5lzned.googlevideo.com/74.125.162.7:443
	at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:147)
	at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
	at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
	at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
	at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
	at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.makeConnection(YoutubeHttpDataSource.java:704)
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.makeConnection(YoutubeHttpDataSource.java:548)
	at org.schabi.newpipe.player.datasource.YoutubeHttpDataSource.open(YoutubeHttpDataSource.java:383)
	... 10 more


`

@opusforlife2

This comment was marked as resolved.

@Tux7486

This comment was marked as resolved.

@opusforlife2

This comment was marked as resolved.

@Tux7486

This comment was marked as resolved.

@opusforlife2

This comment was marked as resolved.

@Tux7486

This comment was marked as resolved.

@opusforlife2

This comment was marked as resolved.

@Tux7486
Copy link

Tux7486 commented Nov 22, 2024

@opusforlife2
wuhu I did figure it out. I didn't use smarttube on my android TV for a while and fired it up -> it did not load any videos. Freetube on my laptop worked fine.

I found this smart comment at smarttube: "The general issues might come from your router settings that violates the RFC, with VPN everything works just fine."

yuliskov/SmartTube#2175 (comment)

I did disable the option "This Fritz!Box does provide standard internet access" in the ipv6 settings which disables the option to set an preference for Router Advertisement in the LAN". And now smarttube and newpipe works again on my local home wifi!!!
(I am not an expert at networking so I can't provide further details)

@opusforlife2
Copy link
Collaborator

Awesome! You clever bean. Let's hope this is able to help other people here.

@ldx00
Copy link

ldx00 commented Nov 25, 2024

@opusforlife2 wuhu I did figure it out. I didn't use smarttube on my android TV for a while and fired it up -> it did not load any videos. Freetube on my laptop worked fine.

I found this smart comment at smarttube: "The general issues might come from your router settings that violates the RFC, with VPN everything works just fine."

yuliskov/SmartTube#2175 (comment)

I did disable the option "This Fritz!Box does provide standard internet access" in the ipv6 settings which disables the option to set an preference for Router Advertisement in the LAN". And now smarttube and newpipe works again on my local home wifi!!! (I am not an expert at networking so I can't provide further details)

Thank you so much!! I also have a Fritz router and just turned off the IPv6 altogether and now everything works great. Before it was taking ages to do anything. It's best to restart everything (router, switches, AP if separate etc after changing this setting). It's not really a bug on NP side, but if it's possible to somehow ignore IPv6 connectivity, then maybe it will help.

Coincidentally I am also in Austria and just noticed this over the last few weeks. I think they are enabling IPv6 gradually and it's obviously causing issues. I'm on Spusu Fibre which is on A1.

I suspect that some of the switching between networks issues that people have had, might be related to this also.

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
Projects
None yet
Development

No branches or pull requests

6 participants