Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(YouTube): app crashes when SponsorBlock patch is excluded #2068

Closed
5 tasks done
NoMorePizza opened this issue May 26, 2024 · 22 comments
Closed
5 tasks done

bug(YouTube): app crashes when SponsorBlock patch is excluded #2068

NoMorePizza opened this issue May 26, 2024 · 22 comments
Labels
Bug report Something isn't working

Comments

@NoMorePizza
Copy link

NoMorePizza commented May 26, 2024

Type

Error at runtime

Tools used

RVX Manager

Application

YouTube v19.20.34
Patches v4.8.3

Bug description

When I try to open the app, it just crashes and closes on startup.

Error logs

No response

Solution

No response

Additional context

Sorry for not having any error logs, I don't know how to get them. I'm not tech-savvy enough.

Device Environment

Android 14, OneUI 6.0

Acknowledgements

  • This issue does not reproduce on unpatched YouTube or YT Music.
  • This issue is not a duplicate of an existing bug report.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • I have written the title and contents in English.
@NoMorePizza NoMorePizza added the Bug report Something isn't working label May 26, 2024
@inotia00
Copy link
Owner

inotia00 commented May 26, 2024

Since there is no crash log, there is no context I can provide.
Try patching with YouTube v19.16.39

@NoMorePizza
Copy link
Author

I patched with v19.16.39 and now the app opens normally. I wonder why v19.20.34 doesn't work.

Is it difficult to get crash logs? Do I need a rooted device for that?

@inotia00
Copy link
Owner

inotia00 commented May 26, 2024

Is it difficult to get crash logs? Do I need a rooted device for that?

I assume termux is installed on your device.

  1. Open termux and enter the following command:
logcat | grep AndroidRunTime > /storage/emulated/0/logcat.txt
  1. Open RVX and reproduce the force close
  2. Go back to termux and type CTRL + C
  3. Attach log.txt

@NoMorePizza
Copy link
Author

I tried without any success. Do I need an SD card for that? Because mine recently bricked itself.

@inotia00
Copy link
Owner

nah /sdcard means internal storage

@ILoveOpenSourceApplications

I'm also having the same issue and would like to contribute. Is the command for Windows the one given below?

adb logcat | findstr AndoridRuntime > logcat.txt

@inotia00
Copy link
Owner

yes

@ILoveOpenSourceApplications
05-26 21:09:15.616 31259 31259 D AndroidRuntime: Shutting down VM
05-26 21:09:15.617 31259 31259 E AndroidRuntime: FATAL EXCEPTION: main
05-26 21:09:15.617 31259 31259 E AndroidRuntime: Process: app.rvx.android.youtube, PID: 31259
05-26 21:09:15.617 31259 31259 E AndroidRuntime: java.lang.VerifyError: Verifier rejected class kxr: void kxr.F() failed to verify: void kxr.F(): [0x40B] register v7 has type Reference: android.widget.LinearLayout but expected Reference: android.widget.FrameLayout (declaration of 'kxr' appears in /data/app/~~xjmdOsTUENvhPOoH1fwVcA==/app.rvx.android.youtube-GvYsWoWw2qGAup4YSwQMVQ==/base.apk!classes6.dex)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at kxa.v(PG:1)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at gbm.b(PG:8)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at gbm.a(PG:88)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at azol.a(PG:16)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at azok.a(PG:5)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at gbm.l(PG:63)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at gbm.a(PG:73)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at azol.a(PG:16)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at gbm.l(PG:64)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at gbm.a(PG:73)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at azol.a(PG:16)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at xnk.b(PG:3)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at xnk.<init>(PG:10)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at nmg.<init>(PG:18)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at nlj.t(PG:1)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at gbm.k(PG:7)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at gbm.a(PG:78)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at azol.a(PG:16)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at azok.a(PG:5)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at xnk.b(PG:3)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at xnk.a(PG:5)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at njt.run(PG:256)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at xxq.run(PG:20)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at xxs.l(PG:59)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at xxs.m(PG:57)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at com.google.android.apps.youtube.app.watchwhile.MainActivity.onCreate(PG:983)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:8975)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:8944)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4146)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2685)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:230)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:319)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:8919)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
05-26 21:09:15.617 31259 31259 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

@inotia00
Copy link
Owner

Thanks for providing the logs
I'll reopen the issue

@inotia00 inotia00 reopened this May 26, 2024
@inotia00

This comment was marked as outdated.

@inotia00

This comment was marked as outdated.

@ILoveOpenSourceApplications

If possible, can you export settings and upload here?

I'm unable to open the app as the crash is instantaneous and I don't have any backup either for my YouTube settings. So I'm pretty much in a pickle. If I'm to uninstall and install v19.16.39, I'll have to toggle each setting one by one.

@inotia00
Copy link
Owner

This seems to be the crash log of YouTube v19.21.34 (unsupported version)

@ILoveOpenSourceApplications

Also please specify which YouTube version the crash log is from

Log is from v19.21.34. I know the recommended version is v19.20.34 but I misread the issue #2070 and somehow came to the conclusion that the app opens in that version and hence I thought maybe I can open the app and import the settings if the app opens. But i was wrong.

@ILoveOpenSourceApplications

I can open the app with basic patches such as Hide ads, GmsCore support, Theme, etc. But if I add anything more the app starts crashing.

@ILoveOpenSourceApplications

I can provide my patch selection from Manager at best now or I'll have to downgrade and change the settings once again.

@inotia00
Copy link
Owner

Please attach crash log from YouTube v19.20.34

@ILoveOpenSourceApplications
05-27 00:29:56.791 16130 16130 E AndroidRuntime: FATAL EXCEPTION: main
05-27 00:29:56.791 16130 16130 E AndroidRuntime: Process: app.rvx.android.youtub, PID: 16130
05-27 00:29:56.791 16130 16130 E AndroidRuntime: baif: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | java.lang.ExceptionInInitializerError
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at aztl.aa(PG:39)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at bahp.run(PG:8)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:958)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:230)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:319)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:8919)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
05-27 00:29:56.791 16130 16130 E AndroidRuntime: Caused by: java.lang.ExceptionInInitializerError
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at app.revanced.integrations.youtube.patches.video.PlaybackSpeedPatch.newVideoStarted(PlaybackSpeedPatch.java:31)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at gzv.setVideoInformation(Unknown Source:27)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at gzv.l(PG:35)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at gwx.a(PG:92)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at bbic.wZ(PG:9)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at barp.wZ(PG:3)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at barm.d(PG:113)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at barm.wZ(PG:24)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at baqr.g(PG:13)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at baqp.run(PG:5)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at azvw.run(PG:27)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at bahp.run(PG:3)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        ... 8 more
05-27 00:29:56.791 16130 16130 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:270)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at android.content.res.Resources.getDrawableForDensity(Resources.java:1049)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at android.content.res.Resources.getDrawable(Resources.java:989)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at android.content.res.Resources.getDrawable(Resources.java:964)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at app.revanced.integrations.shared.utils.ResourceUtils.getDrawable(ResourceUtils.java:103)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        at app.revanced.integrations.youtube.whitelist.Whitelist.<clinit>(Whitelist.java:50)
05-27 00:29:56.791 16130 16130 E AndroidRuntime:        ... 20 more

@ILoveOpenSourceApplications

The two patches which are causing the issue for me are Fullscreen components and Video playback.

@inotia00
Copy link
Owner

inotia00 commented May 27, 2024

Thanks for providing the logs
Could you please provide the YouTube version used for the patch and a full list of patches to include or exclude?

nvm, I found the cause of the issue
Thank you again for finding out which patch is causing the issue

@inotia00 inotia00 changed the title bug(YouTube): app crashes on startup bug(YouTube): app crashes when SponsorBlock and Overlay buttons patches are excluded May 27, 2024
@inotia00 inotia00 changed the title bug(YouTube): app crashes when SponsorBlock and Overlay buttons patches are excluded bug(YouTube): app crashes when SponsorBlock patch is excluded May 27, 2024
inotia00 added a commit to inotia00/revanced-integrations that referenced this issue May 27, 2024
inotia00 added a commit to inotia00/revanced-integrations that referenced this issue May 27, 2024
@ILoveOpenSourceApplications
Copy link

ILoveOpenSourceApplications commented May 27, 2024

Thanks for providing the logs Could you please provide the YouTube version used for the patch and a full list of patches to include or exclude?

The version I used for the logs is v19.20.34.
Uploading my patches selection here:
selected_patches_2024-05-26_19_37_47.json

nvm, I found the cause of the issue Thank you again for finding out which patch is causing the issue

Oh, I see. So it's not caused by those patches but because of excluding SponsorBlock.

@inotia00
Copy link
Owner

inotia00 commented May 27, 2024

fixed in revanced-patches-4.8.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants