ReVanced / revanced-manager

💊 Application to use ReVanced on Android
https://revanced.app
GNU General Public License v3.0
18.17k stars 748 forks source link

bug: Manager sometimes immediately cancels installation and Export APK button stops working #2224

Open KobeW50 opened 1 month ago

KobeW50 commented 1 month ago

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

  1. Prepare the replication environment by uninstalling YouTube ReVanced and clearing the ReVanced Manager data
  2. Open the Manager settings and enable the Allow changing patch selection option
  3. Select the suggested YouTube APK from storage
  4. Patch and install YouTube with only the GmsCore support patch applied (the bug should not occur at this point)
  5. 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

KobeW50 commented 1 month ago

I also used logcat to record logs of the entire device. LMK if that is needed (and what to grep for)

oSumAtrIX commented 1 month ago

The logs only mention a NPE, which is caused by this issue. No more relevant logs apart from that.

oSumAtrIX commented 1 month ago

Disable Play Protect and see if you can reproduce.

KobeW50 commented 1 month ago

Disable Play Protect and see if you can reproduce.

The issue still occurs.

SmartSelect_20240923_142012_Google Play Store

revanced-manager_logcat_20240923142020502224.log.txt

KobeW50 commented 1 month ago

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.)

oSumAtrIX commented 1 month ago

Enable Play Protect again and reproduce it.

KobeW50 commented 1 month ago

Enable Play Protect again and reproduce it.

The issue continues to occur (tested with YouTube, with the Save patched app toggle enabled)

revanced-manager_logcat_20240924195347171913.log.txt

oSumAtrIX commented 1 month ago

So it is related to Play Protect somehow getting rid of the file. What if you disable save patched app.

KobeW50 commented 1 month ago

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

oSumAtrIX commented 1 month ago

@BenjaminHalko maybe you know about this, since it's related to saving the last patched app

BenjaminHalko commented 1 month ago

I can try to take a look at it tmr

Bighead9971 commented 3 weeks ago

Second definitely trying teach thinking can get used techno 5f card/

zacuke commented 12 hours ago

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.

ngudbhav commented 6 hours ago

It happened with me as well. Export button fails to work and the log says Installation cancelled. However, it worked the second time.

BabyOilJohnson commented 4 hours ago

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

ngudbhav commented 3 hours ago

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.