reactjs / reactjs/react.dev

"Unable to establish connection with the sandpack bundler" if inactive in the "Writing Markup with JSX" page.

Open
#6,429 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.8k
Forks
7.9k
Avg merge
1d 11h
Merged PRs (30d)
11

Description

In the page https://react.dev/learn/writing-markup-with-jsx , the first and last code editor blocks work fine, but if the original code is left unedited for about 40 seconds an "Unable to establish connection with the sandpack bundler" error is shown, and the only way to fix it is reloading the page or scrolling far away from the code editor and returning back to it.

This is how the page initially looks:
image

After about 40 seconds:
image

Note that if the code is edited in a way that there is no error, the issue doesn't occur.

I've noticed that this issue only occurs if there is an error in the code editor's code snippet but the mere existence of an error there doesn't guarantee the occurrence of the issue.

I've also noticed that using the same code snippet on other pages with code editors produces the same issue but only if I scroll away from the code editor and return back to it, so that the output of the code editor is loaded from scratch with said code snippet.

This issue occurs for me on both Edge and Chrome on windows, it also occurs on chrome for android (both in normal and incognito mode).

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

Start by reproducing the failure on the Writing Markup with JSX page using the first or last code editor block, leaving the original erroneous code untouched for about 40 seconds. Also test the behavior after scrolling away from an editor and returning to it, as described in the issue. Done means the editor no longer shows the Sandpack bundler connection error during these reported scenarios.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.