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

Vercel edge functions producing a null error from @sveltejs/kit next.433 #6308

Closed
SG60 opened this issue Aug 26, 2022 · 4 comments · Fixed by #6327
Closed

Vercel edge functions producing a null error from @sveltejs/kit next.433 #6308

SG60 opened this issue Aug 26, 2022 · 4 comments · Fixed by #6327

Comments

@SG60
Copy link
Contributor

SG60 commented Aug 26, 2022

Describe the bug

@sveltejs/kit next.433 (this PR: #6179) seems to have introduced a bug with Vercel edge functions. The edge functions consistently crash

Reproduction

  1. kit 433 with Vercel edge functions: https://github.com/SG60/kit-433-error/tree/36670af2556b9b832b4b7fc47be807a7bc120e0d
    this has an error
  2. kit 433 without edge functions: https://github.com/SG60/kit-433-error/tree/b2e212d73dd297ac54fece7ec8e834657b9967dc
    this works
  3. kit downgraded to 432 with Vercel edge functions: https://github.com/SG60/kit-433-error/tree/c02648f00e9d9812b4dfdaa74a00cab0f93c930e
    this works

Logs

(These are from Vercel's function logs)

TypeError: Cannot read properties of null (reading 'handleError')
    at ../../../../.svelte-kit/output/server/index.js:2455:27
    at ../../../../.svelte-kit/output/server/index.js:2404:12

[GET] / reason=EDGE_FUNCTION_INVOCATION_FAILED, status=500, user_error=true

System Info

Vercel

Severity

blocking an upgrade

Additional Information

No response

@mquandalle
Copy link

I had a similar issue and had to update the @sveltejs/vercel-adapter to fix it.

@SG60
Copy link
Contributor Author

SG60 commented Aug 26, 2022

Annoyingly I'm already using the newest version of vercel-adapter (next.68), so I don't think it's that.

@dennisregalado
Copy link

Using the newest version of the vercel-adapter & experiencing the same issue on Edge functions.

@jofan
Copy link

jofan commented Aug 26, 2022

I have the same issue with Vercel and Netlify adaptors. @mquandalle Any tips on how to fix it?

SG60 added a commit to SG60/kit that referenced this issue Aug 26, 2022
Rich-Harris added a commit that referenced this issue Aug 27, 2022
* Run server.init() for edge functions on Vercel.

Required since #6179.

Closes #6308.

* changeset

* changes

* remove async keyword

* Update .changeset/strong-kangaroos-work.md

* netlify edge functions

* changeset

Co-authored-by: Rich Harris <hello@rich-harris.dev>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
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 a pull request may close this issue.

4 participants