ReVanced / revanced-patches

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

bug: (Facebook): `Hide story ads failed` to be applied on Facebook APK for Android 8 and 9 #3285

Open cyberboh opened 5 months ago

cyberboh commented 5 months ago

Bug description

Tested againts this apk (android 9) https://www.apkmirror.com/apk/facebook-2/facebook/facebook-466-1-0-57-85-release/facebook-466-1-0-57-85-7-android-apk-download/ And this apk (Android 8): https://www.apkmirror.com/apk/facebook-2/facebook/facebook-466-1-0-57-85-release/facebook-466-1-0-57-85-5-android-apk-download/ Patch them with default patches. All ended with fail error message.

Error logs

SEVERE: Hide story ads failed:
app.revanced.patcher.patch.PatchException: Failed to resolve FetchMoreAdsFingerprint
        at app.revanced.util.BytecodeUtilsKt.getException(BytecodeUtils.kt:26)
        at app.revanced.patches.facebook.ads.story.HideStoryAdsPatch.execute(HideStoryAdsPatch.kt:24)
        at app.revanced.patches.facebook.ads.story.HideStoryAdsPatch.execute(HideStoryAdsPatch.kt:12)
        at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:173)
        at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Patcher.kt:205)
        at app.revanced.patcher.Patcher$apply$1.invoke(Patcher.kt)
        at app.revanced.patcher.Patcher$apply$1.invoke(Patcher.kt)
        at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
        at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
        at app.revanced.cli.command.PatchCommand$run$4$1$1.invokeSuspend(PatchCommand.kt:303)
        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)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:302)
        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:12)

Solution

Hide story ads patch is needed to reconfigure to add support for Android 8 and 9 Facebook APK

Additional context

Full log Facebook APK Patching: https://paste2.org/mh4VCdYw

Acknowledgements

cyberboh commented 5 months ago

Continuation from this issue and his comment =>> https://github.com/ReVanced/revanced-patches/issues/96#issuecomment-2143607404