{"record":{"id":"34b56d1b6533ae16","repo":"jackwener/OpenCLI","slug":"failed-to-parse-jike-user-data-data-message","errorCode":null,"errorMessage":"Failed to parse Jike user data: ${data.message || 'unknown error'}","messagePattern":"Failed to parse Jike user data: (.+?)","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/jike/user.js","lineNumber":61,"sourceCode":"        if (Array.isArray(data)) {\n            if (data.length === 0) {\n                throw new EmptyResultError('jike user', `No posts were returned for user ${args.username}. Confirm the username and login state.`);\n            }\n            return data.slice(0, limit).map((item) => ({\n                id: item.id ?? '',\n                content: item.content ?? '',\n                type: item.type ?? '',\n                likes: item.likes ?? 0,\n                comments: item.comments ?? 0,\n                time: item.time ?? '',\n                url: `https://web.okjike.com/originalPost/${item.id ?? ''}`,\n            }));\n        }\n        if (data?.reason === 'missing-data-script') {\n            throw new CommandExecutionError('Jike user page did not expose the expected data script');\n        }\n        if (data?.reason === 'parse-error') {\n            throw new CommandExecutionError(`Failed to parse Jike user data: ${data.message || 'unknown error'}`);\n        }\n        throw new CommandExecutionError('Jike user returned an unreadable payload');\n    },\n});\n","sourceCodeStart":43,"sourceCodeEnd":66,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/jike/user.js#L43-L66","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const posts = await jikeUser({ username, limit });\n} catch (e) {\n  if (String(e.message).startsWith('Failed to parse Jike user data')) {\n    console.error('In-page parse failure:', e.message);\n    // surface inner message, retry or fall back\n  } else throw e;\n}","preventionTips":["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"],"tags":["scraping","parse-error","dom-parsing"],"backgroundTag":"page-parse-failed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}