saadeghi/daisyui · error · Error
Timed out waiting for Tailwind Play to create a share URL.${
Error message
Timed out waiting for Tailwind Play to create a share URL.${alertText} What it means
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.
Source
Thrown at packages/tailwind-play-share/index.mjs:913
while (Date.now() < deadline) {
lastState = await readShareState(client)
const candidates = [lastState.copied, ...lastState.values, lastState.href]
for (const candidate of candidates) {
const url = extractSharedUrl(candidate)
if (url && url !== initialUrl) return url
}
if (!clickedCopy && Date.now() + 500 < deadline) {
clickedCopy = await clickCopyControl(client)
}
await delay(150)
}
const alertText = lastState?.alerts?.length
? ` Tailwind Play reported: ${lastState.alerts.join(" ")}`
: ""
throw new Error(`Timed out waiting for Tailwind Play to create a share URL.${alertText}`)
}
export async function createTailwindPlay({
browser,
css = "",
headed = false,
html = "",
timeoutMs = DEFAULT_TIMEOUT_MS,
verbose = false,
}) {
if (typeof WebSocket !== "function") {
throw new Error(
"This dependency-free script requires Node.js 22 or newer (global WebSocket support)",
)
}
const log = (...values) => {
if (verbose) console.error(...values)View on GitHub (pinned to 42b09e637e)
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).
Defensive patterns
Strategy: retry
Validate before calling
// Confirm clipboard permission grant is likely (headed mode is more reliable).
function shareLikely(options) {
return options.timeoutMs >= 30000
} Try / catch
try {
url = await createTailwindPlay({ ...inputs, timeoutMs: 90000 })
} catch (error) {
if (error.message.startsWith("Timed out waiting for Tailwind Play to create a share URL")) {
// share backend/focus race; retry, and read any appended alert text
}
throw error
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Could not find Tailwind Play's Share button. Visible control
- --timeout must be a positive number of milliseconds
- Timed out while starting Chrome's DevTools server
- Timed out waiting for ${label}${lastValue ? `: ${JSON.string
- Could not find Tailwind Play's ${label} editor tab
AI-assisted analysis of saadeghi/daisyui@42b09e637e (2026-08-13).
Data as JSON: /api/errors/45c41dbaca74309d.
Report an issue: GitHub.