{"record":{"id":"7f12d23538b88ee5","repo":"microsoft/playwright","slug":"callback-must-be-provided-to-requestanimationframe","errorCode":null,"errorMessage":"Callback must be provided to requestAnimationFrame calls","messagePattern":"Callback must be provided to requestAnimationFrame calls","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/injected/src/clock.ts","lineNumber":298,"sourceCode":"      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;\n    if (!Number.isFinite(delay))\n      delay = 0;\n    delay = delay > maxTimeout ? 1 : delay;\n    delay = Math.max(0, delay);\n\n    const timer: Timer = {\n      type: options.type,\n      func: options.func,\n      args: options.args || [],\n      delay,\n      callAt: shiftTicks(this._now.ticks, (delay || (this._duringTick ? 1 : 0))),\n      createdAt: this._now.ticks,","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/injected/src/clock.ts#L280-L316","documentation":"Error \"Callback must be provided to requestAnimationFrame calls\" thrown in microsoft/playwright.","triggerScenarios":"Thrown at packages/injected/src/clock.ts:298 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"}