microsoft/playwright · error · Error

File already deleted. Save before deleting.

Error message

File already deleted. Save before deleting.

What it means

Error "File already deleted. Save before deleting." thrown in microsoft/playwright.

Source

Thrown at packages/playwright-core/src/server/artifact.ts:79

  localPath() {
    return this._localPath;
  }

  private async _localPathAfterFinished(): Promise<string> {
    if (this._unaccessibleErrorMessage)
      throw new Error(this._unaccessibleErrorMessage);
    await this._finishedPromise;
    if (this._failureErrorValue)
      throw this._failureErrorValue;
    return this._localPath;
  }

  saveAs(progress: Progress, saveCallback: SaveCallback) {
    if (this._unaccessibleErrorMessage)
      throw new Error(this._unaccessibleErrorMessage);
    if (this._deleted)
      throw new Error(`File already deleted. Save before deleting.`);
    if (this._failureErrorValue)
      throw this._failureErrorValue;

    if (this._finished) {
      saveCallback(this._localPath).catch(() => {});
      return;
    }
    this._saveCallbacks.push(saveCallback);
  }

  async _failureError(): Promise<string | null> {
    if (this._unaccessibleErrorMessage)
      return this._unaccessibleErrorMessage;
    await this._finishedPromise;
    return this._failureErrorValue?.message || null;
  }

  async _cancel(): Promise<void> {

View on GitHub (pinned to c8fc3bf8d3)

When it happens

Trigger: Thrown at packages/playwright-core/src/server/artifact.ts:79 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/85817a6cc717e361. Report an issue: GitHub.