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

Error running code on Vercel edge environment #531

Open
olefirenko opened this issue Jan 9, 2025 · 6 comments
Open

Error running code on Vercel edge environment #531

olefirenko opened this issue Jan 9, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@olefirenko
Copy link

I got this error when running the code on Vercel edge:


SandboxError: 2: [unknown] Invalid redirect value, must be one of "follow" or "manual" ("error" won't be implemented since it does not make sense at the edge; use "manual" and check the response status code).
    at (node_modules/e2b/dist/index.mjs:319:15)
    at (node_modules/e2b/dist/index.mjs:1421:14)
    at (node_modules/e2b/dist/index.mjs:32:29) {
  name: 'SandboxError'
}

When I run the code locally it works fine, no issues. The code is creating the Word docx file and then I am trying to download it.

The library version is 1.0.4.

Copy link

linear bot commented Jan 9, 2025

@mishushakov
Copy link
Member

Would you be able to proceed without using the edge function? Is that a hard requirement?

@olefirenko
Copy link
Author

We use it to stream responses from the LLM when tools are in use. I believe it is a very common and recommended environment by Vercel for handling streaming. Thank you for support!

@linear linear bot added the bug Something isn't working label Jan 10, 2025
@jakubno
Copy link
Member

jakubno commented Jan 13, 2025

Hey @olefirenko, after looking into it, it seems the package we're using for RPC isn't compatible with the edge environment. This was discussed in this thread: connectrpc/connect-es#1082. I've tried reaching out there, but haven't received a response yet. It looks like we might need to address this ourselves. How urgent is this issue for you?

@olefirenko
Copy link
Author

@jakubno Thanks a lot for looking into this. Not very urgent. Take your time and thanks for a great support!

@mishushakov
Copy link
Member

Meanwhile, if this becomes a blocker - you might consider switching to the regular (non-edge) runtime.

I will also verify and document runtimes that are working with our SDK and for the ones which don't, I will explain the cause and offer mitigation steps. Thank you for your help here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants