vercel/next.js · error

Next.js cannot guarantee that Cache Components will run as e

Error message

Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of `setTimeout()`.\nPlease report a github issue here: https://github.com/vercel/next.js/issues/new/

What it means

Error "Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of `setTimeout()`.\nPlease report a github issue here: https://github.com/vercel/next.js/issues/new/" thrown in vercel/next.js.

Source

Thrown at packages/next/src/server/app-render/app-render-scheduling.ts:93

We can guarantee that multiple timers (with the same delay, usually `0`)
run together without any delays by making sure that their `_idleStart`s are the same,
because that's what's used to determine if a timer should be deferred or not.
Luckily, this property is currently exposed to userland and mutable,
so we can patch it.

Another related trick we could potentially apply is making
a timer immediately be considered expired by doing  `timer._idleStart -= 2`.
(the value must be more than `1`, the delay that actually gets set for `setTimeout(cb, 0)`).
This makes node view this timer as "a 1ms timer scheduled 2ms ago",
meaning that it should definitely run in the next timer phase.
However, I'm not confident we know all the side effects of doing this,
so for now, simply ensuring coordination is enough.
*/

let shouldAttemptPatching = true

function warnAboutTimers() {
  console.warn(
    "Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of `setTimeout()`.\nPlease report a github issue here: https://github.com/vercel/next.js/issues/new/"
  )
}

/**
 * Allows scheduling multiple timers (equivalent to `setTimeout(cb, delayMs)`)
 * that are guaranteed to run in the same iteration of the event loop.
 *
 * @param delayMs - the delay to pass to `setTimeout`. (default: 0)
 *
 * */
export function createAtomicTimerGroup(delayMs = 0) {
  if (process.env.NEXT_RUNTIME === 'edge') {
    throw new InvariantError(
      'createAtomicTimerGroup cannot be called in the edge runtime'
    )
  } else {
    let isFirstCallback = true

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Run on a standard Node.js runtime with correct setTimeout semantics, or report the issue to Next.js.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/next/src/server/app-render/app-render-scheduling.ts:93 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/f2490a1194036f9f. Report an issue: GitHub.