-
-
Notifications
You must be signed in to change notification settings - Fork 345
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 - Theme): Custom seekbar color startup crashes #4387
Comments
Try patching 5.10 that was just released |
Tried Patches v5.10.0 and the issue persists. |
Use adb and collect the logs after it crashes:
If you are using Windows you may need to replace grep with findstr |
I have the same problem, so I did those steps and here's my log.txt: |
@RotesMonsti Are you using 19.47.53? |
Yes, with 5.10.0 patches |
@RotesMonsti Post your ReVanced settings text from Miscellaneous > import/export (remove your SponsorBlock id if present). |
"auto_captions": true, |
The seekbar custom color setting is turned off. Is that to avoid crashing? |
Exactly |
Using the same A/B flags and your settings, I could reproduce the crash exactly once and now it's not crashing anymore. Did you patch using the default set of patches? |
No, I have every patch except the following: |
I think I see the issue. The patched method does not decompile correctly (it's a mess), and there is an extra check that seems to load the Lottie animation view (which should not be used), using some variations of the the animation (60fps, different dark/light mode, etc). |
You mean the settings menu (not the video quality menu). On a new install (or after a crash), the old settings menu can be present until a the app has launched a few times. If upgrading from an old version of YouTube (where it did not have the new settings menu), the old menus can be present for a long time and the only way to force the new style is clearing the app data. |
Settings menu design does go back to old style after it crashes. I have noticed that too and it can be seen in my OP video. |
After a crash the settings menu goes back to the old style because the app is resetting some of it's feature flags. It happens for many types of crashes. I still cannot reproduce this issue. aside from once where it did occur but my logs were cleared before I could check if it was the same crash. I've spent 2 hours digging thru the bytecode trying to find a condition where 20.04+ has additional changes to the splash screen code and it decompiles almost entirely correct. May have to wait until the recommended target is bumped and see if this issue is still present. |
To anyone having this issue, you can try patching slightly older versions of YouTube and see if the issue is still present (start with version |
A more complicated fix, is figure out how to selectively change the colors in a LottieAnimation file so newer splash screen animation is also changed. Then the splash animation logic won't need any changes and both old and new animations will show the custom color. |
Just tested it and the issue is still there. |
Modifying the colors of a Lottie animation JSON is much easier than I expected. I have a patch nearly done, except it seems the method to load a Lottie JSON string is not present and was removed during obfuscation (likely because it's not used by the app). So, this will need a bit more work. |
Maybe you could use the Lottie library in an extension |
Yeah, and can display the animation from extensions code. Some of the Lottie classes are not obfuscated, which means pulling in a non obfuscated version will collide with the classes bundled with YouTube. Could fork Lottie and change the class package, but that's getting kind of complicated just to fix a splash screen animation. I will try modifying the data after LottieView has loaded the JSON, instead of modifying it before loading. |
Success. Was able to restore the missing method. Just needs a lot of cleanup. |
Just tested |
Bug description
After updating to Patched v5.9.0 from old version, enabling Custom Seekbar Colour will make the YT app crash multiple times before finally opening.
Here is a video showing this,
https://youtu.be/SmvP8k-m_2o
When the YT finally opens, some app settings resets to default values, like Feeds start to auto play.
Error logs
Solution
No response
Additional context
Phone: OnePlus 5
Android 10.0.1
Acknowledgements
The text was updated successfully, but these errors were encountered: