vercel / next.js

The React Framework
https://nextjs.org
MIT License
126.52k stars 26.92k forks source link

Failed to fetch RSC payload. Falling back to browser navigation. #53813

Open dan2kx opened 1 year ago

dan2kx commented 1 year ago

Verify canary release

Provide environment information

Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64
    Binaries:
      Node: 18.12.1
      npm: 8.19.2
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.14-canary.1
      eslint-config-next: 13.4.12
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: standalone

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

https://github.com/vercel/next.js/pull/46674

To Reproduce

Create a server component/layout/page/api/middleware that redirects to an external URL

Describe the Bug

Next tries to fetch the page (using the fetch api) and fails and then falls back to using browser naviation.

this happens with Request or NextRequest

Expected Behavior

Next should identify external links automatically or provide a way for them to be identified/handled differently, which would then not attempt to fetch and just allow the server to respond with a redirect header

This issue was addressed in #46674, but the functionality added was to add the fallback to browser navigation, i do not think the initial fetch to the external site should be made avoiding latency and the error being thrown

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

subhasish-smiles commented 1 year ago

Same issue I'm facing

pongbao commented 11 months ago

I'm also having this issue

Webappmaster-Eugene commented 11 months ago

Hello! And I'm also having this issue!

landsman commented 8 months ago

Same

Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!

s3822042 commented 4 months ago

I am having same issue

Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!

bdrtsky commented 3 months ago

Why the hell issue still exist? How to handle such usecases? Have same error with Lucia GitHub auth, I am redirecting in Route Handler.