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: AGP 8.3.0 dependency causes java verifier error on app launch #2818

Closed
3 tasks done
cyberboh opened this issue Mar 3, 2024 · 10 comments
Closed
3 tasks done

bug: AGP 8.3.0 dependency causes java verifier error on app launch #2818

cyberboh opened this issue Mar 3, 2024 · 10 comments
Labels
Bug report Something isn't working

Comments

@cyberboh
Copy link

cyberboh commented Mar 3, 2024

Bug description

As tittle say, and this info ReVanced/revanced-integrations#579 (comment) here the bug trakcer issue
I got crashes every YT started after patched with supplied v1.4.1-dev.1 integrations

Patch with CLI:

java -jar revanced-cli-4.4.0-all.jar patch -p -o Install\YouTube_19.04.37-all_ReVanced.apk --options options.json -b revanced-patches-4.3.0.jar --alias=******--keystore-password=******* --keystore-entry-password=******** --keystore=*******.keystore -m revanced-integrations-1.4.1-dev.1.apk Apps\com.google.android.youtube-19.04.37-all.apk -i "Change header"

Error logs

--------- beginning of crash
03-03 20:50:04.657 32132 32324 E AndroidRuntime: FATAL EXCEPTION: ComponentLayoutThread1-1
03-03 20:50:04.657 32132 32324 E AndroidRuntime: Process: app.revanced.android.youtube, PID: 32132
03-03 20:50:04.657 32132 32324 E AndroidRuntime: java.lang.RuntimeException: java.lang.NoClassDefFoundError: app.revanced.integrations.youtube.patches.components.LithoFilterPatch
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exh.a(PG:64)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at com.facebook.litho.ComponentTree.m(PG:15)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exf.a(PG:1)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at fbf.run(PG:1)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at akth.run(PG:2)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at ajbr.run(PG:4)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at drx.run(PG:9)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:929)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: Caused by: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: app.revanced.integrations.youtube.patches.components.LithoFilterPatch
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at java.util.concurrent.FutureTask.report(FutureTask.java:123)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at java.util.concurrent.FutureTask.get(FutureTask.java:193)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at a.P(PG:1)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exh.a(PG:13)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	... 9 more
03-03 20:50:04.657 32132 32324 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: app.revanced.integrations.youtube.patches.components.LithoFilterPatch
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at app.revanced.integrations.youtube.patches.components.LithoFilterPatch.setProtoBuffer(Unknown Source:0)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at algj.f(Unknown Source:0)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at algj.I(PG:2)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at rrz.a(PG:5)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at qlr.b(PG:7)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at qri.b(PG:1)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at aheq.a(PG:15)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at rsh.aC(PG:8)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at fay.aA(PG:2)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exr.E(PG:11)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exr.ai(PG:4)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exg.call(PG:33)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exh.a(PG:2)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	... 9 more
03-03 20:50:04.657 32132 32324 E AndroidRuntime: Caused by: java.lang.VerifyError: Verifier rejected class app.revanced.integrations.youtube.patches.components.LithoFilterPatch: void app.revanced.integrations.youtube.patches.components.LithoFilterPatch.<clinit>() failed to verify: void app.revanced.integrations.youtube.patches.components.LithoFilterPatch.<clinit>(): [0x2] tried to get class from non-reference register v0 (type=Imprecise Constant: 127) (declaration of 'app.revanced.integrations.youtube.patches.components.LithoFilterPatch' appears in /data/app/app.revanced.android.youtube--wNUzFzs-nO_eQIYMVlybQ==/base.apk!classes8.dex)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at app.revanced.integrations.youtube.patches.components.LithoFilterPatch.setProtoBuffer(Unknown Source:0)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at algj.f(Unknown Source:0)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at algj.I(PG:2)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at rrz.a(PG:5)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at qlr.b(PG:7)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at qri.b(PG:1)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at aheg.a(PG:8)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at rsh.aC(PG:8)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at fay.aA(PG:2)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exr.E(PG:11)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exr.D(PG:3)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exr.C(PG:1)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at ezo.z(PG:1)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at fat.c(PG:6)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	at exr.E(PG:8)
03-03 20:50:04.657 32132 32324 E AndroidRuntime: 	... 13 more
03-03 20:50:04.658 32132 32327 I android.youtub: Rejecting re-init on previously-failed class java.lang.Class<app.revanced.integrations.youtube.patches.components.LithoFilterPatch>: java.lang.VerifyError: Verifier rejected class app.revanced.integrations.youtube.patches.components.LithoFilterPatch: void app.revanced.integrations.youtube.patches.components.LithoFilterPatch.<clinit>() failed to verify: void app.revanced.integrations.youtube.patches.components.LithoFilterPatch.<clinit>(): [0x2] tried to get class from non-reference register v0 (type=Imprecise Constant: 127) (declaration of 'app.revanced.integrations.youtube.patches.components.LithoFilterPatch' appears in /data/app/app.revanced.android.youtube--wNUzFzs-nO_eQIYMVlybQ==/base.apk!classes8.dex)
03-03 20:50:04.658 32132 32327 I android.youtub: (Throwable with no stack trace)

Solution

Maybe it needs paches changes too? not only integrations changes

Additional context

CLI v4.4.0
Inte v1.4.1-dev.1
Patches v4.3.0
YT https://www.apkmirror.com/apk/google-inc/youtube/youtube-19-04-37-release/youtube-19-04-37-android-apk-download/
Android 8, 9 and 13

Acknowledgements

  • This issue is not a duplicate of an existing bug report.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
@cyberboh cyberboh added the Bug report Something isn't working label Mar 3, 2024
@oSumAtrIX
Copy link
Member

The release doesn't change anything that can lead to your issue. Something else goes wrong. Please repatch with the latest releases, not dev

@oSumAtrIX oSumAtrIX added the Waiting on author Further information is requested label Mar 3, 2024
@oSumAtrIX oSumAtrIX pinned this issue Mar 3, 2024
@oSumAtrIX oSumAtrIX unpinned this issue Mar 3, 2024
@oSumAtrIX oSumAtrIX transferred this issue from ReVanced/revanced-integrations Mar 3, 2024
@cyberboh
Copy link
Author

cyberboh commented Mar 4, 2024

The release doesn't change anything that can lead to your issue. Something else goes wrong. Please repatch with the latest releases, not dev

Repatch with latest release works. The dev Integrations idk why it make YT crashes every time I opening it.

@MarcaDian
Copy link
Contributor

I has same issue on dev1, but i dont apply Announcement patch, and that i think the issue with Settings.java changes

@oSumAtrIX
Copy link
Member

The class is present in the latest dev:

image

So I am not sure whats going on on your end

@LisoUseInAIKyrios
Copy link
Contributor

I am able to reproduce the issue.

But the crash is fixed if this is reverted:
ReVanced/revanced-integrations@67673d0

The error makes no sense though.

@oSumAtrIX
Copy link
Member

Debugging may yield more information. ReVanced Patcher loads the integrations DEX classes and merges them into the app. Because no patch failed, it worked. But maybe this specific class was not merged properly.

@MarcaDian
Copy link
Contributor

But the crash is fixed if this is reverted:

Yes, returning to 8.2.2 solved the crash problem

@LisoUseInAIKyrios
Copy link
Contributor

It's failing with a java verifier error. So something is up with the compiled code of integrations.

Not sure why the agp version bump would cause this.
Maybe that changes the default compiler settings agp uses, or it uses a different java target. But I'm only speculating as this doesn't make much sense.

and now Android Studio sometimes complains that agp 8.3 is not supported:

The project is using an incompatible version (AGP 8.3.0) of the Android Gradle plugin. Latest supported version is AGP 8.2.2
See Android Studio & AGP compatibility options.

For now could revert the dependency version bump to fix it.

@oSumAtrIX
Copy link
Member

Maybe also add a comment to the line linking to this issue for future reference so we don't accidentally update it again.
When the dependency was updated the compiler indeed underwent changes, I had to fixup integrations as constructors were compiled with different access flags and a fingerprint was referencing one.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title bug: Integrations 1.4.1-dev.1 make YT crashes every starting bug: AGP 8.3.0 dependency causes java verifier error on app launch Mar 4, 2024
@LisoUseInAIKyrios
Copy link
Contributor

ReVanced/revanced-integrations@ab07a56

@LisoUseInAIKyrios LisoUseInAIKyrios removed the Waiting on author Further information is requested label Mar 4, 2024
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

4 participants