Skip to content

bug: Patched app crashes after first launch or clearing data #2604

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

Closed
8 tasks done
WsNyc00 opened this issue Dec 22, 2024 · 14 comments
Closed
8 tasks done

bug: Patched app crashes after first launch or clearing data #2604

WsNyc00 opened this issue Dec 22, 2024 · 14 comments
Labels
Bug report Something isn't working

Comments

@WsNyc00
Copy link

WsNyc00 commented Dec 22, 2024

Type

Other

Tools used

RVX Manager

Application

RVX 19.44.39
Patches: v5.1.3 / v5.1.2 / v5.1.1

Bug description

After installing and launching app for the first time or clearing data, patched app crashes.

Attaching more logs here.
First three logs from the same device (Android 8.1.0):
logcat1-a8.1.0.txt
logcat2-a8.1.0.txt
logcat-a8.1.0.txt

This one from Android 14:
logcat-a14.txt

Command used to capture logs:
adb logcat -b crash

Error logs

12-22 16:39:39.245 20288 20288 E AndroidRuntime: FATAL EXCEPTION: main
12-22 16:39:39.245 20288 20288 E AndroidRuntime: Process: app.rvx.android.youtube, PID: 20288
12-22 16:39:39.245 20288 20288 E AndroidRuntime: java.lang.NoClassDefFoundError: app.revanced.extension.youtube.patches.general.MiniplayerPatch
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at app.revanced.extension.youtube.patches.general.MiniplayerPatch.getLegacyTabletMiniplayerOverride(Unknown Source:0)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at ytw.p(PG:13)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at afpw.v(PG:42)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.h(PG:3116)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.a(PG:76)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.i(PG:615)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.a(PG:71)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhv.a(PG:14)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.h(PG:1006)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.a(PG:76)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fzb.b(PG:2505)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fzb.a(PG:2565)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhm.a(PG:5)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fzc.n(PG:3)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gvz.j(PG:1)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.b(PG:107)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:100)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.l(PG:42)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:85)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at ncl.<init>(PG:94)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.l(PG:26)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:85)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at hdp.<init>(PG:95)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.b(PG:82)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:100)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at hdf.e(PG:14)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.b(PG:83)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:100)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhm.a(PG:5)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.b(PG:94)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:100)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at hdf.f(PG:14)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.b(PG:96)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:100)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhm.a(PG:5)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.m(PG:104)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:80)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at ajkl.d(PG:11)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.r(PG:3776)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:55)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.f(PG:1439)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:40)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.f(PG:1596)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyj.a(PG:40)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhm.a(PG:5)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fym.l(PG:24)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyl.b(PG:15)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at fyl.a(PG:2995)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at ymp.a(PG:15)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at ymo.a(PG:3)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at yms.a(PG:3)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at ymp.a(PG:43)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gne.onCreate(PG:61)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at nrm.onCreate(PG:1)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at nta.onCreate(PG:131)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at app.revanced.extension.youtube.swipecontrols.SwipeControlsHostActivity.onCreate(SwipeControlsHostActivity.kt:72)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at com.google.android.apps.youtube.app.watchwhile.MainActivity.onCreate(PG:25)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7258)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7249)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1222)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3059)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7000)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: Caused by: java.lang.ExceptionInInitializerError
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at app.revanced.extension.youtube.patches.general.MiniplayerPatch.getLegacyTabletMiniplayerOverride(Unknown Source:0)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at ytw.p(PG:13)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at afpw.v(PG:42)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.h(PG:3116)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.a(PG:76)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.i(PG:615)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.a(PG:71)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhv.a(PG:14)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.h(PG:1006)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gaa.a(PG:76)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.e(PG:12)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at bbhn.a(PG:7)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at gbo.run(PG:415)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at ynx.run(PG:20)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at alui.run(PG:21)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:764)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at qta.run(PG:64)
12-22 16:39:39.245 20288 20288 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
12-22 16:39:39.245 20288 20288 E AndroidRuntime: 	at android.content.ContextWrapper.getResources(ContextWrapper.java:93)
12-22 16:39:39.246 20288 20288 E AndroidRuntime: 	at android.view.ContextThemeWrapper.getResourcesInternal(ContextThemeWrapper.java:127)
12-22 16:39:39.246 20288 20288 E AndroidRuntime: 	at android.view.ContextThemeWrapper.getResources(ContextThemeWrapper.java:121)
12-22 16:39:39.246 20288 20288 E AndroidRuntime: 	at fw.getResources(PG:5)
12-22 16:39:39.246 20288 20288 E AndroidRuntime: 	at app.revanced.extension.shared.utils.Utils.getLocalizedContextAndSetResources(Utils.java:297)
12-22 16:39:39.246 20288 20288 E AndroidRuntime: 	at app.revanced.extension.shared.utils.Utils.getResources(Utils.java:268)
12-22 16:39:39.246 20288 20288 E AndroidRuntime: 	at app.revanced.extension.shared.utils.ResourceUtils.getIdentifier(ResourceUtils.java:24)
12-22 16:39:39.246 20288 20288 E AndroidRuntime: 	at app.revanced.extension.shared.utils.ResourceUtils.getIdentifier(ResourceUtils.java:19)
12-22 16:39:39.246 20288 20288 E AndroidRuntime: 	at app.revanced.extension.shared.utils.ResourceUtils.getIdIdentifier(ResourceUtils.java:56)
12-22 16:39:39.246 20288 20288 E AndroidRuntime: 	at app.revanced.extension.youtube.patches.general.MiniplayerPatch.<clinit>(MiniplayerPatch.java:135)
12-22 16:39:39.246 20288 20288 E AndroidRuntime: 	... 24 more

Solution

App only crashes on first launch, second and other launches are fine.

Additional context

Patched app crashes at first time launch after install or after data is cleared (not every time)
This is duplicate issue report (old one is closed) #2582

Device Environment

Android 8.1.0 (Tablet)
Android 14 / OneUI 6.1

Acknowledgements

  • This issue does not reproduce on unpatched YouTube or YT Music.
  • This issue is not a duplicate of an existing bug report.
  • I did not use any settings marked as Experimental Flags.
  • I did not use pre-release (dev branch).
  • I have patched the APK according to the documentation.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • I have written the title and contents in English.
@WsNyc00 WsNyc00 added the Bug report Something isn't working label Dec 22, 2024
@WsNyc00
Copy link
Author

WsNyc00 commented Dec 24, 2024

Just a heads up, patched app on 19.16.39 version with latest (5.1.3) patches, doesnt crash.

@inotia00
Copy link
Owner

Exclude Navigation bar components patch and patch again

Please report back if the issue is reproduced

@inotia00 inotia00 added the Waiting on author OP's answer is needed label Dec 25, 2024
@afk789
Copy link

afk789 commented Dec 25, 2024

Patched app now launches when excluding Navigation bar components patch.

@inotia00 inotia00 removed the Waiting on author OP's answer is needed label Dec 25, 2024
@WsNyc00
Copy link
Author

WsNyc00 commented Dec 25, 2024

Exclude Navigation bar components patch and patch again

Please report back if the issue is reproduced

I can still sometimes replicate the crash, but right now, less frequent.

@anddea
Copy link

anddea commented Dec 25, 2024

I can still sometimes replicate the crash, but right now, less frequent.

Probably should be Hide feed components too. Can you exclude both of them and report back?

Seems like a bad commit coming from v5.0.1. I might be wrong though.

@WsNyc00
Copy link
Author

WsNyc00 commented Dec 26, 2024

I can still sometimes replicate the crash, but right now, less frequent.

Probably should be Hide feed components too. Can you exclude both of them and report back?

Seems like a bad commit coming from v5.0.1. I might be wrong though.

Still having some crashes, here's the log

new log.txt

This with multiple crashes ^^

v5.0.3 no crashes
v5.1.3 with app version 19.16.39 again, no crashes.

@anddea
Copy link

anddea commented Dec 27, 2024

Yes, it's one of the issues you mentioned before, and it still occurs after excluding patches.

Hide feed components isn't the cause, but it could be for some people. Overall, it looks like the shared utils are the reason. But I didn't look deeper myself yet. Maybe next year, but I can't reproduce this issue either.

Seems like a race condition here during initialization, and the logs aren't verbose enough.

@anddea
Copy link

anddea commented Dec 27, 2024

If you exclude the Miniplayer and Navigation bar patches, the app should no longer crash for you. These are the two issues from your logs. When you have the time to test it, please let us know if any crashes still occur. If this is the case for everyone, the problems can be addressed and fixed within each related patch separately. However, I have a feeling that other users might experience similar issues with other patches.

Maybe would be more helpful to have logs from other people facing the same issue as well.

@WsNyc00
Copy link
Author

WsNyc00 commented Dec 31, 2024

Excluding all three patches stops crashing on first run and / or after clearing data.
Sorry for the response.

@inotia00
Copy link
Owner

It should have been fixed in revanced-patches-5.2.1-dev.1

@WsNyc00
Copy link
Author

WsNyc00 commented Jan 1, 2025

It should have been fixed in revanced-patches-5.2.1-dev.1

Sorry to be that guy again but patched app on 5.2.1-dev1 still crashes, sometimes two times in a row (like before)
And also same then opening youtube links from browsers #2607

Here some logs
log.txt
log2.txt

@inotia00
Copy link
Owner

inotia00 commented Jan 1, 2025

On my side, this issue was only reproducible on Android 15 devices, and I fixed it locally

It will probably be reflected in the next release

@inotia00
Copy link
Owner

inotia00 commented Jan 4, 2025

Fixed in revanced-patches-5.2.1-dev.3

(Tested on Android 15 AVD)

@inotia00
Copy link
Owner

inotia00 commented Jan 7, 2025

Fixed in revanced-patches-5.2.1

@inotia00 inotia00 closed this as completed Jan 7, 2025
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