Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when Sandpack times out after initial error #1063

Open
2 tasks done
andrico1234 opened this issue Jan 17, 2024 · 0 comments
Open
2 tasks done

Issues when Sandpack times out after initial error #1063

andrico1234 opened this issue Jan 17, 2024 · 0 comments
Labels
bug Something isn't working triage New issues that needs consideration

Comments

@andrico1234
Copy link

Bug report

Here's a Loom showing the issue: https://www.loom.com/share/a25be0d744c54974bc08d65e041b9f08

Here's a simple repro case showing this problem: https://github.com/andrico1234/sandpack-react-repro

Packages affected

  • sandpack-client
  • sandpack-react

Description of the problem

It looks like there are a few problems at play here:

  1. If Sandpack times out while loading and the error overlay is displayed, there's no way for the user to know that Sandpack is disconnected. As a result any further changes that the user makes will not cause the preview to update with the new changes
  2. The "restart" sandpack button doesn't work. If the loading times out and the Sandpack disconnects, triggering a restart just causes a blank screen.

Steps to reproduce:

  1. Create a Sandpack in such a way that there's a compilation error before the first load
  2. Wait for Sandpack loading time out (~45 seconds)
  3. Move/Hide the error overlay (don't remove it from the DOM otherwise it will cause a different error)
  4. Click "restart sandpack"
  5. Observe the broken state

What were you doing when the problem occurred?

What steps can we take to reproduce the problem?

Link to sandbox: link (optional)

Your Environment

Software Name/Version
Sandpack-client version 2.11.2
Sandpack-react version 2.11.2
Browser Arc
Operating System MacOS
@andrico1234 andrico1234 added bug Something isn't working triage New issues that needs consideration labels Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issues that needs consideration
Projects
None yet
Development

No branches or pull requests

1 participant