Bad Gateway for Custom Sandbox
Opened this issue · 4 comments
I'm experiencing difficulties while trying to set up and use a custom sandbox. Specifically:
After deploying a sandbox, I consistently receive a "Bad Gateway" error when attempting to access the artifact.
I did get this message when I created Sandbox
adduser: The home directory `/home/user' already exists. Not touching this directory.
adduser: Warning: The home directory `/home/user' does not belong to the user you are currently creating.
Postprocessing finished.
Could be the Dockerfile for nextjs template needs updating.
You also need to change the shadcn commands to
RUN npx shadcn-ui@latest init -d
RUN npx shadcn-ui@latest add --all
sahdcn-ui becomes shadcn in the latest version.
Steps To Reproduce
I think you can try building a new Sandbox using the nextjs template here and hopefully fix the issues by updating the Dockerfile.
Hi @btahir, I think the problem is you don't specify start_cmd
, so the nextjs servrer doens't start and when you try to access the port, it will return 502.
Could you please share your Dockerfile
+ e2b.toml
? It would be easier to me to help you then
I'm suspecting the server doesn't start for some reason.
You can also ssh into to your sandbox using E2B CLI:
e2b sbx spawn <template id>
to see what's going wrong there
I'm using the nextjs template so you can reproduce this just trying to create a new sandbox using the Dockerfile + compute.sh file there.
https://github.com/e2b-dev/ai-artifacts/tree/main/sandbox-templates/nextjs-developer