TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.74k stars 3.09k forks source link

Rewrite: New Comment fragment makes the app crash for comment errors #11728

Open Profpatsch opened 5 days ago

Profpatsch commented 5 days ago

Now errors in the comments make the app crash completely (https://soundcloud.com/user-722618400/a-real-playa):

Exception

java.lang.IllegalArgumentException: Page doesn't contain an URL
    at org.schabi.newpipe.extractor.services.soundcloud.extractors.SoundcloudCommentsExtractor.getPage(SoundcloudCommentsExtractor.java:44)
    at org.schabi.newpipe.extractor.comments.CommentsInfo.getMoreItems(CommentsInfo.java:79)
    at org.schabi.newpipe.paging.CommentsSource$load$info$1.invokeSuspend(CommentsSource.kt:23)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
    at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [LazyStandaloneCoroutine{Cancelling}@16d25a5, Dispatchers.Main.immediate]


Originally posted by @Stypox in https://github.com/TeamNewPipe/NewPipe/issues/11060#issuecomment-2490595741

Profpatsch commented 5 days ago

Can reproduce

Profpatsch commented 5 days ago

It seems to be a bug in the extractor for Soundcloud comments; nonetheless we should show an empty comment section instead of crashing the app.

Stypox commented 4 days ago

Yes, we should do #11716 and show the error nicely