saadeghi/daisyui · error · Error

${description}

Error message

${description}

What it means

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.

Source

Thrown at packages/tailwind-play-share/index.mjs:442

  if (!page.webSocketDebuggerUrl) throw new Error("Chrome did not expose a page DevTools socket")
  return page.webSocketDebuggerUrl
}

async function evaluate(client, expression) {
  const response = await client.send("Runtime.evaluate", {
    awaitPromise: true,
    expression,
    returnByValue: true,
    userGesture: true,
  })

  if (response.exceptionDetails) {
    const description =
      response.exceptionDetails.exception?.description ??
      response.exceptionDetails.text ??
      "Unknown page evaluation error"
    throw new Error(description)
  }

  return response.result?.value
}

async function waitForPageValue(client, expression, timeoutMs, label) {
  const deadline = Date.now() + timeoutMs
  let lastValue

  while (Date.now() < deadline) {
    lastValue = await evaluate(client, expression)
    if (lastValue) return lastValue
    await delay(100)
  }

  throw new Error(
    `Timed out waiting for ${label}${lastValue ? `: ${JSON.stringify(lastValue)}` : ""}`,
  )

View on GitHub (pinned to 42b09e637e)

Solutions

  1. Update to the latest tailwind-play-share revision; the internal selectors track Tailwind Play's UI.
  2. Run with --verbose and inspect stderr to see which evaluation failed and the page stack trace in the message.
  3. raise --timeout so the page fully loads before the editor probes run.
  4. Retry createTailwindPlay; transient page-load failures surface here.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  url = await createTailwindPlay(inputs)
} catch (error) {
  if (/Error: /.test(error.message) && error.stack?.includes("evaluate")) {
  // page-side JS threw; usually a UI-coupling break - report and retry once
  }
  throw error
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of saadeghi/daisyui@42b09e637e (2026-08-13). Data as JSON: /api/errors/3386a95ca8d8e2a1. Report an issue: GitHub.