Creating a Sandbox with more than 1 port exposed throws errors

Hey,

I was trying to use the new Sandboxes and found out that exposing 2 ports at the same time throws an error.

The following code throws an unexpected internal server error:

// Create sandbox with a simple Next.js example
const sandbox = await Sandbox.create({
  source: {
    type: "git",
    url: "https://github.com/vercel/sandbox-example-next.git",
  },
  resources: { vcpus: 4 },
  timeout: ms("5m"),
  ports: [3000, 1234],
  runtime: "node22",
});

The error I am getting is:

‘{“error”:{“code”:“internal_server_error”,“message”:“An unexpected internal error occurred”}}’

Everything works well with just 1 port exposed. Thanks in advance for any input on that topic!

Has anybody achieved exposing 2 ports for the sandbox yet?

I am still looking for a solution or help for this one.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.