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

Dynamic metadata and RSC causing loader to be hidden without a page to render. #65217

Open
felipedeboni opened this issue Apr 30, 2024 · 1 comment
Labels
bug Issue was opened via the bug report template. Metadata Related to Next.js' Metadata API.

Comments

@felipedeboni
Copy link

Link to the code that reproduces this issue

https://github.com/felipedeboni/next-rendering-bug

To Reproduce

  1. Navigate to https://next-rendering-bug.vercel.app/
  2. Click on "Works fine", the loading component shows up and later the page. No issues at all.
  3. Click on "Has issues", the loading component shows up, then everything is gone and then the page is rendered.

Current vs. Expected behavior

The expected behavior is the same as "Works fine".

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020
  Available memory (MB): 65536
  Available CPU cores: 12
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.21
  pnpm: 8.15.4
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A

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

Metadata, Partial Prerendering (PPR), Runtime

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

next dev (local), next build (local), next start (local), Vercel (Deployed)

Additional context

Looks like the bug was introduced in 14.2.1 - latest version it wasn't happening.

Additionally, it would be nice rendering loading.tsx when the first request to get metadata is sent and hiding it only when the request for the RSC finish.

@felipedeboni felipedeboni added the bug Issue was opened via the bug report template. label Apr 30, 2024
@github-actions github-actions bot added Metadata Related to Next.js' Metadata API. Partial Prerendering (PPR) Related to Partial Prerendering. Runtime Related to Node.js or Edge Runtime with Next.js. labels Apr 30, 2024
@samcx samcx removed Partial Prerendering (PPR) Related to Partial Prerendering. Runtime Related to Node.js or Edge Runtime with Next.js. labels May 2, 2024
@arxkdev
Copy link

arxkdev commented May 17, 2024

I'm having this exact problem, has anything been fixed or have you found a fix. Check this out:

To note: I'm not even using dynamic metadata, just simply using this:

export const metadata = {
   title: "Test",
   description: "Test"
}
d7f8c745cdd1479dc0bc169684eef309.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Metadata Related to Next.js' Metadata API.
Projects
None yet
Development

No branches or pull requests

3 participants