{"record":{"id":"e946d5c90350e63f","repo":"AprilNEA/OpenLogi","slug":"the-running-agent-could-not-complete-the-online-family","errorCode":null,"errorMessage":"the running Agent could not complete the online {family} semantic read; transient, transport, protocol, timeout, open, and disconnect errors abort capture (no profile was written)","messagePattern":"the running Agent could not complete the online (.+?) semantic read; transient, transport, protocol, timeout, open, and disconnect errors abort capture \\(no profile was written\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/openlogi-cli/src/cmd/fixture/record_profile.rs","lineNumber":370,"sourceCode":"}\n\nasync fn semantic_read<T>(\n    family: &'static str,\n    request: impl Future<Output = Result<Result<T, WriteError>, RpcError>>,\n) -> Result<ProfileSetting<T>> {\n    let result = tokio::time::timeout(READ_TIMEOUT, request)\n        .await\n        .map_err(|_| safe_read_error(family))?\n        .map_err(|_| safe_read_error(family))?;\n    match result {\n        Ok(value) => Ok(ProfileSetting::Supported(value)),\n        Err(WriteError::FeatureUnsupported { .. }) => Ok(ProfileSetting::Unsupported),\n        Err(_) => Err(safe_read_error(family)),\n    }\n}\n\nfn safe_read_error(family: &str) -> anyhow::Error {\n    anyhow!(\n        \"the running Agent could not complete the online {family} semantic read; transient, \\\n         transport, protocol, timeout, open, and disconnect errors abort capture (no profile was \\\n         written)\"\n    )\n}\n\nfn capture_standalone(source: &StandaloneDevice) -> Result<ProfileCaptureParts> {\n    let mut retained = source.clone();\n    sanitize::standalone(&mut retained)?;\n    let route = selection::standalone_route(&retained);\n    let light_supported = retained.light_capabilities.is_some_and(|capabilities| {\n        capabilities.power\n            || capabilities.brightness.is_some()\n            || capabilities.temperature.is_some()\n    });\n    let settings = ProfileDeviceSettings {\n        route: route.clone(),\n        dpi: ProfileSetting::Unsupported,","sourceCodeStart":352,"sourceCodeEnd":388,"githubUrl":"https://github.com/AprilNEA/OpenLogi/blob/e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8/crates/openlogi-cli/src/cmd/fixture/record_profile.rs#L352-L388","documentation":"Raised by `safe_read_error` when a live semantic read (DPI, SmartShift, wheel, or backlight) through the running agent fails for any reason other than an explicit `FeatureUnsupported` reply: RPC timeout, transport/disconnect errors, protocol errors, or device-level open/transient failures. Capture is intentionally fail-closed — any ambiguous read failure aborts so an incorrect profile is never written.","triggerScenarios":"`semantic_read` observes: the 5-second `READ_TIMEOUT` elapsing; a tarpc `RpcError` (agent disconnected); `Err(_)` from the agent that is not `WriteError::FeatureUnsupported` — e.g. `WriteError::Transport`, timeout, open failure, or disconnect while reading DPI/SmartShift/wheel/backlight.","commonSituations":"Device drops mid-read (wireless interference, sleep); agent busy or wedged so the RPC times out; HID++ protocol error on a quirky device; user unplugs the device while the profile is being recorded.","solutions":["Retry the command — transient wireless drops are the most common cause and a retry usually succeeds.","Verify the agent is responsive (open the GUI or `openlogi list`) and restart it if wedged.","Confirm the device stays connected during capture: fresh batteries, close to the receiver, no USB power management suspending the receiver.","If a specific family (e.g. SmartShift) always fails on your device, the feature read may be genuinely unsupported by the firmware — check agent logs for the underlying WriteError and file a device-support issue."],"exampleFix":"// flaky read aborted capture; increase stability and retry\nopenlogi fixture record profile --id mx --name \"MX\" --output mx.json\n// if transport errors persist\nopenlogi-agent restart && openlogi fixture record profile --id mx --name \"MX\" --output mx.json","handlingStrategy":"retry","validationCode":"// pre-check the agent is reachable and responsive before capture\ntokio::time::timeout(Duration::from_secs(2), client::connect()).await\n    .map_err(|_| \"agent unresponsive\")?;","typeGuard":null,"tryCatchPattern":"// retry transient read failures once before giving up\nmatch semantic_read(\"DPI\", client.read_dpi(...)).await {\n    Err(e) if e.to_string().contains(\"semantic read\") => semantic_read(\"DPI\", client.read_dpi(...)).await,\n    other => other,\n}","preventionTips":["Keep the device connected and idle during capture (no sleep, no unplugging).","Restart a wedged agent before recording.","Avoid recording over a flaky wireless link; use a wired connection when possible.","Check agent logs for the underlying WriteError if a family always fails."],"tags":["rust","cli","ipc","hidpp","rpc","timeout"],"backgroundTag":"request-timeout","analyzedSha":"e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8","analyzedAt":"2026-09-13T03:07:16.451Z","contentChangedAt":"2026-09-13T03:07:16.451Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}