jackwener/OpenCLI · error · CommandExecutionError
Failed to parse Jike user data: ${data.message || 'unknown e
Error message
Failed to parse Jike user data: ${data.message || 'unknown error'} What it means
CommandExecutionError thrown when the in-page extraction script itself threw an exception; the page reports reason 'parse-error' and the browser-side error message is interpolated into this CLI error. It means the script ran but failed while reading or parsing the embedded user data.
Source
Thrown at clis/jike/user.js:61
if (Array.isArray(data)) {
if (data.length === 0) {
throw new EmptyResultError('jike user', `No posts were returned for user ${args.username}. Confirm the username and login state.`);
}
return data.slice(0, limit).map((item) => ({
id: item.id ?? '',
content: item.content ?? '',
type: item.type ?? '',
likes: item.likes ?? 0,
comments: item.comments ?? 0,
time: item.time ?? '',
url: `https://web.okjike.com/originalPost/${item.id ?? ''}`,
}));
}
if (data?.reason === 'missing-data-script') {
throw new CommandExecutionError('Jike user page did not expose the expected data script');
}
if (data?.reason === 'parse-error') {
throw new CommandExecutionError(`Failed to parse Jike user data: ${data.message || 'unknown error'}`);
}
throw new CommandExecutionError('Jike user returned an unreadable payload');
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Read the interpolated inner message to see what the in-page script actually threw
- Retry — a truncated page load often resolves on a second attempt
- Update the CLI if Jike changed the embedded data format
- Clear browser cache/cookies for web.okjike.com and retry with a fresh page load
Defensive patterns
Strategy: try-catch
Try / catch
try {
const posts = await jikeUser({ username, limit });
} catch (e) {
if (String(e.message).startsWith('Failed to parse Jike user data')) {
console.error('In-page parse failure:', e.message);
// surface inner message, retry or fall back
} else throw e;
} Prevention
- Parse the interpolated inner message to identify the real cause
- Retry once — truncated page loads commonly cause this
- Clear cache/cookies for web.okjike.com on repeated failures
- Update the CLI when Jike changes its embedded data format
When it happens
Trigger: Executing `jike user` when the embedded extraction script throws inside page.evaluate — malformed or unexpected JSON in the data script, null DOM nodes the script assumes exist, or a runtime exception in the probe code.
Common situations: Jike serving a partially-rendered or localized page variant with a different data shape; a Jike A/B test changing the data payload; corrupted/truncated HTML from a flaky network.
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
- Not a git repository
- Working tree not clean: ${status}
- PARSE_ERROR
- Ctrip attraction DOM extraction returned malformed rows
- Ctrip attraction links rendered but parser did not find requ
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/34b56d1b6533ae16.
Report an issue: GitHub.