ReVanced / revanced-manager

💊 Application to use ReVanced on Android
https://revanced.app
GNU General Public License v3.0
18.02k stars 743 forks source link

bug: installer is potentially unaware when ReVanced Patcher fails #1482

Closed Ushie closed 9 months ago

Ushie commented 11 months ago

Bug description

Been waiting for over 10 minutes after this error occurred, it just endlessly loads

https://github.com/ReVanced/revanced-manager/assets/79272171/61139826-7f40-43bd-98d3-1eb27b79a266

Patcher logs

[INFO]: Merging integrations
[INFO]: Applying patches...
[INFO]: Executing patches
[INFO]: Disable Sync for Lemmy bottom sheet succeeded
[INFO]: Disable ads succeeded
[ERROR]: Spoof client failed:
[ERROR]: app.revanced.patcher.patch.PatchException: The option client-id requires a value, but null was passed
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:185)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Patcher.kt:202)
    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.patcher.Session.applyPatchesVerbose(Session.kt:39)
    at app.revanced.manager.patcher.Session.run(Session.kt:68)
    at app.revanced.manager.patcher.worker.PatcherWorker.runPatcher(PatcherWorker.kt:226)
    at app.revanced.manager.patcher.worker.PatcherWorker.access$runPatcher(PatcherWorker.kt:46)
    at app.revanced.manager.patcher.worker.PatcherWorker$runPatcher$1.invokeSuspend(Unknown Source:15)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: app.revanced.patcher.patch.options.PatchOptionException$ValueRequiredException: The option client-id requires a value, but null was passed
    at app.revanced.patcher.patch.options.PatchOption.assertRequiredButNotNull(PatchOption.kt:75)
    at app.revanced.patcher.patch.options.PatchOption.getValue(PatchOption.kt:57)
    at app.revanced.patcher.patch.options.PatchOption.getValue(PatchOption.kt:84)
    at app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch.getClientId(AbstractSpoofClientPatch.kt:20)
    at app.revanced.patches.reddit.customclients.syncforreddit.api.SpoofClientPatch.patchClientId(SpoofClientPatch.kt:44)
    at app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch$execute$1.invoke(AbstractSpoofClientPatch.kt:37)
    at app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch$execute$1.invoke(AbstractSpoofClientPatch.kt:37)
    at app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch.execute$executePatch(AbstractSpoofClientPatch.kt:35)
    at app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch.execute(AbstractSpoofClientPatch.kt:37)
    at app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch.execute(AbstractSpoofClientPatch.kt:10)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:174)
    ... 16 more

Acknowledgements

Axelen123 commented 11 months ago

The installer is logically aware that patching has failed. However, the UI always uses spinners for steps in the WAITING state even if the patcher isn't running.

The UI issue can be solved by either marking every future substep as FAILED or by only showing the spinner if the patcher is running

Ushie commented 9 months ago

Has this been solved?

CnC-Robert commented 9 months ago

Yes