ReVanced / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
2.47k stars 286 forks source link

bug: Several Patches fails in Revanced Manager while patching #485

Closed anil-al closed 1 year ago

anil-al commented 1 year ago

Type

Error while patching

Bug description

Several patches are failing and app does not finish patching in Revanced Manager.

Steps to reproduce

-

Relevant log output

Initializing installer
Creating working directory
Copying original apk
Unpacking input apk
Reading dex files
Decoding AndroidManifest.xml only, because resources are not needed
Merging integrations
Deleting existing resource cache directory
Decoding resources
Executing patches
Applied Always autorepeat
Failed to apply Client spoof: 'Client spoof' depends on 'Spoof signature verification' but the following error was raised: 'Spoof signature verification' depends on 'Player type hook' but the following error was raised: Failed to resolve VideoStateFingerprint
Applied Comments
Failed to apply Copy video url: 'Copy video url' depends on 'Player controls bytecode patch' but the following error was raised: java.lang.NullPointerException
    at app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch.execute(PlayerControlsBytecodePatch.kt:26)
    at app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch.execute(PlayerControlsBytecodePatch.kt:18)
    at app.revanced.patcher.Patcher.executePatches$executePatch(Patcher.kt:333)
    at app.revanced.patcher.Patcher.executePatches$executePatch(Patcher.kt:309)
    at app.revanced.patcher.Patcher.access$executePatches$executePatch(Patcher.kt:38)
    at app.revanced.patcher.Patcher$executePatches$1.invokeSuspend(Patcher.kt:358)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:129)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda-32(MainActivity.kt:395)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$efRWk2Z7aIFbIqnpE9hv8LpAiuk(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda13.run(Unknown Source:24)
    at java.lang.Thread.run(Thread.java:1012)
Applied Disable Shorts on startup
Failed to apply Disable auto captions: NullPointerException
Failed to apply Disable fullscreen panels: NullPointerException
Applied Disable player popup panels
Applied Enable debugging
Failed to apply External downloads: 'External downloads' depends on 'Player controls bytecode patch' but the following error was raised: 'Player controls bytecode patch' did not succeed previously
Applied HDR auto brightness
Applied Hide Shorts components
Applied Hide ads
Failed to apply Hide autoplay button: Failed to resolve LayoutConstructorFingerprint
Applied Hide breaking news shelf
Failed to apply Hide captions button: NullPointerException
Applied Hide cast button
Applied Hide crowdfunding box
Applied Hide email address
Applied Hide filter bar
Applied Hide info cards
Applied Hide layout components
Applied Hide seekbar
Failed to apply Hide timestamp: Failed to resolve TimeCounterFingerprint
Applied Hide video action buttons
Applied Hide watermark
Failed to apply Minimized playback: 'Minimized playback' depends on 'Player type hook' but the following error was raised: 'Player type hook' did not succeed previously
Applied Navigation buttons
Applied Old video quality menu
Applied Open links externally
Failed to apply Playback speed: 'Playback speed' depends on 'Remember playback speed' but the following error was raised: 'Remember playback speed' depends on 'Video information' but the following error was raised: 'Video information' depends on 'Video id hook' but the following error was raised: Failed to resolve VideoIdFingerprint
Applied Player flyout menu
Applied Premium heading
Failed to apply Remember video quality: 'Remember video quality' depends on 'Video information' but the following error was raised: 'Video information' depends on 'Video id hook' but the following error was raised: 'Video id hook' did not succeed previously
Failed to apply Return YouTube Dislike: 'Return YouTube Dislike' depends on 'Video id hook' but the following error was raised: 'Video id hook' did not succeed previously
Applied Seekbar tapping
Failed to apply SponsorBlock: 'SponsorBlock' depends on 'Video id hook' but the following error was raised: 'Video id hook' did not succeed previously
Applied Spoof app version
Applied Spoof wifi connection
Failed to apply Swipe controls: 'Swipe controls' depends on 'Player type hook' but the following error was raised: 'Player type hook' did not succeed previously
Failed to apply Vanced MicroG support: 'Vanced MicroG support' depends on 'Client spoof' but the following error was raised: 'Client spoof' depends on 'Spoof signature verification' but the following error was raised: 'Spoof signature verification' depends on 'Player type hook' but the following error was raised: 'Player type hook' did not succeed previously
Applied Video ads
Applied Wide searchbar
Repacking patched apk
Compiling resources
An error occurred! Aborted
Error:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/data/app/~~DstBtCP6YWnm8R2I8ip6Kg==/app.revanced.manager.flutter-cHugDIU5ChD0iyfMsYibvg==/lib/arm64/libaapt2.so, link, -o, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IUKXVX/cache/aapt_temp_file, --min-sdk-version, 26, --target-sdk-version, 33, --version-code, 1538778560, --version-name, 18.27.36, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, -e, /data/user/0/app.revanced.manager.flutter/cache/APKTOOL5942589834633961506.tmp, -0, arsc, -I, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IUKXVX/cache/1.apk, --manifest, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IUKXVX/cache/AndroidManifest.xml, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IUKXVX/cache/build/resources.zip]
    at brut.androlib.res.AndrolibResources.aapt2Package(AndrolibResources.java:484)
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:619)
    at app.revanced.patcher.Patcher.save(Patcher.kt:128)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda-32(MainActivity.kt:276)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$efRWk2Z7aIFbIqnpE9hv8LpAiuk(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda13.run(Unknown Source:24)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/data/app/~~DstBtCP6YWnm8R2I8ip6Kg==/app.revanced.manager.flutter-cHugDIU5ChD0iyfMsYibvg==/lib/arm64/libaapt2.so, link, -o, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IUKXVX/cache/aapt_temp_file, --min-sdk-version, 26, --target-sdk-version, 33, --version-code, 1538778560, --version-name, 18.27.36, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, -e, /data/user/0/app.revanced.manager.flutter/cache/APKTOOL5942589834633961506.tmp, -0, arsc, -I, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IUKXVX/cache/1.apk, --manifest, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IUKXVX/cache/AndroidManifest.xml, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IUKXVX/cache/build/resources.zip]
    at brut.util.OS.exec(OS.java:99)
    at brut.androlib.res.AndrolibResources.aapt2Package(AndrolibResources.java:480)
    ... 6 more

Screenshots or videos

No response

Solution

No response

Additional context

No response

Acknowledgements

LisoUseInAIKyrios commented 1 year ago

You must be patching the wrong version of YouTube.

18.23.35 is what you want.

anil-al commented 1 year ago

You must be patching the wrong version of YouTube.

18.23.35 is what you want.

Is it just because of the fact that the version is different? Can I not patch further versions as a part of experimental settings? I was using inotia00's patches on unsupported versions and I'd never experienced a problem with that. Does Revanced Manager not allow this?

oSumAtrIX commented 1 year ago

As the name suggests, unsupported versions are unsupported. For patches from other sources move to their origin.

anil-al commented 1 year ago

As the name suggests, unsupported versions are unsupported. For patches from other sources move to their origin.

Since inotia00 had to stop the development, I had to move in the original patches; and due to the long time intervals between published versions herein, I tried to patch not-yet-supported version of the app. For inotia00's patches, I was not having errors in Termux. I don't want to change the origin, I simply ask if the errors occurs just because the version isn't supported, is that a conscious choice to give errors, and if that's the case, are we not able to choose to opt in for non-tested versions in Revanced Manager?

Ushie commented 1 year ago

The error happens because the app version isn't supported, the patches fail to patch the app because the app is different, you can choose to opt in but that doesn't guarantee that the patches will know where to patch

anil-al commented 1 year ago

The error happens because the app version isn't supported, the patches fail to patch the app because the app is different, you can choose to opt in but that doesn't guarantee that the patches will know where to patch

Yes, the app version is different but normally that wasn't causing inotia00's patches to fail while patching and most of the time nothing would go wrong. Are those here hard coded to support only certain versions and not future versions? If that's the case I would like to suggest to lift these limitations for those who want to try them, create an option in Revanced Manager and give shorter intervals for updates even just for supporting the new versions without any other change; because while the patches currently support 18.23.35, YouTube right now has 18.31... which is a big difference.

oSumAtrIX commented 1 year ago

How should a patch know how the app dev will modify their app in the future? What if the app dev removes the code the patch tries to modify? What you are asking is not possible.

Ushie commented 1 year ago

that wasn't causing inotia00's patches to fail while patching

Inotia patches is was updated to a version that wasn't too different from the version you tried to patch, it's not in anybody's power to control how similar releases are, that's why the supported versions field exists... if you choose to use something that isnt supported then expect the worst

anil-al commented 1 year ago

How should a patch know how the app dev will modify their app in the future? What if the app dev removes the code the patch tries to modify? What you are asking is not possible.

Not possible? This option was given to us beforehand when the ReVanced project first started. I am not saying that this should be the default behaviour, all I am asking is patches to be modified so as them not to fail because of hard-coding so those who want can try them anyway. This is very possible but if you don't want to do that, I gave another suggestion which is shorter intervals between patch versions to update them when they are checked to be compatible; yet, you are disregarding all I am saying and focusing on just how patches could be broken. The reason I moved on to ReVanced Extended was because all the new unnecessary restrictions upon patches and patching; not listening questions or queries coming from us and just immediately denying or just ignoring them; the never-working ReVanced Manager and long-long intervals when it was so easy to check patches compatibility and publish them afterwards. On that project, there was just one person handling all of this, and who was kindly answering and solving problems of their users unlike here, so please don't say as an excuse that any one of these options cannot work out. I tried to help out by creating bug reports, suggestions as anyone else for two years here and I can clearly see day by day that the management of this project just going backwards with imposing new restrictions everyday and disregarding people's wishes and opinions when it was the reason for this project to be born.

Ushie commented 1 year ago

Open a PR, otherwise use the supported versions, as you clearly don't plan on reading our messages

It's been explained multiple times

Ushie commented 1 year ago

Are those here hard coded to support only certain versions and not future versions

No, the patches are built in a way to support any version as long as the app remains in a similar state internally

If that's the case I would like to suggest to lift these limitations for those who want to try them

Experimental patches toggle exists for that reason

shorter intervals for updates even just for supporting the new versions without any other change

Done already, if the app fails to patch then it REQUIRES a change in the patch

because while the patches currently support 18.23.35, YouTube right now has 18.31... which is a big difference

No, there's little to no difference, you don't need to be at the bleeding edge all the time, the time is better spent making the patches better than always trying to be up to date with the latest version despite the fact that there's no functional difference

all I am asking is patches to be modified so as them not to fail because of hard-coding so those who want can try them anyway

There is no hardcoding, if the patch fails then that means the app changed internally

you are disregarding all I am saying and focusing on just how patches could be broken

There was no disregarding happening, you were being simply informed in why it breaks, it's not intentionally broken, the patches do their best to support latest but if it fails that means the patch has to be specifically updated for the new version

The reason I moved on to ReVanced Extended was because all the new unnecessary restrictions upon patches and patching

The restrictions aren't unnecessary, and most of which can be toggled off in settings

when it was so easy to check patches compatibility and publish them afterwards

If it's easy, you're always free to open a PR, spend your sweet time bumping the versions for no reason in particular

anil-al commented 1 year ago

Are those here hard coded to support only certain versions and not future versions

No, the patches are built in a way to support any version as long as the app remains in a similar state internally

If that's the case I would like to suggest to lift these limitations for those who want to try them

Experimental patches toggle exists for that reason

shorter intervals for updates even just for supporting the new versions without any other change

Done already, if the app fails to patch then it REQUIRES a change in the patch

because while the patches currently support 18.23.35, YouTube right now has 18.31... which is a big difference

No, there's little to no difference, you don't need to be at the bleeding edge all the time, the time is better spent making the patches better than always trying to be up to date with the latest version despite the fact that there's no functional difference

all I am asking is patches to be modified so as them not to fail because of hard-coding so those who want can try them anyway

There is no hardcoding, if the patch fails then that means the app changed internally

you are disregarding all I am saying and focusing on just how patches could be broken

There was no disregarding happening, you were being simply informed in why it breaks, it's not intentionally broken, the patches do their best to support latest but if it fails that means the patch has to be specifically updated for the new version

The reason I moved on to ReVanced Extended was because all the new unnecessary restrictions upon patches and patching

The restrictions aren't unnecessary, and most of which can be toggled off in settings

when it was so easy to check patches compatibility and publish them afterwards

If it's easy, you're always free to open a PR, spend your sweet time bumping the versions for no reason in particular

Be sure that if I would know how I would bump their versions I would not spend my time here convincing people. As a non-developer user, I am already doing my best and spend my sweet time for no other than reporting bugs that no one care about here. That no reason you are talking about is every minor change aggregating to be something big, especially for tablet users who have been receiving new updates about design and bug fixes all the time recently, and those updates are very important for any enthusiast user of apps who are aware of this very fact, which is all of the users here.