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

[🐛 Bug]: Request to ?_rsc=* returns 404 and app is no more SPA #542

Closed
1 task
fineshop opened this issue Nov 14, 2023 · 5 comments · Fixed by #550
Closed
1 task

[🐛 Bug]: Request to ?_rsc=* returns 404 and app is no more SPA #542

fineshop opened this issue Nov 14, 2023 · 5 comments · Fixed by #550
Labels
bug Something isn't working

Comments

@fineshop
Copy link

fineshop commented Nov 14, 2023

next-on-pages environment related information

System:
        Platform: linux
        Arch: x64
        Version: #1 SMP Thu Oct 5 21:02:42 UTC 2023
        CPU: (12) x64 AMD Ryzen 5 5500U with Radeon Graphics
        Memory: 3 GB
        Shell: /bin/bash
Package Manager Used: npm (10.1.0)

Relevant Packages:
        @cloudflare/next-on-pages: 1.7.3
        vercel: 32.5.5
        next: 14.0.3

Description

The app is making request to {url}/?_rsc={random_string} and it responses with 404 status code also navigating to other pages hard reloads the page when app is build using npx @cloudflare/next-on-pages.
Note that this issue only appears in production mode (built using npx @cloudflare/next-on-pages).

Here are screenshots of devtools:
In production mode (npx @cloudflare/next-on-pages):

image

image

image

In development mode (next dev) or production mode (next build && next start):

image

image

Reproduction

See: https://github.com/techwithdeo/next-pages-test

  1. git clone [email protected]:techwithdeo/next-pages-test.git
  2. cd next-pages-test
  3. npm install
  4. npm run pages:build
  5. npm run pages:serve
  6. Open DevTools
  7. Navigate to /contact

Works fine ✅ when:

  1. npm run build
  2. npm start

Pages Deployment Method

Not yet deployed

Pages Deployment ID

Not yet deployed

Additional Information

No response

Would you like to help?

  • Would you like to help fixing this bug?
@fineshop fineshop added the bug Something isn't working label Nov 14, 2023
@james-elicx
Copy link
Contributor

Are you able to provide a reproduction?

@fineshop
Copy link
Author

Are you able to provide a reproduction?

I have updated the issue.

@nicholasray
Copy link

I'm also experiencing this problem

@james-elicx
Copy link
Contributor

james-elicx commented Nov 19, 2023

Hi @fineshop @nicholasray, thank you for raising this. I have opened a PR that should fix this, and you are welcome to try out the prerelease in #550 (comment)

Thank you very much for providing the reproduction :)

@fineshop
Copy link
Author

Hi @fineshop @nicholasray, thank you for raising this. I have opened a PR that should fix this, and you are welcome to try out the prerelease in #550 (comment)

Thank you very much for providing the reproduction :)

Wow, it works fine now.

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

Successfully merging a pull request may close this issue.

3 participants