feelfreelinux / WykopMobilny

Unofficial wykop.pl client for Android
MIT License
161 stars 49 forks source link

NPE on opening youtube channel URLs #176

Open luk1337 opened 5 years ago

luk1337 commented 5 years ago

Example URL that will crash the app: https://www.youtube.com/channel/1337. At first I wanted to fix it myself but it looks like the version "1.0.1.1" is not on git repo, nor is YTPlayer.kt present on the master branch thus I'm reporting it here instead.

logcat:

02-27 21:10:50.429 15793 15793 D AndroidRuntime: Shutting down VM
02-27 21:10:50.429 15793 15793 E AndroidRuntime: FATAL EXCEPTION: main
02-27 21:10:50.429 15793 15793 E AndroidRuntime: Process: io.github.feelfreelinux.wykopmobilny, PID: 15793
02-27 21:10:50.429 15793 15793 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{io.github.feelfreelinux.wykopmobilny/io.github.feelfreelinux.wykopmobilny.ui.modules.embedview.YTPlayer}: java.lang.NullPointerException: Video ID must not be null
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2951)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:106)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:193)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6718)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
02-27 21:10:50.429 15793 15793 E AndroidRuntime: Caused by: java.lang.NullPointerException: Video ID must not be null
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at io.github.feelfreelinux.wykopmobilny.ui.modules.embedview.YTPlayer.initialize(YTPlayer.kt:149)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at io.github.feelfreelinux.wykopmobilny.ui.modules.embedview.YTPlayer.onCreate(YTPlayer.kt:121)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:7144)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:7135)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
02-27 21:10:50.429 15793 15793 E AndroidRuntime:    ... 11 more