Skip to content
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: Patch always error Exception in thread "main" java.lang.IncompatibleClassChangeError: #307

Closed
3 tasks done
cyberboh opened this issue Sep 24, 2023 · 7 comments
Closed
3 tasks done
Labels
Bug report Something isn't working

Comments

@cyberboh
Copy link

Type

Error while patching

Bug description

Patch Tumblr (or any supported apps) with dev-branch of patches and integrations using CLI

Steps to reproduce

  1. Download app (e.g tumblr) : https://www.apkmirror.com/apk/tumblr-inc/tumblr/tumblr-31-3-0-110-release/tumblr-fandom-art-chaos-31-3-0-110-android-apk-download/
  2. Patch with CLI:
    java -jar revanced-cli-3.1.1-all.jar patch Tumblr_31.3.0.110.apk -r %temp%\revanced-cache -p -o Install\Tumblr_ReVanced_31.3.0.110.apk -b revanced-patches-2.191.0-dev.6.jar --keystore=ks.keystore -m revanced-integrations-0.118.0-dev.4.apk
  3. The error appear

Relevant log output

java -jar revanced-cli-3.1.1-all.jar patch Tumblr_31.3.0.110.apk -r %temp%\revanced-cache -p -o Install\Tumblr_ReVanced_31.3.0.110.apk -b revanced-patches-2.191.0-dev.6.jar --keystore=ks.keystore -m revanced-integrations-0.118.0-dev.4.apk
INFO: Loading patches
Exception in thread "main" java.lang.IncompatibleClassChangeError: class app.revanced.patches.spotify.layout.theme.CustomThemePatchGenerated has interface app.revanced.patcher.patch.ResourcePatch as super class
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1013)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
        at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:714)
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at app.revanced.patcher.PatchBundleLoader$Jar$2$1$3.invoke(PatchBundleLoader.kt:50)
        at app.revanced.patcher.PatchBundleLoader$Jar$2$1$3.invoke(PatchBundleLoader.kt:50)
        at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
        at kotlin.collections.CollectionsKt__MutableCollectionsKt.addAll(MutableCollections.kt:129)
        at app.revanced.patcher.PatchBundleLoader$Jar.<init>(PatchBundleLoader.kt:84)
        at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:157)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
        at picocli.CommandLine.execute(CommandLine.java:2170)
        at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:40)

Screenshots or videos

No response

Solution

The issue could be caused by version is null in patches.json
See https://github.com/ReVanced/revanced-patches/releases/download/v2.191.0-dev.6/patches.json

Additional context

patches v2.191.0-dev.6
integrations v0.118.0-dev.4
cli v3.1.1

Acknowledgements

  • I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • I have written a short but informative title.
  • I filled out all of the requested information in this issue properly.
@cyberboh cyberboh added the Bug report Something isn't working label Sep 24, 2023
@oSumAtrIX
Copy link
Member

oSumAtrIX commented Sep 24, 2023

You are using dev releases, not stable.

@oSumAtrIX oSumAtrIX closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2023
@cyberboh
Copy link
Author

You are using dev releases, not stable.

i want to test new patches which meant new features with new version of patches.

@oSumAtrIX
Copy link
Member

If you want to test dev patches, you will need dev cli

@cyberboh
Copy link
Author

ooh thats makes sense, i'll try :)

@cyberboh
Copy link
Author

If you want to test dev patches, you will need dev cli

error at aligning:

java -jar revanced-cli-4.0.0-dev.1-all.jar patch Tumblr_31.3.0.110.apk -r %temp%\revanced-cache -p -o Install\Tumblr_ReVanced_31.3.0.110.apk -b revanced-patches-2.191.0-dev.6.jar --keystore=ks.keystore -m revanced-integrations-0.118.0-dev.4.apk
INFO: Loading patches
INFO: Setting patch options
INFO: Decoding app manifest
INFO: Remove screen capture restriction excluded
INFO: Remove screenshot restriction excluded
INFO: Export all activities excluded
INFO: Spoof Wi-Fi connection excluded
INFO: Predictive back gesture excluded
INFO: Override certificate pinning excluded
INFO: Enable Android debugging excluded
INFO: Change package name excluded
INFO: Merging integrations
INFO: Executing patches
INFO: Disable Tumblr Live succeeded
INFO: Disable blog notification reminder succeeded
INFO: Disable dashboard ads succeeded
INFO: Disable gift message popup succeeded
INFO: Compiling modified dex files
INFO: Aligning Tumblr_31.3.0.110.apk
java.io.FileNotFoundException: %Temp%\revanced-cache\Tumblr_31.3.0.110.apk (The system cannot find the file specified)
        at java.base/java.io.RandomAccessFile.open0(Native Method)
        at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:346)
        at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:260)
        at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:214)
        at app.revanced.library.zip.ZipFile.<init>(ZipFile.kt:16)
        at app.revanced.library.ApkUtils.copyAligned(ApkUtils.kt:30)
        at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:240)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
        at picocli.CommandLine.execute(CommandLine.java:2170)
        at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:13)

@oSumAtrIX
Copy link
Member

@cyberboh
Copy link
Author

ReVanced/revanced-library#4

i thought it resolved in dev cli 4.0.0-dev.1, bcs he mentioned the version of cli revanced-cli-4.0.0-dev.4-all.jar
i'll wait then

@oSumAtrIX oSumAtrIX transferred this issue from ReVanced/revanced-patches-template Dec 14, 2023
@revanced-bot revanced-bot transferred this issue from another repository Dec 14, 2023
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

2 participants