Vanced icon indicating copy to clipboard operation
Vanced copied to clipboard

error when playing video in google recommended news feed

Open damondiamond opened this issue 3 years ago • 8 comments

MOD EDIT: Bug description: YouTube crash when open video from a third-party application

Does your issue exists in the vanced guides? (YES/No) No

Variant: Root

Vanced version: Only v17.03.38.

Link used to download vanced: vancedapp.com

Android version: Any android version

Device: Any device

Steps to Reproduce: Steps to reproduce the error:

  1. Open any news feed app with embedded YT video
  2. Click on any YT video
  3. app crashes

Expected behaviour: The video should play fine without crashing

Screen recording/screenshot of the bug:

logcat java.lang.ExceptionInInitializerError at fi.vanced.libraries.youtube.whitelisting.Whitelist.setChannelName(Whitelist.java:45) at ywm.setCurrentVideoInformation(PG:1) at ywm.D(PG:3) at ywm.aR(PG:36) at ywm.B(PG:12) at yrs.d(PG:7) at yrq.b(PG:9) at rjs.b(PG:1) at yoj.k(PG:5) at yrs.a(PG:8) at ymj.h(PG:8) at ymh.d(PG:2) at xwr.run(PG:4) at android.os.Handler.handleCallback(Unknown Source:2) at android.os.Handler.dispatchMessage(Unknown Source:4) at android.os.Looper.loop(Unknown Source:210) at android.app.ActivityThread.main(Unknown Source:107) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11) at com.android.internal.os.ZygoteInit.main(Unknown Source:281) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference at fi.vanced.utils.SharedPrefUtils.getBoolean(SharedPrefUtils.java:32) at fi.vanced.utils.SharedPrefUtils.getBoolean(SharedPrefUtils.java:29) at fi.vanced.libraries.youtube.whitelisting.Whitelist.parseEnabledMap(Whitelist.java:101) at fi.vanced.libraries.youtube.whitelisting.Whitelist.(Whitelist.java:34) ... 20 more

Thanks to vellrya for template report

damondiamond avatar Feb 19 '22 09:02 damondiamond

Known, will be fixed with next vanced release.

(Also, please follow proper bug reporting template next time)

milindgoel15 avatar Feb 19 '22 09:02 milindgoel15

Could you re-write this issue with the required template?

milindgoel15 avatar Feb 19 '22 09:02 milindgoel15

Sry idk

damondiamond avatar Feb 19 '22 11:02 damondiamond

I am running into this too every time I try to watch a video from Google News. I also seem to get this when clicking on youtube links from other apps (e.g. from Sync for Reddit)

InvisibleBacon avatar Feb 23 '22 19:02 InvisibleBacon

Could you re-write this issue with the required template?

Bug description: YouTube crash when open video from thid-party application

Does your issue exists in the vanced guides? (YES/No) No

Variant: Root

Vanced version: Crash on v17.03.38, works before upgrade.

Link used to download vanced: vancedapp.com

Android version: Android 10

Device: OnePlus 7 Pro

Steps to Reproduce: Steps to reproduce the error:

  1. Open VK app (CIS social network, probably some other app with YT video)
  2. Click on any YT video
  3. Oops..

Expected behaviour: Screen recording/screenshot of the bug: I love standard forms :)

Attach logcats in case of crashes by uploading them to pastebin or katbin if possible. These can help solve the issue. 2022-03-11 18:00:48.746 28423-28423/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.google.android.youtube.player, PID: 28423 java.lang.ExceptionInInitializerError at ywm.setCurrentVideoInformation(PG:1) at ywm.D(PG:3) at ywm.aR(PG:36) at ywm.B(PG:12) at yrs.d(PG:7) at yrq.b(PG:9) at rjs.b(PG:1) at yoj.k(PG:5) at yrs.a(PG:8) at ymj.h(PG:8) at ymh.d(PG:2) at xwr.run(PG:4) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7710) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference at fi.vanced.utils.SharedPrefUtils.getBoolean(SharedPrefUtils.java:32) at fi.vanced.utils.SharedPrefUtils.getBoolean(SharedPrefUtils.java:29) at fi.vanced.libraries.youtube.whitelisting.Whitelist.parseEnabledMap(Whitelist.java:101) at fi.vanced.libraries.youtube.whitelisting.Whitelist.(Whitelist.java:34) at ywm.setCurrentVideoInformation(PG:1)  at ywm.D(PG:3)  at ywm.aR(PG:36)  at ywm.B(PG:12)  at yrs.d(PG:7)  at yrq.b(PG:9)  at rjs.b(PG:1)  at yoj.k(PG:5)  at yrs.a(PG:8)  at ymj.h(PG:8)  at ymh.d(PG:2)  at xwr.run(PG:4)  at android.os.Handler.handleCallback(Handler.java:883)  at android.os.Handler.dispatchMessage(Handler.java:100)  at android.os.Looper.loop(Looper.java:214)  at android.app.ActivityThread.main(ActivityThread.java:7710)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950) 

I'm ready to take the time to fill in the template, as it's hard to use YouTube Vanced right now. I hope a fix will be posted as soon as possible) Is there any way to install previous vanced version until an update with fix is released?

vellrya avatar Mar 11 '22 15:03 vellrya

I'm ready to take the time to fill in the template, as it's hard to use YouTube Vanced right now. I hope a fix will be posted as soon as possible)

Thanks for this.

Is there any way to install previous vanced version until an update with fix is released?

yes, you can choose a previous version inside vanced manager. when tapping on install, just select the version from version selector.

milindgoel15 avatar Mar 11 '22 15:03 milindgoel15

Does anyone know a workaround to this? I cannot install a previous version because it would be a downgrade to the version preinstalled with my OS

shaansheikh avatar Jul 31 '22 01:07 shaansheikh

No workaround. Except using non-root version instead

milindgoel15 avatar Aug 02 '22 10:08 milindgoel15