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

Spoof client failed: The option client-id requires a value, but the value was null #622

Open
1 task done
articuno1au opened this issue Feb 26, 2025 · 0 comments
Open
1 task done
Assignees
Labels
bug🐞 Something isn't working

Comments

@articuno1au
Copy link

articuno1au commented Feb 26, 2025

Request guidelines

Name

Sync for Reddit

Error log or link to the logs if using Github Action

2025-02-27 00:20:15.567 | INFO     | __main__:main:47 - app_name: sync, app_version: 39..23033, experiment: False, cli_dl: https://github.com/revanced/revanced-cli/releases/latest, patches_dl: https://github.com/revanced/revanced-patches/releases/latest, exclude_request: [], include_request: [], resource: {'cli': {'file_name': 'df5f3e56a9720b24faf3ffc148589ecdc1c8935baa61e1d00b07c8db2bd2c98d.jar', 'version': 'v5.0.0'}, 'patches': {'file_name': '32f1e8baa54afe2bfea464492f326f2a28fd883c80cf530994e53bead474a442.rvp', 'version': 'v5.12.0'}}, no_of_patches: 6, keystore_name: revanced.keystore, archs_to_build: [], options_file: options.json, download_file_name: sync.apk, download_dl: https://www.apkmirror.com/wp-content/themes/APKMirror/download.php?id=4985243&key=<SNIP>&forcebaseapk=true, download_source: https://www.apkmirror.com/apk/red-apps-ltd/sync-for-reddit/, package_name: com.laurencedawson.reddit_sync, old_key: True, patches: [], space_formatted: True
2025-02-27 00:20:15.589 | DEBUG    | src.parser:patch_app:187 - Sending request to revanced cli for building with args java ['-jar', PosixPath('apks/df5f3e56a9720b24faf3ffc148589ecdc1c8935baa61e1d00b07c8db2bd2c98d.jar'), 'patch', PosixPath('apks/sync.apk'), '-p', PosixPath('apks/32f1e8baa54afe2bfea464492f326f2a28fd883c80cf530994e53bead474a442.rvp'), '-o', PosixPath('apks/Resync-Version39..23033-PatchVersionv5.12.0-2025FEB26.0650PM-output.apk'), '--keystore', PosixPath('apks/revanced.keystore'), '--options', PosixPath('apks/options.json'), '--force', '--keystore-entry-alias=alias', '--keystore-entry-password=ReVanced', '--keystore-password=ReVanced', '-e', 'Use /user/ endpoint', '-e', 'Spoof client', '-e', 'Fix video downloads', '-e', 'Fix /s/ links', '-e', 'Disable ads', '-e', 'Disable Sync for Lemmy bottom sheet']
SEVERE: "Spoof client" failed:
app.revanced.patcher.patch.PatchException: The option client-id requires a value, but the value was null
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend$execute(Patcher.kt:90)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:109)
	at app.revanced.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at app.revanced.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:57)
	at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:226)
	at app.revanced.cli.command.PatchCommand$run$1$4.invokeSuspend(PatchCommand.kt:315)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:314)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2030)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
	at picocli.CommandLine.execute(CommandLine.java:2174)
	at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:12)
Caused by: app.revanced.patcher.patch.OptionException$ValueRequiredException: The option client-id requires a value, but the value was null
	at app.revanced.patcher.patch.Option.assertRequiredButNotNull(Option.kt:79)
	at app.revanced.patcher.patch.Option.getValue(Option.kt:61)
	at app.revanced.patcher.patch.Option.getValue(Option.kt:91)
	at app.revanced.patches.reddit.customclients.sync.syncforreddit.api.SpoofClientPatchKt.spoofClientPatch$lambda$4$lambda$0(SpoofClientPatch.kt:24)
	at app.revanced.patches.reddit.customclients.sync.syncforreddit.api.SpoofClientPatchKt.spoofClientPatch$lambda$4$lambda$3(SpoofClientPatch.kt:30)
	at app.revanced.patcher.patch.Patch.execute(Patch.kt:71)
	at app.revanced.patcher.patch.BytecodePatch.execute$revanced_patcher(Patch.kt:159)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend$execute(Patcher.kt:84)
	... 24 more

ENVS

-e 'REDDIT_CLIENT_ID=<22_character_id>' 

AND

-e 'GLOBAL_OPTIONS_FILE=options.json' 
with the options.json from the repository but with the key inserted as

{
    "patchName": "Spoof client",
    "options": [
      {
        "key": "client-id",
        "value": "<22_character_id>"
      }
    ]
  },

Additional info

I've tried everything and I'm completely jammed up here. I've tried setting the client-id via environment variable, passing a simple config file in, and by passing a modified global config. Each time I end up with the error above, and continuous 401's when using the app. Rolling back to an old patched APK from November works fine.

I've checked the docker environment variables and can see everything being passed in. I can see the options file in the patch config. I've gone reviewed the patcher documentation and everything seems right. Setting the apps to patch is also working as expected, so doesn't seem like an obvious configuration issue.

I might be missing something here, so apologies if so, but I'm stumped. I'm opening this as a potential bug as I can't see anything wrong with my config and have troubleshot extensively. It might be on my end though, so any help appreciated. Thanks in advance.

Also, huge thanks for your work on this tool. It's first class.

@articuno1au articuno1au added the bug🐞 Something isn't working label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants