Failed to get shell by ID
Bug report
When use sandpack-client node runtime report error: "Failed to get shell by ID "cltwbor280000039o2o15eqbw"
Packages affected
- [x] sandpack-client
- [ ] sandpack-react
Description of the problem
When use sandpack-client node runtime report error: "Failed to get shell by ID "cltwbor280000039o2o15eqbw"
What were you doing when the problem occurred?
please see the example sandbox link ⚠️ Open devtools and wait for a few seconds to view the log output. The error message is displayed on the last line
What steps can we take to reproduce the problem?
Link to sandbox: link (optional)
Your Environment
| Software | Name/Version |
|---|---|
| Sandpack-client version | 2.13.2 |
| Sandpack-react version | 2.13.2 |
| Browser | Chrome 122.0.6261.112 (Official Build) (arm64) |
| Operating System | macos 14.3.1 |
Experiencing the same issue,
I believe something has gone wrong server-side, potentially. Live example here https://www.hypermod.io/sandbox
@CompuIves potentially related to #1229 🙏
Interesting... I see a request going to https://3h13fdz-3000.localhost/__csb_bridge/index.html, I don't think it should go to localhost, we normally have a service worker that "catches" the request and then serves something different, but we cannot catch localhost. So we might be detecting the domain wrong, or it could be wrongly configured. I have time this Friday to take a closer look at that!
Thanks for having a look @CompuIves 🙏, LMK what you find. It's happening in prod as well, so not sure how localhost is even getting involved here 🤔.
I'm on latest version of sandpack-react and im using a custom node.js template. If this info helps you narrow it down.
I just checked out an old commit from when the project was definitely stable and I'm still seeing the issue, which suggests there may be some sort of change on the server that sandpack calls out to triggering this 🤔
I can repro, looking for a fix now.
You're a legend @CompuIves 🚀
Fix is live! It's a temporary fix, though, will now work on a more permanent fix :)
Also found the underlying issue, will deploy permanent fix in a moment.
Okay, long-term fix is now live!