Skip to content

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

Description

@TheEdoRan

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

Activity

  1. added
    bugIssue was opened via the bug report template.
    on May 7, 2023
  2. TheEdoRan commented on May 10, 2023

    @TheEdoRan
    Author

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

  3. john-dufrene-dev commented on May 11, 2023

    @john-dufrene-dev

    Same bug for me with version 13.4

  4. switz commented on May 14, 2023

    @switz
  5. 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[/+] on May 17, 2023
  6. Josehower commented on May 23, 2023

    @Josehower
  7. timneutkens commented on May 24, 2023

    @timneutkens
    Contributor

    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!

  8. naseef0 commented on Jun 6, 2023

    @naseef0

    I have the same issue!

  9. almirjakubaitis commented on Jun 15, 2023

    @almirjakubaitis

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

  10. FranzaLeny commented on Jun 17, 2023

    @FranzaLeny

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

  11. shuding commented on Jun 25, 2023

    @shuding
    Member

    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!

  12. karlhorky commented on Jun 30, 2023

    @karlhorky
    Contributor

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

  13. added a commit that references this issue on Jul 4, 2023
    9e4b87d
  14. TheEdoRan commented on Jul 4, 2023

    @TheEdoRan
    Author

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

  15. TheEdoRan commented on Jul 5, 2023

    @TheEdoRan
    Author

    May be fixed by #52282, not sure

  16. added a commit that references this issue on Jul 6, 2023
    6dafc42
  17. pat22292 commented on Jul 7, 2023

    @pat22292

    v13.4.9 fixed the problem..

    @TheEdoRan is right. thanks...

  18. added a commit that references this issue on Jul 8, 2023
    1ae3f42
  19. houariDz95 commented on Aug 5, 2023

    @houariDz95
  20. github-actions commented on Aug 20, 2023

    @github-actions
    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.

  21. locked as resolved and limited conversation to collaborators on Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

MetadataRelated to Next.js' Metadata API.bugIssue was opened via the bug report template.linear: nextConfirmed issue that is tracked by the Next.js team.locked

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions