bug: Manager sometimes immediately cancels installation and Export APK button stops working
Bug description
Sometimes when trying to install a patched app, the Manager will immediately cancel the installation. The Export APK button will also not work. The issue only occurs when the Save patched app toggle in the Manager settings is enabled.
It is difficult to reproduce this bug. Below is the simplest and most consistent method I found.
Steps to reproduce
- Prepare the replication environment by uninstalling YouTube ReVanced and clearing the ReVanced Manager data
- Open the Manager settings and enable the
Allow changing patch selectionoption - Select the suggested YouTube APK from storage
- Patch and install YouTube with only the
GmsCore supportpatch applied (the bug should not occur at this point) - Without closing the Manager, return to the Patcher screen and repeat step 3 and 4
The bug should occur when repeating step 4 for the second time. (You may need to try again)
Demonstration:
https://github.com/user-attachments/assets/5a5ca50d-dd6f-42f1-9236-34bacc239999
Version of ReVanced Manager and version & name of app you are patching
1.22.0 YouTube
Installation method
Regular
ReVanced Manager logs
revanced-manager_logcat_20240923114749497367.log.txt
Patch logs
- Device Info
ReVanced Manager: 1.22.0
Model: SM-S906U1
Android version: 14
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: No
- Patch Info
App: com.google.android.youtube v19.16.39 (Suggested: 19.16.39)
Patches version: v4.15.0
Patches added: Default
Patches removed: Hide ads, Video ads, Copy video URL, Remove viewer discretion dialog, Downloads, Disable precise seeking gesture, Seekbar tapping, Swipe controls, Disable auto captions, Hide video action buttons, Hide autoplay button, Hide captions button, Hide cast button, Navigation buttons, Hide player buttons, Hide album cards, Comments, Hide crowdfunding box, Hide endscreen cards, Hide filter bar, Hide floating microphone button, Disable fullscreen ambient mode, Hide layout components, Hide info cards, Player flyout menu, Disable rolling number animations, Hide seekbar, Hide Shorts components, Disable suggested video end screen, Hide timestamp, Miniplayer, Disable player popup panels, Custom player overlay opacity, Return YouTube Dislike, Wide searchbar, Restore old seekbar thumbnails, SponsorBlock, Spoof app version, Change start page, Disable resuming Shorts on startup, Enable tablet layout, Theme, Alternative thumbnails, Bypass image region restrictions, Announcements, Always repeat, Remove background playback restrictions, Enable debugging, Spoof device dimensions, Check watch history domain name resolution, Spoof video streams, Bypass URL redirects, Remove tracking query parameter, Disable zoom haptics, Remember video quality, Playback speed, Restore old video quality menu, Open links externally
Default patch options changed: None
- Settings
Allow changing patch selection: true
Version compatibility check: true
Show universal patches: false
Patches source: revanced/revanced-patches
Integration source: revanced/revanced-integrations
- Logs
Reading APK
Decoding app manifest
Loading patches
Merging integrations
Deleting existing temporary files directory
Decoding resources
Executing patches
Applied 2 patches
Compiling patched dex files
Compiled 8 dex files
Compiling modified resources
Aligning APK
Signing APK
Patched APK
Installing patched app
Installation canceled
Acknowledgements
- [X] I have checked all open and closed bug reports and this is not a duplicate.
- [X] I have chosen an appropriate title.
- [X] All requested information has been provided properly.
- [X] The bug is only related to ReVanced Manager.
I also used logcat to record logs of the entire device. LMK if that is needed (and what to grep for)
The logs only mention a NPE, which is caused by this issue. No more relevant logs apart from that.
Disable Play Protect and see if you can reproduce.
Disable Play Protect and see if you can reproduce.
The issue still occurs.
After some more testing, I was unable to reproduce the issue when the Save patched app toggle in the Manager settings is disabled.
(Also, I was able to reproduce the issue with the Reddit app, even without changing it's package name.)
Enable Play Protect again and reproduce it.
Enable Play Protect again and reproduce it.
The issue continues to occur (tested with YouTube, with the Save patched app toggle enabled)
So it is related to Play Protect somehow getting rid of the file. What if you disable save patched app.
What if you disable save patched app.
The issue doesn't occur (tested with play protect enabled). revanced-manager_logcat_20240924203015351253.log.txt
https://github.com/user-attachments/assets/419c4355-85cb-4b1b-a567-12b5bcaf2b5b
@BenjaminHalko maybe you know about this, since it's related to saving the last patched app
I can try to take a look at it tmr
Second definitely trying teach thinking can get used techno 5f card/
I experienced this issue today. It would immediately cancel after clicking Install, and the save button did nothing.
When I repeated the patching process, it worked the second time.
The only noticable difference was on the second attempt I didn't get the modal that gives the summary of which patches were removed and new.
It happened with me as well. Export button fails to work and the log says Installation cancelled. However, it worked the second time.
But I didn't had any issue while the process for the first time, it worked fine for me. BTW I'm using the latest versions. Patch version: 5.0.1 Version: 1.23.1 Model: SM-A305F Android Version: 11 Supported Archs: arm64-v8a, armeabi-v7a, armeabi
Yup. Me too. Using the latest version on Galaxy S23, Android 14, October Security patch, Play Protect enabled. Both the patches and the manager are on the latest version. This looks flaky.
One more observation, I saw that some logs got missed when the issue occurred. It looks like the same observation is valid in the video posted by OP.