{"record":{"id":"3386a95ca8d8e2a1","repo":"saadeghi/daisyui","slug":"description","errorCode":null,"errorMessage":"${description}","messagePattern":"\\$\\{description\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/tailwind-play-share/index.mjs","lineNumber":442,"sourceCode":"\n  if (!page.webSocketDebuggerUrl) throw new Error(\"Chrome did not expose a page DevTools socket\")\n  return page.webSocketDebuggerUrl\n}\n\nasync function evaluate(client, expression) {\n  const response = await client.send(\"Runtime.evaluate\", {\n    awaitPromise: true,\n    expression,\n    returnByValue: true,\n    userGesture: true,\n  })\n\n  if (response.exceptionDetails) {\n    const description =\n      response.exceptionDetails.exception?.description ??\n      response.exceptionDetails.text ??\n      \"Unknown page evaluation error\"\n    throw new Error(description)\n  }\n\n  return response.result?.value\n}\n\nasync function waitForPageValue(client, expression, timeoutMs, label) {\n  const deadline = Date.now() + timeoutMs\n  let lastValue\n\n  while (Date.now() < deadline) {\n    lastValue = await evaluate(client, expression)\n    if (lastValue) return lastValue\n    await delay(100)\n  }\n\n  throw new Error(\n    `Timed out waiting for ${label}${lastValue ? `: ${JSON.stringify(lastValue)}` : \"\"}`,\n  )","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/saadeghi/daisyui/blob/42b09e637e09467aa54a813a5aea53c1179aec75/packages/tailwind-play-share/index.mjs#L424-L460","documentation":"Thrown by evaluate() after a Runtime.evaluate CDP round-trip returned exceptionDetails, meaning the JavaScript expression executed inside the page threw. The thrown Error carries the page exception's description (stack trace text), falling back to exceptionDetails.text, then a generic message.","triggerScenarios":"client.send(\"Runtime.evaluate\", { expression }) returns a response with response.exceptionDetails set. The expression is one of the internal DOM-probing scripts (editor detection, tab clicking, share clicking, share-state reading) or a clipboard capture hook.","commonSituations":"Tailwind Play's page DOM changed so an internal selector references an undefined object (e.g. globalThis.monaco is undefined and a chained call throws), the page navigated/errored mid-operation, or a content-security-policy blocked a hook. Because the expressions are baked into the script, this almost always means the live Tailwind Play UI no longer matches the script's assumptions.","solutions":["Update to the latest tailwind-play-share revision; the internal selectors track Tailwind Play's UI.","Run with --verbose and inspect stderr to see which evaluation failed and the page stack trace in the message.","raise --timeout so the page fully loads before the editor probes run.","Retry createTailwindPlay; transient page-load failures surface here."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  url = await createTailwindPlay(inputs)\n} catch (error) {\n  if (/Error: /.test(error.message) && error.stack?.includes(\"evaluate\")) {\n  // page-side JS threw; usually a UI-coupling break - report and retry once\n  }\n  throw error\n}","preventionTips":["Keep tailwind-play-share updated; internal selectors track Tailwind Play.","Run with --verbose to capture which evaluation threw and its page stack trace.","Give the page enough --timeout to finish loading before DOM probes run."],"tags":["cdp","runtime-evaluate","dom","browser-automation"],"backgroundTag":null,"analyzedSha":"42b09e637e09467aa54a813a5aea53c1179aec75","analyzedAt":"2026-08-13T04:10:09.555Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}