This is a special case that occurs frequently for different search terms. I overcome it sometimes by clearing the app storage and cache or even reinstall.
Extra information: I sometime use Orbot in VPN mode. But regardless I get this crash. I have Lineage OS installed on Galaxy S9+ (if such information helps)
org.schabi.newpipe.extractor.exceptions.ParsingException: Could not parse json response
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSuggestionExtractor.suggestionList(YoutubeSuggestionExtractor.java:72)
at org.schabi.newpipe.util.ExtractorHelper.lambda$suggestionsFor$2(ExtractorHelper.java:107)
at org.schabi.newpipe.util.-$$Lambda$ExtractorHelper$kAwiU5Tjeit-NCwHTWhD3V6UHS8.call(Unknown Source:4)
at io.reactivex.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:44)
at io.reactivex.Single.subscribe(Single.java:3666)
at io.reactivex.internal.operators.single.SingleToObservable.subscribeActual(SingleToObservable.java:35)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableZip$ZipCoordinator.subscribe(ObservableZip.java:110)
at io.reactivex.internal.operators.observable.ObservableZip.subscribeActual(ObservableZip.java:72)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableMaterialize.subscribeActual(ObservableMaterialize.java:28)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableSwitchMap$SwitchMapObserver.onNext(ObservableSwitchMap.java:127)
at io.reactivex.internal.operators.observable.ObservableFilter$FilterObserver.onNext(ObservableFilter.java:52)
at io.reactivex.internal.operators.observable.ObservableConcatMap$ConcatMapDelayErrorObserver$DelayErrorInnerObserver.onNext(ObservableConcatMap.java:506)
at io.reactivex.observers.SerializedObserver.onNext(SerializedObserver.java:111)
at io.reactivex.internal.operators.observable.ObservableDebounceTimed$DebounceTimedObserver.emit(ObservableDebounceTimed.java:143)
at io.reactivex.internal.operators.observable.ObservableDebounceTimed$DebounceEmitter.run(ObservableDebounceTimed.java:168)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
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:919)
Caused by: com.grack.nanojson.JsonParserException: Unexpected token 'ml' on line 1, char 1
at com.grack.nanojson.JsonTokener.createParseException(Unknown Source:44)
at com.grack.nanojson.JsonTokener.createHelpfulException(Unknown Source:119)
at com.grack.nanojson.JsonTokener.advanceToToken(Unknown Source:95)
at com.grack.nanojson.JsonParser.advanceToken(Unknown Source:12)
at com.grack.nanojson.JsonParser.parse(Unknown Source:1)
at com.grack.nanojson.JsonParser$JsonParserContext.from(Unknown Source:19)
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSuggestionExtractor.suggestionList(YoutubeSuggestionExtractor.java:62)
... 26 more
If you could still reproduce it, could you install a debug version, connect your phone to your PC through USB, open Chrome, go to chrome://inspect, open that debug version of NewPipe on your phone, select that NewPipe instance in Chrome, go to the Network tab, try to reproduce the issue, and once you've successfully reproduced the issue, right-click in Chrome, select "Save as HAR with Content" and send me that HAR? Then I might be able to fix this issue.
If you could still reproduce it, could you install a debug version, connect your phone to your PC through USB, open Chrome, go to
chrome://inspect, open that debug version of NewPipe on your phone, select that NewPipe instance in Chrome, go to the Network tab, try to reproduce the issue, and once you've successfully reproduced the issue, right-click in Chrome, select "Save as HAR with Content" and send me that HAR? Then I might be able to fix this issue.
From where do I get the debug version of NewPipe?
Sorry, I should've linked this APK.
Sorry, I should've linked this APK.
I've installed this version. I will try to reproduce the crash as soon as possible. This depends heavily on chance. Sometimes it takes days for it to reoccur.
Thank you
Hmm… in that case it's probably pretty unlikely that it happens when you have your phone connected to your PC with Chrome open, etc. I could make a custom APK later that will just have the necessary info in the crash log.
Agreed. This Chrome HAR process is probably a little too involved for a lot of users. If you make that apk, you could hand it out willy-nilly for debugging.
@opusforlife2: No, such a custom APK would only work for debugging this specific issue. We want to add an option to add the page that caused the exception to the exception, however that will need major changes in the code, so that's why we don't have that yet.
org.schabi.newpipe.extractor.exceptions.ParsingException: Could not get ytInitialData
at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getInitialData(YoutubeParsingHelper.java:203)
at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.extractClientVersionAndKey(YoutubeParsingHelper.java:222)
at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getKey(YoutubeParsingHelper.java:298)
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSearchExtractor.getNewNextPageFrom(YoutubeSearchExtractor.java:233)
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSearchExtractor.getInitialPage(YoutubeSearchExtractor.java:127)
at org.schabi.newpipe.extractor.utils.ExtractorHelper.getItemsPageOrLogError(ExtractorHelper.java:19)
at org.schabi.newpipe.extractor.search.SearchInfo.getInfo(SearchInfo.java:55)
at org.schabi.newpipe.extractor.search.SearchInfo.getInfo(SearchInfo.java:30)
at org.schabi.newpipe.util.ExtractorHelper.lambda$searchFor$0(ExtractorHelper.java:81)
at org.schabi.newpipe.util.-$$Lambda$ExtractorHelper$BBduYDeZ_vXMQYaemaggmTPtqvA.call(lambda)
at io.reactivex.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:44)
at io.reactivex.Single.subscribe(Single.java:3666)
at io.reactivex.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: org.schabi.newpipe.extractor.utils.Parser$RegexException: failed to find pattern "window\["ytInitialData"\]\s*=\s*(\{.*?\});
at org.schabi.newpipe.extractor.utils.Parser.matchGroup(Parser.java:72)
at org.schabi.newpipe.extractor.utils.Parser.matchGroup(Parser.java:61)
at org.schabi.newpipe.extractor.utils.Parser.matchGroup1(Parser.java:52)
at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getInitialData(YoutubeParsingHelper.java:200)
... 21 more