codesandbox / codesandbox/codesandbox-client

When the API returns 404 Sandbox not found, the page shows a Loading skeleton forever.

Open
#8,351 1 comment 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

Console shows 404 on the following API URL:

https://codesandbox.io/api/v1/sandboxes/lexical-plain-text-example-g932e

When the API returns the following response with an HTTP 404 status,

{
    "error": "Sandbox not found"
}

the Codesandbox website gets stuck showing "Loading" screen forever.

image

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

Trying to view Lexical example. Apparently the sandbox is deleted or something, but Codesandbox just shows a Loading skeleton forever, which is confusing at first glance.

It should show "This sandbox doesn't exist." or a similar message. Additional elements like a link to the home page, a "Create a new sandbox" button or a list of suggested sandboxes are up to you.

To Reproduce

Try this publicly linked Lexical Plain Text Sandbox from the Lexical docs page here. Or try the link to any sandbox that was removed.

Link to sandbox: link (optional)
Your Environment
Software Name/Version
Сodesandbox ? (Web version)
Browser Chrome 121.0.6167.184 (Official Build) (arm64) / Edge 121.0.2277.128 (Official build) (arm64)
Operating System macOS Sonoma 14.2.1 (23C71)

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

Reproduce the issue using the linked Lexical Plain Text Sandbox and inspect the frontend request handling for the /api/v1/sandboxes/lexical-plain-text-example-g932e 404 response. The work is done when a missing sandbox displays a clear message such as "This sandbox doesn't exist" instead of remaining on the Loading skeleton.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.