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

[NEXT-1189] metadata not updated on navigation with experimental.serverActions set to true #49409

Closed
1 task done
TheEdoRan opened this issue May 7, 2023 · 15 comments · Fixed by #52005 or #52282
Closed
1 task done
Assignees
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. locked Metadata Related to Next.js' Metadata API.

Comments

@TheEdoRan
Copy link

TheEdoRan commented May 7, 2023

Verify canary release

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

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023
Binaries:
  Node: 18.16.0
  npm: 9.6.5
  Yarn: 1.22.19
  pnpm: 8.4.0
Relevant packages:
  next: 13.4.1
  eslint-config-next: 13.4.1
  react: 18.2.0
  react-dom: 18.2.0

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

App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js)

Link to the code that reproduces this issue

https://github.com/TheEdoRan/nextjs-metadata-bug

To Reproduce

  • Create a Next project
  • Set experimental.serverActions to true in next.config.js
  • Export metadata objects from pages
  • Use <Link> to navigate between them

Describe the Bug

When enabling experimental.serverActions flag in next.config.js, metadata updating on navigation breaks.
The first time you navigate to a page it works as it should, but then if you try again it breaks and meta tags stay the same.

Expected Behavior

Meta tags are updated on navigation.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

NEXT-1189

@TheEdoRan TheEdoRan added the bug Issue was opened via the bug report template. label May 7, 2023
@github-actions github-actions bot added area: app App directory (appDir: true) Metadata Related to Next.js' Metadata API. labels May 7, 2023
@TheEdoRan
Copy link
Author

After some tests, I found out that this bug first appeared in version 13.3.5-canary.6

@john-dufrene-dev
Copy link

Same bug for me with version 13.4

@switz

This comment was marked as spam.

@timneutkens timneutkens added the linear: next Confirmed issue that is tracked by the Next.js team. label May 17, 2023
@timneutkens timneutkens changed the title metadata not updated on navigation with experimental.serverActions set to true [NEXT-1189] metadata not updated on navigation with experimental.serverActions set to true May 17, 2023
@Josehower

This comment was marked as spam.

@timneutkens
Copy link
Member

timneutkens commented May 24, 2023

Tip: If the issue is open, it's unfortunately not fixed yet.

You don't have to add additional comments saying "Version x" has the same, because the issue is open, the special case is if the issue is fixed but still open, then it's useful to post a comment saying it has been fixed. Saying it still happens on an open issue needlessly pings everyone on the thread.

Alternatively you can provide additional reproductions if they're different from the initial post that provides a reproduction.

Thank you!

@naseef0
Copy link

naseef0 commented Jun 6, 2023

I have the same issue!

@almirjakubaitis
Copy link

I also have the same issue! - Using Next.js ("next": "^13.4.4",)

@FranzaLeny
Copy link

I also have the same issue! - Using Next.js ("next": "^13.4.6",)

@shuding
Copy link
Member

shuding commented Jun 25, 2023

This issue will be fixed by #51779.

It's not helpful to reply with "I also have this issue", for things that are already recognized as a bug with assignee. It won't help addressing the root cause, and will only increase the number of notifications for maintainers (so they spend more time reading them, and less time fixing the actual thing). To express the need of a fix you can react with an emoji (👍), or you can provide a helpful reproduction or even try to share you findings.

Thank you!

@karlhorky
Copy link
Contributor

karlhorky commented Jun 30, 2023

Since #51779 was closed, here's the new followup PR from @styfle:

@TheEdoRan
Copy link
Author

There's a commit after PR merge that reverts React update. Do we have to reopen this issue?

@TheEdoRan
Copy link
Author

May be fixed by #52282, not sure

@pat22292
Copy link

pat22292 commented Jul 7, 2023

v13.4.9 fixed the problem..

@TheEdoRan is right. thanks...

@houariDz95

This comment was marked as spam.

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. 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 Aug 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. locked Metadata Related to Next.js' Metadata API.
Projects
None yet