codesandbox / codesandbox/codesandbox-client

Regression: New /p/sandbox URLs fail to embed in Medium

Open
#8,884 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project
    adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

Newly created or forked CodeSandbox sandboxes no longer embed correctly in Medium when using the normal CodeSandbox share URL.

Medium has been able to generate CodeSandbox embeds by pasting a plain share URL directly into the Medium editor, for example:

https://codesandbox.io/p/sandbox/s6-codeexample-01-testing-7pdnnj

This was still working recently. My last published Medium story with a working CodeSandbox embed was published on April 28, 2026.

However, newly created or forked sandboxes now fail to embed correctly in Medium. Older sandboxes still work.

I also noticed that newly created sandboxes do not appear to generate preview thumbnails, which may suggest the issue is related to preview metadata, oEmbed/Embedly discovery, thumbnail generation, or embed compatibility for newly created sandboxes.

This may be related to #8876 and/or #8881, but this case is slightly different because Medium is using the normal CodeSandbox share URL, not a manually created iframe or /api/v1/sandboxes/define URL. The issue also seems specific to newly created or forked sandboxes, while older sandboxes still embed correctly.

Image

How has this issue affected you? What are you trying to accomplish?

I publish technical articles on Medium and use CodeSandbox embeds to provide interactive code examples for readers.

This regression blocks publishing new articles because newly created examples no longer render as embedded sandboxes in Medium.

The expected behavior is that pasting a public CodeSandbox share URL into Medium should generate the usual interactive CodeSandbox embed, as it did before.

To Reproduce

  1. Create a new CodeSandbox sandbox, or fork an existing sandbox that previously embedded correctly in Medium.
  2. Copy the normal CodeSandbox share URL.
  3. Paste the share URL directly into a Medium story.
  4. Wait for Medium to generate the embed preview.
  5. The expected interactive CodeSandbox embed is not generated.
Failing newly created or forked sandboxes

These do not embed correctly in Medium:

  1. https://codesandbox.io/p/sandbox/s6-codeexample-02-r2lgpd

    • Forked from a sandbox that previously worked in Medium
  2. https://codesandbox.io/p/sandbox/s6-codeexample-01-t24sj2

    • Forked from a sandbox that previously worked in Medium
  3. https://codesandbox.io/p/sandbox/s6-codeexample-01-testing-7pdnnj

    • New sandbox with the same content as sandbox 2
Working older sandboxes

These still embed correctly in Medium:

  1. https://codesandbox.io/p/sandbox/s5-codeexample-01-rnysgl

  2. https://codesandbox.io/p/sandbox/s3-codeexample-01-7mnhg6

Additional observation

Newly created sandboxes also appear not to generate preview thumbnails.

Older sandboxes still show thumbnails and continue to embed correctly in Medium.

Link to sandbox: link (optional)
Your Environment
Software Name/Version
Сodesandbox Web / Projects sandbox URLs using /p/sandbox/...
Browser Chrome / Safari
Operating System macOS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by comparing embed discovery, preview metadata, and thumbnail behavior for the listed newly created or forked URLs versus the working older URLs. Done means pasting a public /p/sandbox share URL into Medium produces the expected interactive CodeSandbox embed.

Written by the indexing model from the issue text.

Assessment

Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.