jackwener/OpenCLI · error · CommandExecutionError
${payload?.message || 'huodongxing events returned malformed
Error message
${payload?.message || 'huodongxing events returned malformed extraction data'} What it means
The fallback in requireExtractionRows: the payload had no recognized code and did not match the ok/rows contract, so extraction returned wholly malformed data. Thrown as CommandExecutionError with the payload's own message/hint when available.
Source
Thrown at clis/huodongxing/events.js:305
payload.hint || 'Wait a few minutes and retry from a real browser session.',
);
}
if (payload?.code === 'TRANSIENT_ACCESS') {
throw new CommandExecutionError(
payload.message || 'huodongxing events page returned a temporary busy/access page',
payload.hint || 'Wait and retry from the same browser session.',
);
}
if (payload?.code === 'INVALID_LIMIT') {
throw new ArgumentError(payload.message || 'huodongxing limit must be a positive integer <= 50');
}
if (payload?.code === 'EMPTY_RESULT') {
throw new EmptyResultError(
'huodongxing events',
payload.hint || 'No Huodongxing event cards were found. The page may be empty.',
);
}
throw new CommandExecutionError(
payload?.message || 'huodongxing events returned malformed extraction data',
payload?.hint || 'Huodongxing extraction did not return the expected structured payload.',
);
}
export function extractEventRows(limit = 20) {
return requireExtractionRows(extractEventRowsPayload(limit));
}
async function extractEventRowsFromPage(page, limit) {
return page.evaluate(`(${extractEventRowsPayload.toString()})(${limit})`);
}
async function waitForEventCards(page) {
await page.wait({ selector: RESULT_CARD_SELECTOR, timeout: 10 }).catch(async () => {
await page.wait({ time: 1 });
});
}View on GitHub (pinned to 49907e53dc)
Solutions
- Retry the command to rule out transient navigation issues
- Verify the site is reachable in a normal browser
- Update the CLI/extractor to match current site markup
- Log the raw payload to diagnose the unexpected shape
Defensive patterns
Strategy: try-catch
Type guard
const isKnownPayload = p => p && typeof p === 'object' && (p.ok === true || ['RATE_LIMIT','TRANSIENT_ACCESS','INVALID_LIMIT','EMPTY_RESULT'].includes(p.code));
Try / catch
try { const rows = extractEventRows(limit); } catch (e) { if (e instanceof CommandExecutionError && /malformed extraction data/.test(e.message)) { logRawPayload(e); /* retry or escalate with diagnostics */ } else throw e; } Prevention
- Retry once with backoff for transient navigation failures
- Keep the extractor and CLI versions in sync
- Verify network/proxy stability — injected pages corrupt evaluate results
- Log the raw payload included in the error for diagnosis
When it happens
Trigger: page.evaluate returns null/undefined, an error object, or an unexpected shape (no ok, no known code) — e.g. navigation failed mid-evaluate or the site served an unexpected page.
Common situations: Browser navigation interrupted; site layout overhaul breaking the extractor's contract entirely; captive portal or proxy injecting HTML into the evaluate result.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- huodongxing events returned malformed extraction rows
- douyin hashtag ${action}: API returned malformed payload
- Not a git repository
- Working tree not clean: ${status}
- 1point3acres thread
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/4f9e6d8be46419cf.
Report an issue: GitHub.