NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Null Avatar URL Exception On PeerTube / Youtube Subscriptions with a Blank Avatar

Open blrbrb opened this issue 11 months ago • 1 comments

Checklist

  • [X] I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • [X] I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • [X] I have read the FAQ and my problem isn't listed.
  • [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • [X] This issue contains only one bug.
  • [X] I have read and understood the contribution guidelines.

Affected version

0.26.1

Steps to reproduce the bug

  1. Subscribe to a PeerTube / Youtube channel that does not have a user-supplied avatar (blank avatar)
  2. Scroll up and release on the "What's New" page to initate feed refresh.

Expected behavior

The feed finishes refreshing without throwing an exception for subscriptions with blank / default avatars.

Actual behavior

The feed finishes loading, and then throws a Null Pointer exception from attempting to gather information about a subscription with a blank avatar.

Screenshots/Screen recordings

No response

Logs

Exception

  • User Action: requested feed
  • Request:
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: none
  • Version: 0.26.1
  • OS: Linux samsung/a21sq/a21:12/SP1A.210812.016/A215USQUBCWG3:user/release-keys 12 - 31
Exceptions (5)

Crash log 1

org.schabi.newpipe.local.feed.service.FeedLoadService$RequestException: 3:https://pony.tube/video-channels/clipper
    at org.schabi.newpipe.local.feed.service.FeedLoadManager.loadStreams(FeedLoadManager.kt:229)
    at org.schabi.newpipe.local.feed.service.FeedLoadManager.access$loadStreams(FeedLoadManager.kt:33)
    at org.schabi.newpipe.local.feed.service.FeedLoadManager$startLoading$7.apply(FeedLoadManager.kt:113)
    at org.schabi.newpipe.local.feed.service.FeedLoadManager$startLoading$7.apply(FeedLoadManager.kt:112)
    at io.reactivex.rxjava3.internal.operators.parallel.ParallelMap$ParallelMapSubscriber.onNext(ParallelMap.java:116)
    at io.reactivex.rxjava3.internal.operators.parallel.ParallelFilter$ParallelFilterSubscriber.tryOnNext(ParallelFilter.java:132)
    at io.reactivex.rxjava3.internal.operators.parallel.ParallelRunOn$RunOnConditionalSubscriber.run(ParallelRunOn.java:399)
    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: java.lang.NullPointerException: (info as? ChannelInfo)?.…?: subscription.avatarUrl must not be null
    at org.schabi.newpipe.local.feed.service.FeedUpdateInfo.<init>(FeedUpdateInfo.kt:39)
    at org.schabi.newpipe.local.feed.service.FeedLoadManager.loadStreams(FeedLoadManager.kt:220)
    ... 13 more

Affected Android/Custom ROM version

Android 12

Affected device model

Samsung Galaxy A21 SM-A215U

Additional information

I have a suspicion that this issue is identical to #10778. The stack trace both resolve to the same Null Pointer Exception: Caused by: java.lang.NullPointerException: (info as? ChannelInfo)?.…?: subscription.avatarUrl must not be null issue.

The fact that #10778 is caused by a failure to fetch a blank avatar from a YouTube subscription, and in this case the same exception is thrown on a PeerTube channel might indicate that there need to be more robust extractor methods to handle this scenario in the future especially if it turns out to be a cross service issue.

thank you so much for your time and beautiful work!!

blrbrb avatar Mar 05 '24 00:03 blrbrb

Interesting! Nice to see new info about that bug.

opusforlife2 avatar Mar 07 '24 16:03 opusforlife2

Could you test https://github.com/TeamNewPipe/NewPipe/pull/10957?

Stypox avatar Apr 09 '24 18:04 Stypox