{"record":{"id":"063a942ca5871eaa","repo":"pbakaus/impeccable","slug":"poll-failed","errorCode":null,"errorMessage":"Poll failed: {}\n","messagePattern":"Poll failed: (.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/live/src/live_poll.rs","lineNumber":658,"sourceCode":"                \"Try restarting: {} stop && {}\\n\",\n                script_cmd(&env, &cwd, \"live-server\"),\n                script_cmd(&env, &cwd, \"live\")\n            ));\n            1\n        }\n        PollError::ConnRefused => {\n            io.err(&format!(\n                \"Live server not running. Start one with: {}\\n\",\n                script_cmd(&env, &cwd, \"live\")\n            ));\n            1\n        }\n        PollError::AckTimeout(m) => {\n            io.err(&format!(\"{}\\n\", m));\n            1\n        }\n        PollError::Other(m) => {\n            io.err(&format!(\"Poll failed: {}\\n\", m));\n            1\n        }\n    }\n}\n\nfn arg_value_int(args: &[String], prefix: &str, default: i64) -> i64 {\n    match args.iter().find(|a| a.starts_with(prefix)) {\n        Some(a) => {\n            let raw = a.splitn(2, '=').nth(1).unwrap_or(\"\");\n            let n = impeccable_core::js::parse_int(raw, 10);\n            if n.is_nan() {\n                i64::MIN\n            } else {\n                n as i64\n            }\n        }\n        None => default,\n    }","sourceCodeStart":640,"sourceCodeEnd":676,"githubUrl":"https://github.com/pbakaus/impeccable/blob/2bc2879276c1f321a53c4ca99d3371e411329b52/crates/live/src/live_poll.rs#L640-L676","documentation":"handle_poll_error maps PollError::Other(m) to `Poll failed: <m>` and exits with code 1. This is the fallback arm for any poll failure that is not Auth, ConnRefused, or AckTimeout, carrying the underlying message in `m`.","triggerScenarios":"Any unexpected error during the live poll loop — malformed server response, protocol mismatch between client and server versions, I/O error reading the socket, or server-side panic surfaced as an error string.","commonSituations":"Engine binary version mismatch between poller and live-server (protocol drift); proxy or antivirus interfering with localhost sockets; corrupted state files yielding invalid requests.","solutions":["Read the interpolated `m` after 'Poll failed:' — it contains the actual cause.","Restart both ends to rule out version/protocol drift: `<live-server> stop && <live>`.","If it persists, rebuild the engine from source and re-run with IMPECCABLE_BIN pointing at the fresh binary, then report with the full message."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"const res = await poll().catch(e => e);\nif (res && res.kind === 'other') {\n  console.error(`Poll failed: ${res.message} — restarting live session`);\n  await exec('impeccable live-server stop && impeccable live');\n}","preventionTips":["Keep poller and live-server on the same engine build to avoid protocol drift.","Log the full `Poll failed: <m>` message verbatim for bug reports.","Disable localhost-interfering proxies/AV for the live port range."],"tags":["poll","protocol","live-server","cli"],"backgroundTag":"api-error-response","analyzedSha":"2bc2879276c1f321a53c4ca99d3371e411329b52","analyzedAt":"2026-09-08T04:51:14.109Z","contentChangedAt":"2026-09-08T04:51:14.109Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}