{"record":{"id":"45c41dbaca74309d","repo":"saadeghi/daisyui","slug":"timed-out-waiting-for-tailwind-play-to-create-a-sh","errorCode":null,"errorMessage":"Timed out waiting for Tailwind Play to create a share URL.${alertText}","messagePattern":"Timed out waiting for Tailwind Play to create a share URL\\.(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/tailwind-play-share/index.mjs","lineNumber":913,"sourceCode":"\n  while (Date.now() < deadline) {\n    lastState = await readShareState(client)\n    const candidates = [lastState.copied, ...lastState.values, lastState.href]\n    for (const candidate of candidates) {\n      const url = extractSharedUrl(candidate)\n      if (url && url !== initialUrl) return url\n    }\n\n    if (!clickedCopy && Date.now() + 500 < deadline) {\n      clickedCopy = await clickCopyControl(client)\n    }\n    await delay(150)\n  }\n\n  const alertText = lastState?.alerts?.length\n    ? ` Tailwind Play reported: ${lastState.alerts.join(\" \")}`\n    : \"\"\n  throw new Error(`Timed out waiting for Tailwind Play to create a share URL.${alertText}`)\n}\n\nexport async function createTailwindPlay({\n  browser,\n  css = \"\",\n  headed = false,\n  html = \"\",\n  timeoutMs = DEFAULT_TIMEOUT_MS,\n  verbose = false,\n}) {\n  if (typeof WebSocket !== \"function\") {\n    throw new Error(\n      \"This dependency-free script requires Node.js 22 or newer (global WebSocket support)\",\n    )\n  }\n\n  const log = (...values) => {\n    if (verbose) console.error(...values)","sourceCodeStart":895,"sourceCodeEnd":931,"githubUrl":"https://github.com/saadeghi/daisyui/blob/42b09e637e09467aa54a813a5aea53c1179aec75/packages/tailwind-play-share/index.mjs#L895-L931","documentation":"Thrown by waitForSharedUrl after polling readShareState until the deadline without any candidate (captured clipboard value, visible input containing play.tailwindcss.com, or location.href) yielding a share URL distinct from the initial URL. When Tailwind Play showed an alert, its text is appended.","triggerScenarios":"The share flow never produced a URL: clickShare ran but the clipboard hook captured nothing, no visible input/textarea held the URL, location.href did not change, and clickCopyControl (attempted once after 500ms) either did not find a Copy button or copying still yielded nothing, all before deadline.","commonSituations":"Tailwind Play's share mechanism changed (e.g. now opens a dialog the script does not read), clipboard permissions were not granted so __tailwindPlaySharedUrl stayed empty, the network round-trip to create the share timed out server-side, or timeoutMs is too short for the share backend.","solutions":["Raise --timeout substantially (share creation can be slow).","Ensure the browser granted clipboard permissions; the script requests Browser.grantPermissions but some Chrome builds ignore it - try --headed.","Update tailwind-play-share to track Tailwind Play's current share flow.","If an alert text is appended, read it - Tailwind Play may report the underlying error (e.g. content too large)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Confirm clipboard permission grant is likely (headed mode is more reliable).\nfunction shareLikely(options) {\n  return options.timeoutMs >= 30000\n}","typeGuard":null,"tryCatchPattern":"try {\n  url = await createTailwindPlay({ ...inputs, timeoutMs: 90000 })\n} catch (error) {\n  if (error.message.startsWith(\"Timed out waiting for Tailwind Play to create a share URL\")) {\n  // share backend/focus race; retry, and read any appended alert text\n  }\n  throw error\n}","preventionTips":["Use a generous --timeout; share creation can be slow.","Prefer --headed if clipboard grant is unreliable in headless.","Read any alert text in the message - Tailwind Play may report the cause."],"tags":["timeout","share","clipboard","tailwind-play"],"backgroundTag":null,"analyzedSha":"42b09e637e09467aa54a813a5aea53c1179aec75","analyzedAt":"2026-08-13T04:10:09.555Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}