{"record":{"id":"2cc2637f00c862b3","repo":"microsoft/playwright","slug":"cannot-navigate-to-url-this-page-is-not-avai","errorCode":null,"errorMessage":"Cannot navigate to \"${url}\": this page is not available in an isolated browser context, and opening it crashes the browser. Use browserType.launchPersistentContext() instead.","messagePattern":"Cannot navigate to \"(.+?)\": this page is not available in an isolated browser context, and opening it crashes the browser\\. Use browserType\\.launchPersistentContext\\(\\) instead\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/server/chromium/crPage.ts","lineNumber":180,"sourceCode":"  }\n\n  didClose() {\n    for (const session of this._sessions.values())\n      session.dispose();\n    this._page._didClose();\n  }\n\n  async navigateFrame(frame: frames.Frame, url: string, referrer: string | undefined): Promise<frames.GotoResult> {\n    this._assertNavigationDoesNotCrashBrowser(url);\n    return this._sessionForFrame(frame)._navigate(frame, url, referrer);\n  }\n\n  private _assertNavigationDoesNotCrashBrowser(url: string) {\n    if (this._browserContext.isPersistentContext())\n      return;\n    const isEdge = this._browserContext._browser.userAgent().includes('Edg/');\n    if ((isEdge ? kCrashingWebUIHosts.edge : kCrashingWebUIHosts.chromium).has(webUIHost(url)))\n      throw new Error(`Cannot navigate to \"${url}\": this page is not available in an isolated browser context, and opening it crashes the browser. Use browserType.launchPersistentContext() instead.`);\n  }\n\n  async updateExtraHTTPHeaders(): Promise<void> {\n    const headers = network.mergeHeaders([\n      this._browserContext._options.extraHTTPHeaders,\n      this._page.extraHTTPHeaders()\n    ]);\n    await this._networkManager.setExtraHTTPHeaders(headers);\n  }\n\n  async updateGeolocation(): Promise<void> {\n    await this._forAllFrameSessions(frame => frame._updateGeolocation(false));\n  }\n\n  async updateOffline(): Promise<void> {\n    await this._networkManager.setOffline(!!this._browserContext._options.offline);\n  }\n","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/chromium/crPage.ts#L162-L198","documentation":"Thrown by _assertNavigationDoesNotCrashBrowser (crPage.ts:180). In a non-persistent context, navigating to known crashing WebUI hosts (chrome://, edge:// variants listed in kCrashingWebUIHosts) would crash the whole browser, so Playwright refuses the navigation up front and points the user at launchPersistentContext().","triggerScenarios":"page.goto('chrome://settings') or 'edge://settings' in a context created via browser.newContext() (incognito-style); launching chromium with launch() then navigating to a WebUI URL.","commonSituations":"Tests targeting browser settings, devtools://, or chrome-extension:// pages; automation that introspects browser internals via WebUI.","solutions":["Use browserType.launchPersistentContext(userDataDir, ...) instead of launch + newContext.","If you must use a non-persistent context, do not navigate to chrome:// / edge:// WebUI hosts.","For devtools/extension testing, drive them through the persistent context's pages."],"exampleFix":"// before\nconst browser = await chromium.launch();\nconst ctx = await browser.newContext();\nconst page = await ctx.newPage();\nawait page.goto('chrome://settings');\n// after\nconst ctx = await chromium.launchPersistentContext('/tmp/profile');\nconst page = ctx.pages()[0] ?? await ctx.newPage();\nawait page.goto('chrome://settings');","handlingStrategy":"validation","validationCode":"// Reject WebUI navigations in non-persistent contexts up front.\nconst WEBUI = /^(chrome|edge|devtools):\\/\\//i;\nif (WEBUI.test(url) && !persistent)\n  throw new Error('Use launchPersistentContext for WebUI URLs');\nawait page.goto(url);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use launchPersistentContext for any chrome://, edge://, or devtools:// automation.","Avoid WebUI URLs in regular newContext()-based tests.","Document the userDataDir requirement in tests that touch WebUI."],"tags":["navigation","chromium","webui","persistent-context"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}