ReVanced / revanced-patches

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

bug(spotify): hide-premium-navbar fails to patch #633

Closed 0x263b closed 11 months ago

0x263b commented 1 year ago

Type

Error while patching

Bug description

Error while patching

Steps to reproduce

java -jar "revanced-cli-2.21.5-all.jar" -a "Spotify Music and Podcasts_8.8.50.466.apk" -o "Spotify-patched.apk" -b "revanced-patches-2.181.0.jar" -m "revanced-integrations-0.111.2.apk"
java --version
openjdk 17.0.5 2022-10-18 LTS
OpenJDK Runtime Environment Zulu17.38+21-CA (build 17.0.5+8-LTS)
OpenJDK 64-Bit Server VM Zulu17.38+21-CA (build 17.0.5+8-LTS, mixed mode, sharing)

Relevant log output

INFO: Reading dex files
INFO: Decoding AndroidManifest.xml only, because resources are not needed
INFO: Skipping change-package-name: Excluded by default
INFO: Skipping enable-android-debugging: Excluded by default
INFO: Skipping export-all-activities: Excluded by default
INFO: Skipping predictive-back-gesture: Excluded by default
INFO: Skipping remove-screen-capture-restriction: Excluded by default
INFO: Skipping remove-screenshot-restriction: Excluded by default
INFO: Skipping spoof-wifi-connection: Excluded by default
INFO: Deleting existing resource cache directory
SEVERE: Failed to delete existing resource cache directory
INFO: Decoding resources
WARNING: Cant find 9patch chunk in file: "drawable-xhdpi-v4/common_google_signin_btn_text_light_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xhdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xxhdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xhdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-mdpi-v4/notification_bg_normal.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xhdpi-v4/notification_bg_low_normal.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-hdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-mdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xhdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-mdpi-v4/notification_bg_low_pressed.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-hdpi-v4/common_google_signin_btn_text_light_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xhdpi-v4/notification_bg_low_pressed.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-hdpi-v4/notification_bg_normal_pressed.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-hdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-hdpi-v4/bg_tab_focused.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xxhdpi-v4/common_google_signin_btn_text_light_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-mdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xhdpi-v4/notification_bg_normal.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xhdpi-v4/notification_bg_normal_pressed.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-hdpi-v4/notification_bg_normal.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-mdpi-v4/notification_bg_normal_pressed.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-hdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-xxhdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-mdpi-v4/notification_bg_low_normal.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-mdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-mdpi-v4/common_google_signin_btn_text_light_normal_background.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-hdpi-v4/notification_bg_low_normal.9.png". Renaming it to *.png.
WARNING: Cant find 9patch chunk in file: "drawable-hdpi-v4/notification_bg_low_pressed.9.png". Renaming it to *.png.
INFO: Executing patches
SEVERE: hide-premium-navbar failed:
app.revanced.patcher.patch.PatchResultError
        at app.revanced.patcher.Patcher.executePatches$executePatch(Patcher.kt:337)
        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.utils.patcher.PatcherKt.applyPatchesVerbose(Patcher.kt:84)
        at app.revanced.cli.patcher.Patcher.start$revanced_cli(Patcher.kt:19)
        at app.revanced.cli.command.MainCommand.run(MainCommand.kt:166)
        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.main.MainKt.main(Main.kt:7)
Caused by: java.lang.NullPointerException
        at app.revanced.patches.spotify.premium_navbar_tab.patch.PremiumNavbarTabPatch.execute(PremiumNavbarTabPatch.kt:36)
        at app.revanced.patches.spotify.premium_navbar_tab.patch.PremiumNavbarTabPatch.execute(PremiumNavbarTabPatch.kt:21)
        at app.revanced.patcher.Patcher.executePatches$executePatch(Patcher.kt:333)
        ... 16 more
INFO: spotify-theme succeeded
INFO: Compiling resources
INFO: Writing modified dex files
INFO: Aligning Spotify Music and Podcasts_8.8.50.466.apk to Spotify-patched_aligned.apk
INFO: Signing Spotify-patched_aligned.apk to Spotify-patched_signed.apk
INFO: Found existing keystore: Spotify-patched.keystore
INFO: Copying Spotify-patched_signed.apk to Spotify-patched.apk
INFO: Finished

Screenshots or videos

No response

Solution

No response

Additional context

Downloaded a few old APKs from APKPure and all of them had the same error.

Acknowledgements

LisoUseInAIKyrios commented 1 year ago

Try patching a slightly older release of Spotify and see if it works.

0x263b commented 1 year ago

Try patching a slightly older release of Spotify and see if it works.

I tried downloaded a few from APKpure and none worked. If anyone knows which versions work that would be a great help.

These versions all produce the same error

8.7.86.422
8.7.92.521
8.8.0.347
8.8.10.582
8.8.18.509
8.8.28.409
8.8.36.522
8.8.40.470
8.8.46.529
8.8.50.466
LisoUseInAIKyrios commented 1 year ago

I also tried:

8.6.98.900 8.5.79.1061

And neither worked.

The Spotify patches have become bleak and the only working patch is Theme.

LisoUseInAIKyrios commented 1 year ago

The hide nav bar patch is from late September 2022. An app release from around then or soon after should work.

V9vek commented 1 year ago

@0x263b @LisoUseInAIKyrios can you add any screenshots, what exactly is happening and what is not being patched

LisoUseInAIKyrios commented 1 year ago

@V9vek the first post of this issue already has the patch logs. Screen shots will show exactly the same.

This patch should be deleted as it has not worked in over a year and nobody cares enough to fix it.

V9vek commented 1 year ago

@V9vek the first post of this issue already has the patch logs. Screen shots will show exactly the same.

This patch should be deleted as it has not worked in over a year and nobody cares enough to fix it.

I mean what you want in UI, can you show it to me please?

LisoUseInAIKyrios commented 1 year ago

I don't use Spotify so I can't comment on what this patch should look like.

ABCPascal commented 1 year ago

Seems like it's also an issue on the official ReVanced Manager:

Log:

- Device Info
ReVanced Manager: 1.14.2
Build: release
Model: motorola edge 30 ultra
Android version: 13
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: No

- Patch Info
App: com.spotify.music v8.8.80.599
Patches version: v2.195.0
Patches: Custom theme [Background color: @android:color/black, Accent color: #ff1ed760, Pressed accent for the dark theme: #ff169c46], Hide premium navbar

- 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
Copying APK
Reading APK
Decoding app manifest
Loading patches
Deleting existing resource cache directory
Decoding resources
Executing patches
Custom theme succeeded
Hide premium navbar failed: app.revanced.patcher.patch.PatchException: 'Hide premium navbar' depends on 'PremiumNavbarTabPatch' that raised an exception:
app.revanced.patcher.patch.PatchException
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:184)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:155)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Patcher.kt:201)
    at app.revanced.patcher.Patcher$apply$1.invoke(Unknown Source:8)
    at app.revanced.patcher.Patcher$apply$1.invoke(Unknown Source:4)
    at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
    at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
    at app.revanced.manager.flutter.MainActivity$runPatcher$1$2$1.invokeSuspend(MainActivity.kt:286)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$30(MainActivity.kt:285)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$nWp6SJoHVIOkEmiKbEEka4nn7Ag(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda3.run(Unknown Source:24)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.NullPointerException
    at app.revanced.patches.spotify.navbar.PremiumNavbarTabPatch.execute(PremiumNavbarTabPatch.kt:27)
    at app.revanced.patches.spotify.navbar.PremiumNavbarTabPatch.execute(PremiumNavbarTabPatch.kt:15)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:173)
    ... 19 more

    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:160)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Patcher.kt:201)
    at app.revanced.patcher.Patcher$apply$1.invoke(Unknown Source:8)
    at app.revanced.patcher.Patcher$apply$1.invoke(Unknown Source:4)
    at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
    at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
    at app.revanced.manager.flutter.MainActivity$runPatcher$1$2$1.invokeSuspend(MainActivity.kt:286)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$30(MainActivity.kt:285)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$nWp6SJoHVIOkEmiKbEEka4nn7Ag(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda3.run(Unknown Source:24)
    at java.lang.Thread.run(Thread.java:1012)
Compiling patched dex files
Compiled classes.dex
Compiled classes2.dex
Compiled classes3.dex
Compiled classes4.dex
Compiled classes5.dex
Compiled classes6.dex
Compiled classes7.dex
Compiled classes8.dex
Compiling modified resources
Signing APK
Patched