{"record":{"id":"2c6c9ae13b4eebf6","repo":"microsoft/playwright","slug":"route-from-har-is-not-supported-in-thin-clients-2c6c9a","errorCode":null,"errorMessage":"Route from har is not supported in thin clients","messagePattern":"Route from har is not supported in thin clients","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/client/page.ts","lineNumber":577,"sourceCode":"\n  async addInitScript(script: Function | string | { path?: string, content?: string }, arg?: any, options?: EvaluateOptions) {\n    assertEvaluateOptions(options);\n    if (options?.exposeFunctions)\n      return await addInitScriptWithExposedFunctions(this, script, arg);\n    const source = await evaluationScript(script, arg);\n    return DisposableObject.from((await this._channel.addInitScript({ source }, kNoTimeout)).disposable);\n  }\n\n  async route(url: URLMatch, handler: RouteHandlerCallback, options: { times?: number } = {}): Promise<DisposableStub> {\n    this._routes.unshift(new RouteHandler(this._browserContext._options.baseURL, url, handler, options.times));\n    await this._updateInterceptionPatterns({ title: 'Route requests' });\n    return new DisposableStub(() => this.unroute(url, handler));\n  }\n\n  async routeFromHAR(har: string, options: { url?: string | RegExp, notFound?: 'abort' | 'fallback', update?: boolean, updateContent?: 'attach' | 'embed', updateMode?: 'minimal' | 'full'} = {}): Promise<void> {\n    const localUtils = this._connection.localUtils();\n    if (!localUtils)\n      throw new Error('Route from har is not supported in thin clients');\n    if (options.update) {\n      await this._browserContext.tracing._recordIntoHAR(har, this, options);\n      return;\n    }\n    const harRouter = await HarRouter.create(localUtils, har, options.notFound || 'abort', { urlMatch: options.url });\n    this._harRouters.push(harRouter);\n    await harRouter.addPageRoute(this);\n  }\n\n  async routeWebSocket(url: URLMatch, handler: WebSocketRouteHandlerCallback): Promise<void> {\n    this._webSocketRoutes.unshift(new WebSocketRouteHandler(this._browserContext._options.baseURL, url, handler));\n    await this._updateWebSocketInterceptionPatterns({ title: 'Route WebSockets' });\n  }\n\n  private _disposeHarRouters() {\n    this._harRouters.forEach(router => router.dispose());\n    this._harRouters = [];\n  }","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/client/page.ts#L559-L595","documentation":"Error \"Route from har is not supported in thin clients\" thrown in microsoft/playwright.","triggerScenarios":"Thrown at packages/playwright-core/src/client/page.ts:577 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-13T04:17:16.726Z"}