{"record":{"id":"da5dd45f70eb7786","repo":"microsoft/playwright","slug":"cannot-save-trace-in-thin-clients","errorCode":null,"errorMessage":"Cannot save trace in thin clients","messagePattern":"Cannot save trace in thin clients","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/client/tracing.ts","lineNumber":206,"sourceCode":"  }\n\n  private async _doStopChunk(filePath: string | undefined) {\n    this._resetStackCounter();\n\n    const additionalSources = [...this._additionalSources];\n    this._additionalSources.clear();\n\n    if (!filePath) {\n      // Not interested in artifacts.\n      await this._channel.tracingStopChunk({ mode: 'discard' }, kNoTimeout);\n      if (this._stacksId)\n        await this._connection.localUtils()!.traceDiscarded({ stacksId: this._stacksId });\n      return;\n    }\n\n    const localUtils = this._connection.localUtils();\n    if (!localUtils)\n      throw new Error('Cannot save trace in thin clients');\n\n    const isLocal = !this._connection.isRemote();\n\n    if (isLocal) {\n      const result = await this._channel.tracingStopChunk({ mode: 'entries' }, kNoTimeout);\n      await localUtils.zip({ zipFile: filePath, entries: result.entries!, mode: 'write', stacksId: this._stacksId, includeSources: this._includeSources, additionalSources });\n      return;\n    }\n\n    const result = await this._channel.tracingStopChunk({ mode: 'archive' }, kNoTimeout);\n\n    // The artifact may be missing if the browser closed while stopping tracing.\n    if (!result.artifact) {\n      if (this._stacksId)\n        await localUtils.traceDiscarded({ stacksId: this._stacksId });\n      return;\n    }\n","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/client/tracing.ts#L188-L224","documentation":"Error \"Cannot save trace in thin clients\" thrown in microsoft/playwright.","triggerScenarios":"Thrown at packages/playwright-core/src/client/tracing.ts:206 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"}