microsoft/playwright · error · TypeError

Negative ticks are not supported

Error message

Negative ticks are not supported

What it means

Error "Negative ticks are not supported" thrown in microsoft/playwright.

Source

Thrown at packages/injected/src/clock.ts:172

    if (this._now.ticks > to) {
      // While running timers, `now` can advance by syncing with real time
      // from within now() or performance.now().
      // This makes it possible for `now` to be ahead of where we want to advance it.
      return;
    }
    if (!this._now.isFixedTime)
      this._now.time = asWallTime(this._now.time + to - this._now.ticks);
    this._now.ticks = to;
  }

  async log(type: LogEntryType, time: number, param?: number) {
    this._log.push({ type, time, param });
  }

  async runFor(ticks: number) {
    this._replayLogOnce();
    if (ticks < 0)
      throw new TypeError('Negative ticks are not supported');
    await this._runWithDisabledRealTimeSync(async () => {
      await this._runTo(shiftTicks(this._now.ticks, ticks));
    });
  }

  private async _runTo(to: Ticks) {
    to = Math.ceil(to) as Ticks;

    if (this._now.ticks > to)
      return;

    let firstException: Error | undefined;
    while (true) {
      const result = await this._callFirstTimer(to);
      if (!result.timerFound)
        break;
      firstException = firstException || result.error;
    }

View on GitHub (pinned to c8fc3bf8d3)

When it happens

Trigger: Thrown at packages/injected/src/clock.ts:172 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of microsoft/playwright@c8fc3bf8d3 (2026-08-12). Data as JSON: /api/errors/554317c155a3e0da. Report an issue: GitHub.