nextjs - 💡(How to fix) Fix Client UI doesn't update after revalidatePath with Suspense and short promise [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#87529Fetched 2026-04-08 02:06:53
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
3
Timeline (top)
labeled ×2commented ×1cross-referenced ×1issue_type_added ×1

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.1.0: Mon Oct 20 19:33:00 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 12
Binaries:
  Node: 22.16.0
  npm: 11.6.2
  Yarn: N/A
  pnpm: 10.23.0
Relevant Packages:
  next: 16.1.1-canary.1 // Latest available version is detected (16.1.1-canary.1).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/TomLaVachette/next-short-promise-issue

To Reproduce

  1. Clone the repository and run npm install && npm run build && npm run start (⚠️ bug appears only in production mode)
  2. Open http://localhost:3000 in your browser
  3. Open the browser DevTools console to see client logs, and watch the terminal for server logs
  4. Click the "Increment" button (multiple time if needed)
  5. Observe the bug: The UI still shows counter: 0 even though:
  • Server logs show [Server Component] Rendering Home with counter: 1
  • Client logs show [Client Component] Rendering ClientComponent with counter: 1
  1. Click the "Toggle" button (which triggers a useState update)
  2. Observe: The counter now correctly displays 1

To verify the fix: Comment out the <Suspense><WaitingPromise /></Suspense> block in app/page.tsx (lines 25-27). The counter will now update correctly after clicking "Increment".

https://github.com/user-attachments/assets/10f90744-9b14-471a-8cbc-b5ed91cdb2ea

Current vs. Expected behavior

Current behavior: When a server action calls revalidatePath('/') on a page containing a very short async component (<5ms) wrapped in Suspense, the client UI does not update to reflect the new server state. The console logs prove that:

  • The server action completes successfully
  • The server re-renders the page with the updated counter value
  • The client component receives and logs the new counter value

Yet the DOM is not updated. The UI remains "stuck" showing stale data until any client-side state change (like toggling a useState) forces a re-render.

Expected behavior: After revalidatePath('/') completes, the client UI should update to display the new counter value (e.g., counter: 1) without requiring any manual intervention or client-side state change.

Key observation: The bug only occurs when a short-duration promise (~5ms) exists in a Suspense boundary. Removing the WaitingPromise component resolves the issue.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.1.0: Mon Oct 20 19:33:00 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 12
Binaries:
  Node: 22.16.0
  npm: 11.6.2
  Yarn: N/A
  pnpm: 10.23.0
Relevant Packages:
  next: 16.1.1-canary.1 // Latest available version is detected (16.1.1-canary.1).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

Not sure, Loading UI and Streaming, React

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

next start (local)

Additional context

I tested my reproduction against different releases, and the first one that introduced the bug was "v15.4.2-canary.20", since reverting to "v15.4.2-canary.19" works.

extent analysis

TL;DR

The issue can likely be fixed by updating the Next.js version or removing the short-duration promise from the Suspense boundary.

Guidance

  • Verify that the issue is indeed caused by the short-duration promise in the Suspense boundary by commenting out the <Suspense><WaitingPromise /></Suspense> block in app/page.tsx as suggested.
  • Try updating Next.js to a version later than 16.1.1-canary.1 to see if the issue is resolved, as the problem was introduced in v15.4.2-canary.20.
  • If updating Next.js is not feasible, consider increasing the duration of the promise in WaitingPromise to see if it resolves the issue.
  • Investigate other components that may be using similar short-duration promises in Suspense boundaries and refactor them to avoid this issue.

Example

No specific code snippet is provided as the issue is more related to the configuration and usage of Next.js and React.

Notes

The issue seems to be specific to the combination of Next.js, React, and the usage of short-duration promises in Suspense boundaries. The provided reproduction steps and environment information are helpful in identifying the root cause.

Recommendation

Apply a workaround by removing or increasing the duration of short-duration promises in Suspense boundaries, as updating to a fixed version of Next.js may not be immediately possible.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING