{"record":{"id":"e84aab3ffeee16bf","repo":"microsoft/playwright","slug":"launching-server-is-not-supported-e84aab","errorCode":null,"errorMessage":"Launching server is not supported","messagePattern":"Launching server is not supported","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/client/browserType.ts","lineNumber":87,"sourceCode":"\n    const logger = options.logger || this._playwright._defaultLaunchOptions?.logger;\n    options = { ...this._playwright._defaultLaunchOptions, ...options };\n    const launchOptions: channels.BrowserTypeLaunchParams = {\n      ...options,\n      ignoreDefaultArgs: Array.isArray(options.ignoreDefaultArgs) ? options.ignoreDefaultArgs : undefined,\n      ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs),\n      env: options.env ? envObjectToArray(options.env) : undefined,\n    };\n    return await this._wrapApiCall(async () => {\n      const browser = Browser.from((await this._channel.launch(launchOptions, new TimeoutSettings().launchTimeout(options))).browser);\n      browser._connectToBrowserType(this, options, logger);\n      return browser;\n    });\n  }\n\n  async launchServer(options: LaunchServerOptions = {}): Promise<api.BrowserServer> {\n    if (!this._serverLauncher)\n      throw new Error('Launching server is not supported');\n    options = { ...this._playwright._defaultLaunchOptions, ...options };\n    return await this._serverLauncher.launchServer(options);\n  }\n\n  async launchPersistentContext(userDataDir: string, options: LaunchPersistentContextOptions = {}): Promise<BrowserContext> {\n    assert(!(options as any).port, 'Cannot specify a port without launching as a server.');\n    options = this._playwright.selectors._withSelectorOptions({\n      ...this._playwright._defaultLaunchOptions,\n      ...options,\n    });\n    await this._instrumentation.runBeforeCreateBrowserContext(options);\n\n    const logger = options.logger || this._playwright._defaultLaunchOptions?.logger;\n    const contextParams = await prepareBrowserContextParams(options);\n    const persistentParams: channels.BrowserTypeLaunchPersistentContextParams = {\n      ...contextParams,\n      ignoreDefaultArgs: Array.isArray(options.ignoreDefaultArgs) ? options.ignoreDefaultArgs : undefined,\n      ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs),","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/client/browserType.ts#L69-L105","documentation":"Thrown by BrowserType.launchServer() when _serverLauncher is undefined. The server launcher is only attached on full Playwright builds; thin/remote clients and some embedded distributions don't provide it. The guard `!this._serverLauncher` rejects the call before delegating.","triggerScenarios":"Calling `chromium.launchServer()` from playwright-client or another thin-client entry, or in an environment where only the connect-side surface is wired. _serverLauncher is set only on the host owning the registry.","commonSituations":"Using playwright-client expecting full launch capability; bundling a stripped-down Playwright build; calling launchServer in a worker/remote context that only forwards commands.","solutions":["Run launchServer from the full `playwright` or `playwright-core` package on the host.","Use connect/connectOverCDP from thin clients instead of launching servers.","If you must launch remotely, run a full Playwright process on the server host and connect to it."],"exampleFix":"// before (thin client)\nconst { chromium } = require('@playwright/client');\nawait chromium.launchServer();\n// after\nconst { chromium } = require('playwright');\nawait chromium.launchServer();","handlingStrategy":"type-guard","validationCode":"if (!(browserType as any)._serverLauncher)\n  throw new Error('launchServer unavailable in this build; use the full playwright-core package.');","typeGuard":"function supportsLaunchServer(bt: any): boolean {\n  return !!bt?._serverLauncher;\n}","tryCatchPattern":null,"preventionTips":["Run launchServer from the full `playwright`/`playwright-core` package.","From thin clients, use connect APIs instead."],"tags":["launch-server","thin-client","unsupported"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}