{"record":{"id":"32ba95080af63601","repo":"deepseek-ai/deepseek-harness","slug":"client-half-failed-to-parse-in-this-browser-err","errorCode":null,"errorMessage":"client half failed to parse in this browser: ${error.message}\nThe browser half is plain JavaScript (no JSX, no TypeScript); build elements with React.createElement.","messagePattern":"client half failed to parse in this browser: (.+?)\nThe browser half is plain JavaScript \\(no JSX, no TypeScript\\); build elements with React\\.createElement\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-client-runner/src/client/evaluator.ts","lineNumber":186,"sourceCode":"  clientCode: string,\n  env: DynamicCordisClosureEnv,\n  styles: DynamicCordisStyles,\n): Promise<DynamicCordisEvaluatedPlugin | ((ctx: unknown) => unknown)> {\n  const traps = closureTraps()\n  const parameters = ['React', 'console', 'styles', 'host', 'harness', ...Object.keys(traps), 'process', 'Buffer']\n  let closure: (...args: unknown[]) => Promise<unknown>\n  try {\n    // The wrapper mirrors the host precheck exactly, so line offsets match.\n    // Evaluating a definition's browser half IS this package's product: the\n    // source arrived from a host process that accepted and prechecked it.\n    // oxlint-disable-next-line typescript/no-implied-eval -- see above\n    const factory = new Function(...parameters, `return (async () => {\\n${clientCode}\\n})()`)\n    closure = factory as (...args: unknown[]) => Promise<unknown>\n  } catch (error) {\n    if (!(error instanceof SyntaxError)) throw error\n    // Engine-divergence fallback: the host precheck already carried the\n    // line/caret teaching; browsers give only the message.\n    throw new Error(\n      `client half failed to parse in this browser: ${error.message}\\n`\n      + 'The browser half is plain JavaScript (no JSX, no TypeScript); build elements with React.createElement.',\n    )\n  }\n  const host = {\n    /**\n     * Call a host-half handler of THIS package (harness.handle pairing). A call\n     * with nothing to pass omits the argument: it arrives at the handler as\n     * `null`, because the wire carries JSON and `undefined` is not JSON —\n     * requiring `host.call('m', {})` would be a ritual, and defaulting to `{}`\n     * would invent an empty argument the caller never wrote.\n     */\n    call: (method: string, args: unknown = null): Promise<unknown> => env.invoke(method, args),\n  }\n  const returned = await closure(\n    React,\n    taggedConsole(pluginId, (message) => { env.noteError(message) }),\n    styles,","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-client-runner/src/client/evaluator.ts#L168-L204","documentation":"Error \"client half failed to parse in this browser: ${error.message}\nThe browser half is plain JavaScript (no JSX, no TypeScript); build elements with React.createElement.\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:186 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}