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

Link pointing to built pages no longer works on canary #35135

Closed
1 task done
leo opened this issue Mar 8, 2022 · 2 comments · Fixed by #35344
Closed
1 task done

Link pointing to built pages no longer works on canary #35135

leo opened this issue Mar 8, 2022 · 2 comments · Fixed by #35344

Comments

@leo
Copy link
Contributor

leo commented Mar 8, 2022

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
    Arch: arm64
    Version: Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101
Binaries:
  Node: 16.14.0
  npm: 8.5.3
  Yarn: 1.22.17
  pnpm: 6.30.1
Relevant packages:
  next: 12.1.1-canary.7
  react: 18.0.0-rc.1
  react-dom: 18.0.0-rc.1

What browser are you using? (if relevant)

Chrome 98.0.4758.109

How are you deploying your application? (if relevant)

Vercel

Describe the Bug

With version 12.1.1-canary.7 of next, a Link pointing to a route on which you've initially entered the application longer does anything when clicked.

It's possible to reach any route via Link, just not the page on which you've loaded the app initially.

The URL in the address bar of the browser is set to the correct URL, but no page transition occurs. I also checked the console, but there aren't any errors. Same for the terminal.

Note that I'm using React Server Components on the Edge Runtime.

Expected Behavior

I'd expect a Link that points to a page on which I've loaded the app initially to still work.

To Reproduce

  1. On any page of your app, add a Link with href set to any other route
  2. Stop your devserver
  3. Clean your cache with rm -rf .next (just to be sure)
  4. Start your devserver
  5. Load the app on the URL that you've defined as href for the Link
  6. Navigate to the route that contains the Link
  7. Click the Link
  8. Notice that the URL in the address bar changes to the value of href, but no page transition occurs.
@leo leo added the bug Issue was opened via the bug report template. label Mar 8, 2022
@leo leo changed the title Link pointing to / no longer works with 12.1.1-canary.7 Link pointing to certain pages no longer works with 12.1.1-canary.7 Mar 8, 2022
@leo leo changed the title Link pointing to certain pages no longer works with 12.1.1-canary.7 Link pointing to built pages no longer works on canary Mar 8, 2022
@leo
Copy link
Contributor Author

leo commented Mar 8, 2022

After further investigation, it seems that the problem isn't / specifically, it's more so that any page on which you've initially loaded the app is impossible to transition to, on the client-side.

I've updated the bug explanation and the steps for reproducing it.

@huozhi huozhi added kind: bug and removed bug Issue was opened via the bug report template. labels Mar 15, 2022
@kodiakhq kodiakhq bot closed this as completed in #35344 Mar 16, 2022
kodiakhq bot pushed a commit that referenced this issue Mar 16, 2022
### Bugfix
Made some changes for the data register buffer flushing in #34631 and #34475 that tried to delete the buffer or flush them only once. But turns out it will break the navigation between RSC pages.


### Enhancements
Simplify the inline response writer and inline response data for the initial render. Since they're only for the initial render, navigations will leverage the serialized data fetched from router and construct the react tree.


## Bug

Fixes #35135

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants