-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Server islands respond with 404 when deployed to vercel #12803
Comments
Hapenning to me as well!! |
I tried downgrading to 5.0.5 and I used the same src code with only difference being
|
I can reproduce the issue appearing past v5.0.5. Downgrading to 5.0.5 fixed the issue for me. In my |
updates on this? |
Side question but does ISR work for Server Islands? |
Vercel says
By this logic it should not because Server Island is loaded with searchParams but the same applies for static build and that works in 5.0.5. I tested in the most recent 5.1.2 and still the same results as in originaly reported 5.1.1. |
I've not had time to properly look into the root cause, but the breakage is due to the Even though the |
I can confirm that the issue also exists with Node adapter. Reference |
I can also confirm that this issue exists with the Node adapter on 5.1.2. I can provide a repro if needed. Update: still not working in 5.1.3 with the Node adapter. |
Related: withastro/adapters#457 (comment) |
@andrijantasevski can you provide a repro? I've tested locally and 5.1.3 seems to be working fine now |
Hello @Trombach. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
This is working again for me using Astro 5.1.3. Using the vercel adapter |
Here's a repository with a minimal repro: https://github.com/andrijantasevski/astro-server-islands Astro v5.1.3 |
Does it work for you if you also enable ISR in Vercel adapter? I tested the above minimal repo and it works with Vercel in both
|
I got server islands to work after tweaking the settings. With the node adapter, I had to add the property output: server in the astro config file. I also had to mark the page with the directive export const prerender = true. It would be great if the documentation could be updated with this information because I thought the compiler knows how to automatically render the islands dynamically without having to explicitly mark the pages as prerender/static. The Astro server islands example that is inspired by Next.js PPR needs to be updated as well because it is an older implementation that is based on the hybrid rendering, which I assume doesn't require us to explicitly mark the pages as prerendered with a SSR adapter. |
You shouldn't have to do those steps, so that sounds like a bug. I believe the docs are correct. I think you're seeing another issue tracked in #12744 @gtom84 I'll try to test my page with isr enabled later today |
I can confirm that this is also happening in my project, as you can see in this PR. Disclaimer: I have not looked into #12744, it's probably that issue instead... In order to repro:
|
It looks like the issue here is that we're adding the server-island route handler here: astro/packages/astro/src/core/routing/manifest/create.ts Lines 743 to 752 in 0770810
It depends on astro/packages/astro/src/integrations/hooks.ts Lines 330 to 332 in 0770810
The two code above belongs to the |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Sever islands have stopped working on vercel and the
_server-islands
route only responds with a 404 message. They still work fine in dev mode. I have deployed the provided minimal example to vercel here. Please note that theunused.astro
page is only there to work around another issue that exists with server-islands at the moment which is being tracked here #12744I believe the last version of Astro that didn't have this issue was 5.0.5, so this might have been introduced by the refactor in #12597. I have done a little bit of digging, but haven't been able to pin-point the error, but it does look like the server island endpoint is missing from the manifest.
I might be able to look into this more in the coming days
What's the expected result?
Server islands should work when deploying to vercel
Link to Minimal Reproducible Example
https://stackblitz.com/~/github.com/Trombach/withastro-astro-4hurafak
Participation
The text was updated successfully, but these errors were encountered: