{"record":{"id":"554317c155a3e0da","repo":"microsoft/playwright","slug":"negative-ticks-are-not-supported","errorCode":null,"errorMessage":"Negative ticks are not supported","messagePattern":"Negative ticks are not supported","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/injected/src/clock.ts","lineNumber":172,"sourceCode":"    if (this._now.ticks > to) {\n      // While running timers, `now` can advance by syncing with real time\n      // from within now() or performance.now().\n      // This makes it possible for `now` to be ahead of where we want to advance it.\n      return;\n    }\n    if (!this._now.isFixedTime)\n      this._now.time = asWallTime(this._now.time + to - this._now.ticks);\n    this._now.ticks = to;\n  }\n\n  async log(type: LogEntryType, time: number, param?: number) {\n    this._log.push({ type, time, param });\n  }\n\n  async runFor(ticks: number) {\n    this._replayLogOnce();\n    if (ticks < 0)\n      throw new TypeError('Negative ticks are not supported');\n    await this._runWithDisabledRealTimeSync(async () => {\n      await this._runTo(shiftTicks(this._now.ticks, ticks));\n    });\n  }\n\n  private async _runTo(to: Ticks) {\n    to = Math.ceil(to) as Ticks;\n\n    if (this._now.ticks > to)\n      return;\n\n    let firstException: Error | undefined;\n    while (true) {\n      const result = await this._callFirstTimer(to);\n      if (!result.timerFound)\n        break;\n      firstException = firstException || result.error;\n    }","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/injected/src/clock.ts#L154-L190","documentation":"Error \"Negative ticks are not supported\" thrown in microsoft/playwright.","triggerScenarios":"Thrown at packages/injected/src/clock.ts:172 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}