{"record":{"id":"f6d027136ed39a1f","repo":"saadeghi/daisyui","slug":"could-not-find-tailwind-play-s-share-button-visib","errorCode":null,"errorMessage":"Could not find Tailwind Play's Share button. Visible controls: ${result?.labels?.join(\", \") || \"none\"}","messagePattern":"Could not find Tailwind Play's Share button\\. Visible controls: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/tailwind-play-share/index.mjs","lineNumber":838,"sourceCode":"            .map(normalize)\n            .some((value) => /\\bshare\\b/.test(value)),\n        );\n      if (!target) {\n        return {\n          ok: false,\n          labels: candidates\n            .map((element) => normalize(element.textContent || element.getAttribute(\"aria-label\")))\n            .filter(Boolean)\n            .slice(0, 30),\n        };\n      }\n      target.click();\n      return { ok: true };\n    })()`,\n  )\n\n  if (!result?.ok) {\n    throw new Error(\n      `Could not find Tailwind Play's Share button. Visible controls: ${result?.labels?.join(\", \") || \"none\"}`,\n    )\n  }\n}\n\nasync function readShareState(client) {\n  return evaluate(\n    client,\n    String.raw`(() => {\n      const visible = (element) => {\n        const rect = element.getBoundingClientRect();\n        const style = getComputedStyle(element);\n        return rect.width > 0 && rect.height > 0 && style.visibility !== \"hidden\" && style.display !== \"none\";\n      };\n      const values = [...document.querySelectorAll(\"input,textarea\")]\n        .filter(visible)\n        .map((element) => element.value)\n        .filter((value) => typeof value === \"string\" && value.includes(\"play.tailwindcss.com\"));","sourceCodeStart":820,"sourceCodeEnd":856,"githubUrl":"https://github.com/saadeghi/daisyui/blob/42b09e637e09467aa54a813a5aea53c1179aec75/packages/tailwind-play-share/index.mjs#L820-L856","documentation":"Thrown by clickShare when no visible button, anchor, or [role=button] matched any of the Share-button heuristics (aria-label/title equal to \"share\", text equal to/starting with \"share\", or a \\bshare\\b regex). The error lists up to 30 visible control labels so you can see what the toolbar actually contained.","triggerScenarios":"evaluate() in clickShare returns result.ok falsy because the candidates filter chain found no matching element, so it returns { ok: false, labels: [...] }.","commonSituations":"Tailwind Play renamed or restructured its Share control (e.g. moved it into a menu, changed the label/localized it), the toolbar had not rendered yet, or an A/B test changed the button.","solutions":["Update tailwind-play-share; the share-button matcher is coupled to Tailwind Play's toolbar markup.","Raise --timeout so the toolbar is present before the share click runs.","Run with --verbose/--headed and inspect the visible-control labels in the error.","Retry once; toolbar render races cause this."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  url = await createTailwindPlay(inputs)\n} catch (error) {\n  if (error.message.startsWith(\"Could not find Tailwind Play's Share button\")) {\n  // the message lists visible toolbar labels - compare against current UI\n  }\n  throw error\n}","preventionTips":["Update tailwind-play-share when Tailwind Play changes its toolbar.","Raise --timeout so the toolbar renders before the share click.","Use --verbose/--headed and inspect the listed visible control labels."],"tags":["dom","tailwind-play","share","browser-automation"],"backgroundTag":null,"analyzedSha":"42b09e637e09467aa54a813a5aea53c1179aec75","analyzedAt":"2026-08-13T04:10:09.555Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}