{"record":{"id":"4fd6c523063fa7ca","repo":"stablyai/orca","slug":"browser-navigation-failed","errorCode":"browser_navigation_failed","errorMessage":"Navigation failed: ${errorText}","messagePattern":"Navigation failed: (.+?)","errorType":"exception","errorClass":"BrowserError","httpStatus":null,"severity":"error","filePath":"src/main/browser/cdp-bridge.ts","lineNumber":295,"sourceCode":"        backendNodeId: node.backendDOMNodeId\n      })\n\n      return { uploaded: filePaths.length }\n    })\n  }\n\n  async goto(url: string): Promise<BrowserGotoResult> {\n    return this.enqueueCommand(async () => {\n      const guest = this.getActiveGuest()\n      const sender = this.makeCdpSender(guest)\n      await this.ensureDebuggerAttached(guest)\n\n      const { errorText } = (await sender('Page.navigate', { url })) as {\n        errorText?: string\n      }\n\n      if (errorText) {\n        throw new BrowserError('browser_navigation_failed', `Navigation failed: ${errorText}`)\n      }\n\n      await this.waitForLoad(sender, guest)\n      this.invalidateRefMap(guest.id)\n\n      return { url: guest.getURL(), title: guest.getTitle() }\n    })\n  }\n\n  async fill(element: string, value: string): Promise<BrowserFillResult> {\n    return this.enqueueCommand(async () => {\n      const guest = this.getActiveGuest()\n      const sender = this.makeCdpSender(guest)\n      await this.ensureDebuggerAttached(guest)\n\n      const node = await this.resolveRef(guest, sender, element)\n      const refSender = this.senderForRef(guest, node)\n","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/browser/cdp-bridge.ts#L277-L313","documentation":"CDP Page.navigate returns an errorText field (rather than rejecting the promise) when the browser cannot load the URL. Chromium populates this with net-error codes such as net::ERR_NAME_NOT_RESOLVED, net::ERR_CONNECTION_REFUSED, net::ERR_INVALID_URL, or certificate-error strings. The bridge surfaces it as browser_navigation_failed so callers can distinguish a navigation failure from a CDP protocol failure. After the error, waitForLoad is never reached and the refMap is not invalidated.","triggerScenarios":"Calling goto(url) with an unreachable host, malformed URL, SSL certificate error, proxy/firewall block, or DNS resolution failure.","commonSituations":"Typo in the URL; target site is down; corporate proxy blocking the request; self-signed HTTPS cert; navigating to a non-http scheme Chromium rejects (e.g., file:// without permission).","solutions":["Validate the URL format (protocol, host) before calling goto.","Check DNS resolution and network reachability for the host.","For certificate errors, note that Page.navigate cannot bypass them; configure the app to accept the cert at the session level.","For proxy issues, configure the proxy at the Electron session level before navigating."],"exampleFix":"// before\nawait bridge.goto('htps://example.com')\n\n// after\ntry {\n  const url = new URL(rawUrl) // throws on malformed URL\n  if (!/^https?:$/.test(url.protocol)) throw new Error('Only http(s) supported')\n  await bridge.goto(url.href)\n} catch (e) {\n  if (e instanceof BrowserError && e.code === 'browser_navigation_failed') {\n    // parse net:: error code from e.message, report to user\n  }\n  throw e\n}","handlingStrategy":"validation","validationCode":"function isValidNavUrl(raw: string): boolean {\n  try {\n    const u = new URL(raw)\n    return u.protocol === 'http:' || u.protocol === 'https:'\n  } catch {\n    return false\n  }\n}\nif (!isValidNavUrl(url)) throw new Error(`Invalid URL: ${url}`)\nawait bridge.goto(url)","typeGuard":"function isNavigableUrl(raw: string): raw is string {\n  try {\n    const u = new URL(raw)\n    return u.protocol === 'http:' || u.protocol === 'https:'\n  } catch {\n    return false\n  }\n}","tryCatchPattern":"try {\n  await bridge.goto(url)\n} catch (e) {\n  if (e instanceof BrowserError && e.code === 'browser_navigation_failed') {\n    // extract net:: error code from e.message and report to user\n  }\n  throw e\n}","preventionTips":["Validate URL format and protocol before calling goto().","Catch browser_navigation_failed separately from other errors — it means the page exists but couldn't load.","Check DNS/network reachability for the host before navigating in automated flows."],"tags":["navigation","network","cdp","url"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}