InfinityLoop1308 / PipePipe

A FLOSS Android app to let you browse YouTube, NicoNico and BiliBili freely.
GNU General Public License v3.0
2.16k stars 46 forks source link

[Bug] Search Got No Result, Video Failed to Play, and Playlist Stopped in the Middle when I Routed Traffic Trough Tor. #391

Closed Willie169 closed 2 weeks ago

Willie169 commented 3 months ago

Checklist (Your issue will be automatically closed if you delete this part)

Describe the bug

  1. When I routes traffic through Tor, search loads with no result and video failed to play sometimes (no error report). Only route DNS request through Tor won't cause this problem.
  2. When I routes traffic through Tor, the YouTube playlist playing in the background stops and gives this error report when one video ends. Occurs approximately once in 2 videos. But it has a high chance of being back to normal after about 30 seconds to a minute if leave it just there in the background (to ensure it's not killed, I've held the wake lock). Error report is attached below. Only route DNS request through Tor won't cause this problem. Steps to reproduce the bug
  3. Use a VPN service to route traffic through Tor (I use TrackerControl and add SOCKS proxy to port 9050 and use Invizible Pro to run Tor on 9050 port, detailed step as https://github.com/Willie169/Android-Non-Root/#trackercontrol-and-invizible-pro-route-traffic-through-tor-block-dns-over-udp-set-dns-server-and-block-trackers).
  4. Search for something on PipePipe.
  5. Play a video on PipePipe.
  6. Play a playlist on PipePipe. Device (e.g. Pixel 9 Pro) Samsung Galaxy S24+\ Error report\ Exception
    • User Action: play stream
    • Request: Loading failed for [Nightcore - If I Die Young [HD]]: https://www.youtube.com/watch?v=TEsJW9KXuOc
    • Content Country: TW
    • Content Language: zh-TW
    • App Language: zhTW#Hant
    • Service: YouTube
    • Version: 3.7.0
    • OS: Linux Android 14 - 34
      Crash log

org.schabi.newpipe.player.mediasource.FailedMediaSource$StreamInfoLoadException: org.schabi.newpipe.extractor.exceptions.ExtractionException: IOS player response is not valid
    at org.schabi.newpipe.player.playback.MediaSourceManager.lambda$getLoadedMediaSource$4(MediaSourceManager.java:456)
    at org.schabi.newpipe.player.playback.MediaSourceManager.$r8$lambda$PbwBdDOtDG7Fq70IPh8GxY_v1yw(Unknown Source:0)
    at org.schabi.newpipe.player.playback.MediaSourceManager$$ExternalSyntheticLambda5.apply(Unknown Source:4)
    at io.reactivex.rxjava3.internal.operators.single.SingleOnErrorReturn$OnErrorReturn.onError(SingleOnErrorReturn.java:55)
    at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onError(SingleMap.java:70)
    at io.reactivex.rxjava3.internal.operators.single.SingleDoOnError$DoOnError.onError(SingleDoOnError.java:63)
    at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.onError(SingleSubscribeOn.java:73)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle$ToSingleMaybeSubscriber.onError(MaybeToSingle.java:89)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onError(FlowableElementAtMaybe.java:94)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.onError(MaybeConcatArray.java:100)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle$FromSingleObserver.onError(MaybeFromSingle.java:82)
    at io.reactivex.rxjava3.internal.operators.single.SingleDoOnSuccess$DoOnSuccess.onError(SingleDoOnSuccess.java:65)
    at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:47)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
    at io.reactivex.rxjava3.internal.operators.single.SingleDoOnSuccess.subscribeActual(SingleDoOnSuccess.java:35)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle.subscribeActual(MaybeFromSingle.java:41)
    at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.drain(MaybeConcatArray.java:153)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.request(MaybeConcatArray.java:78)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onSubscribe(FlowableElementAtMaybe.java:66)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray.subscribeActual(MaybeConcatArray.java:42)
    at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15868)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe.subscribeActual(FlowableElementAtMaybe.java:36)
    at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle.subscribeActual(MaybeToSingle.java:46)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
    at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
    at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:644)
    at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
    at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
    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: org.schabi.newpipe.extractor.exceptions.ExtractionException: IOS player response is not valid
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.fetchIosMobileJsonPlayer(YoutubeStreamExtractor.java:1099)
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.onFetchPage(YoutubeStreamExtractor.java:944)
    at org.schabi.newpipe.extractor.Extractor.fetchPage(Extractor.java:60)
    at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:84)
    at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:79)
    at org.schabi.newpipe.util.ExtractorHelper.lambda$getStreamInfo$3(ExtractorHelper.java:131)
    at org.schabi.newpipe.util.ExtractorHelper.$r8$lambda$YTHJjScxCJNO1LTCqs3IKy35iyY(Unknown Source:0)
    at org.schabi.newpipe.util.ExtractorHelper$$ExternalSyntheticLambda5.call(Unknown Source:4)
    at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:43)
    ... 23 more


Additional context I strongly appreciate and thank your miraculous work.

InfinityLoop1308 commented 1 month ago

It is hard to locate the problem as Tor is a black-box to me. However in the latest 3.8.2 you can sign in to YouTube, which might be helpful to the issue - please let me know if it works.

Willie169 commented 1 month ago

When using Tor, it keeps requesting reCaptcha after I logged in. Another reCaptcha request will come after I solve one and press the check at the up right corner, and no video can be shown. It's kinda familiar when using Google/Meta/etc. with Tor. Nevermind cuz I am just testing FOSS against Tor as experiment to improve my work.

Willie169 commented 1 month ago

And it work really well with TrackerControl or VPN. The frequency of similar issues when without Tor is small enough to convince me that that is due to settings put global settings_enable_monitor_phantom_procs true or similar things.

InfinityLoop1308 commented 2 weeks ago

OK I'll close the issue. Glad it helps.