Skip to content

fix: call sandbox.start() before using container#292

Open
amit183239 wants to merge 1 commit intocloudflare:mainfrom
amit183239:fix/missing-sandbox-start-291
Open

fix: call sandbox.start() before using container#292
amit183239 wants to merge 1 commit intocloudflare:mainfrom
amit183239:fix/missing-sandbox-start-291

Conversation

@amit183239
Copy link

@amit183239 amit183239 commented Feb 25, 2026

Fixes #291

Summary

  • getSandbox() returns a sandbox instance but does not boot the container
  • Any call to containerFetch() or wsConnect() before start() throws: The container is not running, consider calling start()
  • Added await sandbox.start() in the sandbox middleware — it is idempotent so calling it on every request is safe

Fixes cloudflare#291

getSandbox() returns a sandbox instance but does not boot the
container. Any call to containerFetch() or wsConnect() before
start() results in:

  Error: The container is not running, consider calling start()

Adding await sandbox.start() in the sandbox middleware fixes this.
start() is idempotent so calling it on every request is safe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container not started before containerFetch: missing sandbox.start() call

1 participant