{"record":{"id":"94c331a4eac76751","repo":"garrytan/gstack","slug":"browser-not-launched","errorCode":null,"errorMessage":"Browser not launched","messagePattern":"Browser not launched","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"browse/src/browser-manager.ts","lineNumber":765,"sourceCode":"  /** Health check — verifies Chromium is connected AND responsive */\n  async isHealthy(): Promise<boolean> {\n    if (!this.browser || !this.browser.isConnected()) return false;\n    try {\n      const page = this.pages.get(this.activeTabId);\n      if (!page) return true; // connected but no pages — still healthy\n      await Promise.race([\n        page.evaluate('1'),\n        new Promise((_, reject) => setTimeout(() => reject(new Error('timeout')), 2000)),\n      ]);\n      return true;\n    } catch {\n      return false;\n    }\n  }\n\n  // ─── Tab Management ────────────────────────────────────────\n  async newTab(url?: string, clientId?: string): Promise<number> {\n    if (!this.context) throw new Error('Browser not launched');\n\n    // Validate URL before allocating page to avoid zombie tabs on rejection.\n    // Use the normalized return value for navigation — it handles file://./x and\n    // file://<segment> cwd-relative forms that the standard URL parser doesn't.\n    let normalizedUrl: string | undefined;\n    if (url) {\n      normalizedUrl = await validateNavigationUrl(url);\n    }\n\n    const page = await this.context.newPage();\n    const id = this.nextTabId++;\n    this.pages.set(id, page);\n    this.tabSessions.set(id, new TabSession(page));\n    this.activeTabId = id;\n\n    // Record tab ownership for multi-agent isolation\n    if (clientId) {\n      this.tabOwnership.set(id, clientId);","sourceCodeStart":747,"sourceCodeEnd":783,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/browse/src/browser-manager.ts#L747-L783","documentation":"Error \"Browser not launched\" thrown in garrytan/gstack.","triggerScenarios":"Thrown at browse/src/browser-manager.ts:765 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":"94993f74012782fd94416dd44b8314f6363a13a4","analyzedAt":"2026-08-12T04:06:23.140Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}