{"record":{"id":"b0dccb39807679bd","repo":"microsoft/playwright","slug":"cannot-fast-forward-to-the-past","errorCode":null,"errorMessage":"Cannot fast-forward to the past","messagePattern":"Cannot fast-forward to the past","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/injected/src/clock.ts","lineNumber":286,"sourceCode":"\n    await this._innerPause();\n    try {\n      await fn();\n    } finally {\n      this._innerResume();\n    }\n  }\n\n  async fastForward(ticks: number) {\n    this._replayLogOnce();\n    await this._runWithDisabledRealTimeSync(async () => {\n      await this._innerFastForwardTo(shiftTicks(this._now.ticks, ticks | 0));\n    });\n  }\n\n  private async _innerFastForwardTo(to: Ticks) {\n    if (to < this._now.ticks)\n      throw new Error('Cannot fast-forward to the past');\n    for (const timer of this._timers.values()) {\n      if (to > timer.callAt)\n        timer.callAt = to;\n    }\n    await this._runTo(to);\n  }\n\n  addTimer(options: { func: TimerHandler, type: TimerType, delay?: number | string, args?: any[] }): number {\n    this._replayLogOnce();\n\n    if (options.type === TimerType.AnimationFrame && !options.func)\n      throw new Error('Callback must be provided to requestAnimationFrame calls');\n    if (options.type === TimerType.IdleCallback && !options.func)\n      throw new Error('Callback must be provided to requestIdleCallback calls');\n    if ([TimerType.Timeout, TimerType.Interval].includes(options.type) && !options.func && options.delay === undefined)\n      throw new Error('Callback must be provided to timer calls');\n\n    let delay = options.delay ? +options.delay : 0;","sourceCodeStart":268,"sourceCodeEnd":304,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/injected/src/clock.ts#L268-L304","documentation":"Error \"Cannot fast-forward to the past\" thrown in microsoft/playwright.","triggerScenarios":"Thrown at packages/injected/src/clock.ts:286 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"}