You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportconstgenerateMetadata=async(): Promise<Metadata>=>{awaitfetch("http://localhost:8080/graphql",{cache: "force-cache"});return{title: "Create Next App",description: "Generated by create next app"};};
Current vs. Expected behavior
Loaded home page.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.0.0: Mon Aug 12 21:27:51 PDT 2024; root:xnu-11215.1.10~5/RELEASE_ARM64_T6020
Available memory (MB): 16384
Available CPU cores: 12
Binaries:
Node: 20.11.0
npm: 10.2.4
Yarn: N/A
pnpm: 9.5.0
Relevant Packages:
next: 15.0.0-canary.130 // Latest available version is detected (15.0.0-canary.130).
eslint-config-next: 15.0.0-canary.130
react: 19.0.0-rc-eb3ad065-20240822
react-dom: 19.0.0-rc-eb3ad065-20240822
typescript: 5.5.4
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Metadata
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
When fetch has "force-cache" inside generateMetadata() and API has fetch error then page will have infinite loading.
exportconstgenerateMetadata=async(): Promise<Metadata>=>{awaitfetch("http://localhost:8080/graphql",{cache: "force-cache"});return{title: "Create Next App",description: "Generated by create next app"};};
It happens from 15.0.0-canary.111+. 15.0.0-canary.110 works fine.
The text was updated successfully, but these errors were encountered:
aXenDeveloper
changed the title
Infinite loading page when fetch has "force-cache" in generateMetadata layout.tsx
[15.0.0-canary.111+] Infinite loading page when fetch has "force-cache" in generateMetadata layout.tsx
Aug 26, 2024
Link to the code that reproduces this issue
https://github.com/aXenDeveloper/next-app-canary
To Reproduce
pnpm i
,pnpm dev
or
pnpm create next-app@canary
src/app/layout.tsx
replacemetadata
to:Current vs. Expected behavior
Loaded home page.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.0.0: Mon Aug 12 21:27:51 PDT 2024; root:xnu-11215.1.10~5/RELEASE_ARM64_T6020 Available memory (MB): 16384 Available CPU cores: 12 Binaries: Node: 20.11.0 npm: 10.2.4 Yarn: N/A pnpm: 9.5.0 Relevant Packages: next: 15.0.0-canary.130 // Latest available version is detected (15.0.0-canary.130). eslint-config-next: 15.0.0-canary.130 react: 19.0.0-rc-eb3ad065-20240822 react-dom: 19.0.0-rc-eb3ad065-20240822 typescript: 5.5.4 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Metadata
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
When fetch has "force-cache" inside
generateMetadata()
and API has fetch error then page will have infinite loading.It happens from
15.0.0-canary.111
+.15.0.0-canary.110
works fine.The text was updated successfully, but these errors were encountered: