microsoft/playwright · error · Error
Launching server is not supported
Error message
Launching server is not supported
What it means
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.
Source
Thrown at packages/playwright-core/src/client/browserType.ts:87
const logger = options.logger || this._playwright._defaultLaunchOptions?.logger;
options = { ...this._playwright._defaultLaunchOptions, ...options };
const launchOptions: channels.BrowserTypeLaunchParams = {
...options,
ignoreDefaultArgs: Array.isArray(options.ignoreDefaultArgs) ? options.ignoreDefaultArgs : undefined,
ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs),
env: options.env ? envObjectToArray(options.env) : undefined,
};
return await this._wrapApiCall(async () => {
const browser = Browser.from((await this._channel.launch(launchOptions, new TimeoutSettings().launchTimeout(options))).browser);
browser._connectToBrowserType(this, options, logger);
return browser;
});
}
async launchServer(options: LaunchServerOptions = {}): Promise<api.BrowserServer> {
if (!this._serverLauncher)
throw new Error('Launching server is not supported');
options = { ...this._playwright._defaultLaunchOptions, ...options };
return await this._serverLauncher.launchServer(options);
}
async launchPersistentContext(userDataDir: string, options: LaunchPersistentContextOptions = {}): Promise<BrowserContext> {
assert(!(options as any).port, 'Cannot specify a port without launching as a server.');
options = this._playwright.selectors._withSelectorOptions({
...this._playwright._defaultLaunchOptions,
...options,
});
await this._instrumentation.runBeforeCreateBrowserContext(options);
const logger = options.logger || this._playwright._defaultLaunchOptions?.logger;
const contextParams = await prepareBrowserContextParams(options);
const persistentParams: channels.BrowserTypeLaunchPersistentContextParams = {
...contextParams,
ignoreDefaultArgs: Array.isArray(options.ignoreDefaultArgs) ? options.ignoreDefaultArgs : undefined,
ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs),View on GitHub (pinned to c8fc3bf8d3)
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.
Example fix
// before (thin client)
const { chromium } = require('@playwright/client');
await chromium.launchServer();
// after
const { chromium } = require('playwright');
await chromium.launchServer(); Defensive patterns
Strategy: type-guard
Validate before calling
if (!(browserType as any)._serverLauncher)
throw new Error('launchServer unavailable in this build; use the full playwright-core package.'); Type guard
function supportsLaunchServer(bt: any): boolean {
return !!bt?._serverLauncher;
} Prevention
- Run launchServer from the full `playwright`/`playwright-core` package.
- From thin clients, use connect APIs instead.
When it happens
Trigger: 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.
Common situations: Using playwright-client expecting full launch capability; bundling a stripped-down Playwright build; calling launchServer in a worker/remote context that only forwards commands.
Related errors
- Launching server is not supported
- No devices found
- No device with serial number '${options.deviceSerialNumber}'
- More than one device found. Please specify deviceSerialNumbe
- Route from har is not supported in thin clients
AI-assisted analysis of microsoft/playwright@c8fc3bf8d3 (2026-08-12).
Data as JSON: /api/errors/e84aab3ffeee16bf.
Report an issue: GitHub.