{"record":{"id":"8aab6a62a1a1dde4","repo":"xpipe-io/xpipe","slug":"unable-to-parse-action-into-known-schema","errorCode":null,"errorMessage":"Unable to parse action into known schema","messagePattern":"Unable to parse action into known schema","errorType":"exception","errorClass":"BeaconClientException","httpStatus":400,"severity":"error","filePath":"app/src/main/java/io/xpipe/app/beacon/api/ActionExchange.java","lineNumber":27,"sourceCode":"import com.sun.net.httpserver.HttpExchange;\nimport lombok.Builder;\nimport lombok.NonNull;\nimport lombok.Value;\nimport lombok.extern.jackson.Jacksonized;\nimport tools.jackson.databind.JsonNode;\n\npublic class ActionExchange extends BeaconInterface<ActionExchange.Request> {\n\n    @Override\n    public String getPath() {\n        return \"/action\";\n    }\n\n    @Override\n    public Object handle(HttpExchange exchange, Request msg) throws Exception {\n        var action = ActionJacksonMapper.parse(msg.getAction());\n        if (action == null) {\n            throw new BeaconClientException(\"Unable to parse action into known schema\");\n        }\n\n        if (!checkPermission()) {\n            return Response.builder().build();\n        }\n\n        action.executeSyncImpl(msg.isConfirm());\n        return Response.builder().build();\n    }\n\n    private boolean checkPermission() {\n        var cache = AppCache.getBoolean(\"externalActionPermitted\", false);\n        if (cache) {\n            return true;\n        }\n\n        var r = AppDialog.confirm(\"externalAction\");\n        if (r) {","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/xpipe-io/xpipe/blob/d85ca821baa46092a320ebb13546d7240adb74f8/app/src/main/java/io/xpipe/app/beacon/api/ActionExchange.java#L9-L45","documentation":"ActionExchange handles the /action beacon endpoint. It parses the incoming action string via ActionJacksonMapper.parse; if the string does not map to any known action class, it throws BeaconClientException('Unable to parse action into known schema'). The daemon therefore rejected an unrecognized or malformed action name.","triggerScenarios":"Sending an action name that is misspelled, deprecated, or from a newer client than the daemon supports; sending an empty or wrongly-cased action string; version mismatch where the client's action enum/schema isn't known to the daemon.","commonSituations":"Hard-coded action strings in scripts after an XPipe upgrade renamed actions; automation built against a newer API version talking to an older daemon; JSON casing/whitespace issues in the action field.","solutions":["Check the action string against the supported actions for the running daemon version and fix typos/casing.","Update the XPipe daemon (or client) so both sides agree on the action schema.","Log msg.getAction() to see the exact raw value being rejected.","If invoking via a newer client API, downgrade the action or upgrade the daemon to match."],"exampleFix":"// before\nrequest.setAction(\"openconection\"); // typo, unknown schema\n// after\nrequest.setAction(\"openConnection\"); // must match a known action name","handlingStrategy":"validation","validationCode":"// confirm the action name is supported before sending\nboolean known = ActionJacksonMapper.parse(actionName) != null;","typeGuard":"boolean isKnownAction(String action) {\n    return action != null && ActionJacksonMapper.parse(action) != null;\n}","tryCatchPattern":"try {\n    client.performRequest(new ActionExchange.Request(actionName));\n} catch (BeaconClientException e) {\n    LOG.error(\"Unknown action '{}' — check supported actions for daemon v{}\", actionName, daemonVersion);\n}","preventionTips":["Use the typed action constants/enums instead of raw strings","Keep client and daemon versions matched","Log the raw action string when debugging schema rejections"],"tags":["beacon","action","schema","invalid-input"],"backgroundTag":"schema-validation-failed","analyzedSha":"d85ca821baa46092a320ebb13546d7240adb74f8","analyzedAt":"2026-09-06T14:30:08.251Z","contentChangedAt":"2026-09-06T14:30:08.251Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}