Artifact fails public sharing with generic error, private viewing works fine
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 4 comments · opened Jul 26, 2026
Summary
A published Artifact consistently fails when trying to share it publicly via the artifact page's own share menu, with this generic error:
This version can't be shared publicly. Publish a new version or change the shared version, then try again.
Private viewing of the artifact works correctly and fully — only the "share publicly" action fails.
Artifact details
- Rendered/published HTML size: ~13-14 MB
- Content: a self-contained design-system showcase page with:
- Several
<iframe srcdoc="...">blocks, each a fully self-contained nested HTML document (inlined CSS, inlined React/ReactDOM/Babel runtime, inlined component source) - A few small script payloads delivered as
atob()-decoded base64 strings executed vianew Function(...)(used specifically to safely embed JS source text that contained literal</scriptsequences, which would otherwise break HTML parsing if embedded as a literal inline<script>block) - One esbuild-bundled plain JS blob (~2MB, no ES modules/import maps) embedded as a plain inline
<script> - A handful of small
data:URIs (SVG images)
Steps to reproduce
- Publish a large (~13-14MB) self-contained HTML artifact using the Artifact tool in Claude Code.
- Open the artifact page, use the share menu, attempt to share publicly.
- Error appears: "This version can't be shared publicly. Publish a new version or change the shared version, then try again."
- Republish (including with a genuine, non-trivial content diff to force an actual new version) — error persists on retry.
- Also reproduced on a brand-new artifact URL (a straight copy of the same file, republished under a fresh path) — same error.
What we've tried
- Republishing multiple times, including with confirmed real content diffs (not just re-publishing identical content)
- Publishing the same content to a brand-new artifact URL — same failure
- Private viewing works perfectly every time; only the public-share action fails
Suspected causes (unconfirmed)
- A page-size limit for public sharing specifically (the ~13-14MB size is close to a documented 16 MiB rendered-page constraint, and public-share eligibility may enforce a stricter/different limit than private viewing)
- A stricter Content-Security-Policy for publicly-shared artifacts (e.g. blocking
unsafe-eval) that a validation pass silently rejects the version for, given thenew Function(...)usage described above — this wouldn't affect private viewing if private viewing runs under a more permissive CSP
Request
Could the actual validation failure reason be surfaced in the error message (size limit exceeded vs. CSP/content pattern rejected vs. something else)? Right now the generic message gives no actionable signal about which constraint is being hit or how to resolve it.
4 Comments
Additional confirmation: reproduced the identical error in a different browser and in incognito/private mode, ruling out any client-side caching or session-specific cause. The failure is consistent across browsers and sessions — this points to a server-side/platform-level constraint (size limit or CSP validation on public-share eligibility) rather than anything client-side.
Found what looks like the same bug already tracked elsewhere:
Both describe this as likely an account/session-level issue rather than per-artifact-version, which matches what we found here too: reducing the artifact from ~13.6MB to ~6.2MB (well under any documented size ceiling) did not resolve the sharing failure, and it reproduced identically across different browsers, incognito, and a completely fresh artifact URL. This suggests the earlier size/CSP theories in this issue are likely not the actual cause — probably safe to consolidate this as a duplicate of #79824.
Happened to me exactly the same also
Note: Below is output from Opus 5 Max, who suggested I be helpful and post this here:
Root cause found: an inline SVG data-URI in CSS silently blocks public sharing
I hit this same error and bisected it against the share check. The cause is not size and not
new Function— it's adata:image/svg+xmlURI in the page's CSS. A page containing onepublishes fine and renders fine privately, but the public-share toggle always fails with the
generic message.
Since this issue's description lists "small
data:URI SVG images" among its contents, Isuspect that's the actual trigger here rather than the 13–14 MB size.
Minimal reproducer
This ~200-byte page publishes, renders, but cannot be shared publicly:
Delete the
--grainline and the identical page shares successfully.Bisection
Each row is a separate published artifact, changing one variable at a time. "Shares" = the
public-share toggle succeeds. Every row rendered correctly when viewed privately.
Page Bytes Shares
Plain text + CSS, no script 1,024 yes
Minified script +
<canvas>+localStorage1,638 yesPlain text only 373,035 yes
Plain text only 392,026 yes
Plain text only 700,071 yes
Large ordinary script (number table + 2 functions) 660,085 yes
Web Audio graph (oscillator, gain, biquad, convolver, waveshaper, compressor) 2,380 yes
App markup + plain CSS 1,150 yes
App markup + app's full stylesheet, no script at all 73,879 no
The passing 1,150-byte page + only the
--graindata-URI line 1,451 noThe failing 73,879-byte page with only
--grainset tonone73,628 yesThe full app (minified) 380,637 no
The full app (unminified, i.e. larger) 648,345 no
The last three rows make the data-URI both sufficient (adding only that line to a passing
page breaks it) and necessary (removing only that line from a failing page fixes it).
Ruled out by test: page size, script volume, minification, Web Audio,
<canvas>,localStorage, markup, and page content generally. The page in question contains noeval,new Function,atob,Blob,Worker,WebAssembly,<iframe>, or any network call.Why this is worth fixing
The artifacts documentation actively recommends
the construct that breaks sharing — it says images should be "embedded as data URIs" and to
"prefer SVG or HTML/CSS for diagrams over embedded raster images." So the documented happy
path silently produces unshareable artifacts.
If rejecting SVG data-URIs is deliberate (SVG can carry
<script>, so it's a reasonable thingto be strict about), then the gap is in reporting rather than in the check itself. Either way,
the failure is currently undiagnosable from the UI: the message names no cause, and the two
suggested remedies — "publish a new version or change the shared version" — cannot help, since
every version of the page carries the same CSS.
Suggested fixes, in order of usefulness:
Name the offending construct in the error ("this page can't be shared publicly because its
CSS embeds an SVG data-URI"). That alone turns hours of bisection into a one-line fix.
Document the public-share content restrictions alongside the CSP notes, since they're
evidently stricter than the private-render rules.
Consider permitting script-free SVG data-URIs. The reproducer above is a
feTurbulencenoise filter — a purely decorative texture with no script content.
Workaround
Generate the texture into a
<canvas>at runtime and assign it to the same custom property,so no data-URI appears in the published file:
The runtime-generated data-URI is fine — only its presence in the published file matters. After
this change the same page shared successfully.
Note on #79824
That report describes the same error message on a Markdown file with a Mermaid fence, which
wouldn't contain an SVG data-URI at publish time. It may be a different cause, so it's probably
worth keeping the two separate until someone confirms.