ReVanced / revanced-patches

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

bug: Infinity patching failed #180

Closed BabyOilJohnson closed 10 months ago

BabyOilJohnson commented 10 months ago

Bug description

I can't patch Infinity with "spoof client", it failed.

https://github.com/ReVanced/revanced-manager/assets/101601874/37b81b5b-af04-4d97-a0b1-711f9baa4b5f

Error logs

- Device Info
ReVanced Manager: 1.14.0
Build: release
Model: SM-A305F
Android version: 11
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: No

- Patch Info
App: ml.docilealligator.infinityforreddit v6.1.1
Patches version: v2.195.0
Patches: Spoof client [OAuth client ID: null]

- 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
Executing patches
Spoof client failed: app.revanced.patcher.patch.PatchException: 'Spoof client' depends on 'SpoofClientPatch' that raised an exception:
app.revanced.patcher.patch.PatchException: Failed to resolve GetHttpBasicAuthHeaderFingerprint
    at app.revanced.extensions.ExtensionsKt.getException(Extensions.kt:21)
    at app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch.execute$executePatch(AbstractSpoofClientPatch.kt:34)
    at app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch.execute(AbstractSpoofClientPatch.kt:36)
    at app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch.execute(AbstractSpoofClientPatch.kt:10)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:173)
    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:923)

    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:923)
Compiling patched dex files
Compiled classes.dex
Compiled classes2.dex
Compiled classes3.dex
Compiled classes4.dex
Signing APK
Patched

Solution

No response

Additional context

No response

Acknowledgements

KobeW50 commented 10 months ago

I'm not able to reproduce this. Can you please try to patch an Infinity 6.1.1 apk from apkmirror and select it from storage?

BabyOilJohnson commented 10 months ago

Can you please try to patch an Infinity 6.1.1 apk from apkmirror and select it from storage?

Yeah, I tried with apkmirror and GitHub version and selected from storage, it works completely fine. I don't know what's happen, when I select it from normal way(installed app way). Should I close the issue?

oSumAtrIX commented 10 months ago

No, keep it open, it should work for the installed app too.

KobeW50 commented 10 months ago

I was able to replicate the error after patching Infinity with the Spoof Client patch, installing, and then selecting the already patched Infinity app from the apps list and patching with the Spoof Client patch again. I used an empty string as the client ID in the patch options both times.

- Device Info
ReVanced Manager: 1.14.0
Build: release
Model: SM-S906U1
Android version: 13
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: No

- Patch Info
App: ml.docilealligator.infinityforreddit v6.1.1
Patches version: v2.195.0
Patches: Spoof client [OAuth client ID: null]

- 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
Executing patches
Spoof client failed: app.revanced.patcher.patch.PatchException: 'Spoof client' depends on 'SpoofClientPatch' that raised an exception:
app.revanced.patcher.patch.PatchException: Failed to resolve GetHttpBasicAuthHeaderFingerprint
    at app.revanced.extensions.ExtensionsKt.getException(Extensions.kt:21)
...
KobeW50 commented 10 months ago

@oSumAtrIX Would it be possible to update the fingerprint to work on an already patched apk?

oSumAtrIX commented 10 months ago

Yes it is possible but it's useless