microsoft/playwright · error · Error

Cannot save trace in thin clients

Error message

Cannot save trace in thin clients

What it means

Error "Cannot save trace in thin clients" thrown in microsoft/playwright.

Source

Thrown at packages/playwright-core/src/client/tracing.ts:206

  }

  private async _doStopChunk(filePath: string | undefined) {
    this._resetStackCounter();

    const additionalSources = [...this._additionalSources];
    this._additionalSources.clear();

    if (!filePath) {
      // Not interested in artifacts.
      await this._channel.tracingStopChunk({ mode: 'discard' }, kNoTimeout);
      if (this._stacksId)
        await this._connection.localUtils()!.traceDiscarded({ stacksId: this._stacksId });
      return;
    }

    const localUtils = this._connection.localUtils();
    if (!localUtils)
      throw new Error('Cannot save trace in thin clients');

    const isLocal = !this._connection.isRemote();

    if (isLocal) {
      const result = await this._channel.tracingStopChunk({ mode: 'entries' }, kNoTimeout);
      await localUtils.zip({ zipFile: filePath, entries: result.entries!, mode: 'write', stacksId: this._stacksId, includeSources: this._includeSources, additionalSources });
      return;
    }

    const result = await this._channel.tracingStopChunk({ mode: 'archive' }, kNoTimeout);

    // The artifact may be missing if the browser closed while stopping tracing.
    if (!result.artifact) {
      if (this._stacksId)
        await localUtils.traceDiscarded({ stacksId: this._stacksId });
      return;
    }

View on GitHub (pinned to c8fc3bf8d3)

When it happens

Trigger: Thrown at packages/playwright-core/src/client/tracing.ts:206 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/da5dd45f70eb7786. Report an issue: GitHub.