Skip to content

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

@TheEdoRan

Description

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

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