Thanks to visit codestin.com
Credit goes to github.com

Skip to content

router.refresh() causes 404 with basePath #64584

@MarkusWendorf

Description

@MarkusWendorf

Link to the code that reproduces this issue

https://github.com/MarkusWendorf/rsc-bug

To Reproduce

  1. npm run dev
  2. go to http://localhost:3000/path
  3. press "Refresh" button

Current vs. Expected behavior

After pressing "Refresh" you can see 2 rsc requests:

  • 1 with basePath
  • 1 without basePath (causing a 404)

Expected:

  • 1 request without a 404
Screenshot 2024-04-16 at 22 22 46

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.19
  pnpm: 8.15.4
Relevant Packages:
  next: 14.2.1 // Latest available version is detected (14.2.1).
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

App Router

Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions