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

@astrojs/vercel with edge function target doesn't render 404.astro page #7735

Closed
1 task
susickypavel opened this issue Jul 20, 2023 · 5 comments
Closed
1 task
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: ssr Related to SSR (scope) pkg: vercel Related to Vercel adapter (scope)

Comments

@susickypavel
Copy link

susickypavel commented Jul 20, 2023

What version of astro are you using?

2.9.0

Are you using an SSR adapter? If so, which one?

Vercel

What package manager are you using?

pnpm

What operating system are you using?

Mac, Windows

What browser are you using?

Chrome, Firefox, Safari

Describe the Bug

Deployed app: https://astro-vercel-404-edge-bug.vercel.app/
Code: https://stackblitz.com/edit/github-z7x12r?file=src%2Fpages%2F404.astro

Astro website deployed on Vercel using edge adapter doesn't recognize 404.astro page and browser native 404 page is shown instead.

It works in development, it doesn't work on Vercel only. It doesn't matter whether the 404.astro is prerendered or not.

What's the expected result?

Navigating to a page that doesn't exist shows the content of 404.astro.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-z7x12r?file=src%2Fpages%2F404.astro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 20, 2023
@Princesseuh Princesseuh added - P4: important Violate documented behavior or significantly impacts performance (priority) feat: ssr Related to SSR (scope) pkg: vercel Related to Vercel adapter (scope) and removed needs triage Issue needs to be triaged labels Jul 20, 2023
@alanescarcha
Copy link

Bump!
It seems that in 2.8.0 it worked correctly.

@sahilsuman933
Copy link

@susickypavel, I believe this issue has been resolved in one of the latest PRs. If you visit https://gullible-galaxy.vercel.app/, you can see that the 404 page is rendering correctly.

@susickypavel
Copy link
Author

@susickypavel, I believe this issue has been resolved in one of the latest PRs. If you visit https://gullible-galaxy.vercel.app/, you can see that the 404 page is rendering correctly.

Can you provide stackblitz project? I'm running the latest version of Vercel adapter and Astro and still seeing this issue.

@sahilsuman933
Copy link

I am also experiencing the same issue in the latest version of Astro. However, I have not encountered any problems when linking to the Astro repository using "pnpm link astro" with all the latest pull requests merged. Therefore, please wait for the latest release, as it will address the issue. @susickypavel

// @Princesseuh Just to confirm again, can you test that from your end?

@matthewp
Copy link
Contributor

We have deprecated the Vercel Edge and Netlify Edge adapters due to compatibility issues and are encouraging people to instead use the serverless versions of these adapters, along with Edge Middleware, which we feel gives you the best of both worlds. Our adapter migration plan is laid out in this roadmap issue.

If you're still interested in deploying to these edge platforms I'd encourage you to build an adapter for it. You can use the edge adapter code as a starting point.

Closing as we are not planning on fixing edge adapter bugs (but will continue to support edge middleware).

@matthewp matthewp closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: ssr Related to SSR (scope) pkg: vercel Related to Vercel adapter (scope)
Projects
None yet
Development

No branches or pull requests

5 participants