Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore(bidi): suppress crash reporter in firefox (#32694)

Yury Semikhatsky48d3d5554d92
diff --git a/packages/playwright-core/src/server/bidi/bidiFirefox.ts b/packages/playwright-core/src/server/bidi/bidiFirefox.ts
index 3fb7c15b90..737fc97eaa 100644
--- a/packages/playwright-core/src/server/bidi/bidiFirefox.ts
+++ b/packages/playwright-core/src/server/bidi/bidiFirefox.ts
@@ -51,6 +51,14 @@ export class BidiFirefox extends BrowserType {
override amendEnvironment(env: Env, userDataDir: string, executable: string, browserArguments: string[]): Env {
if (!path.isAbsolute(os.homedir()))
throw new Error(`Cannot launch Firefox with relative home directory. Did you set ${os.platform() === 'win32' ? 'USERPROFILE' : 'HOME'} to a relative path?`);
+
+ env = {
+ ...env,
+ 'MOZ_CRASHREPORTER': '1',
+ 'MOZ_CRASHREPORTER_NO_REPORT': '1',
+ 'MOZ_CRASHREPORTER_SHUTDOWN': '1',
+ };
+
if (os.platform() === 'linux') {
// Always remove SNAP_NAME and SNAP_INSTANCE_NAME env variables since they
// confuse Firefox: in our case, builds never come from SNAP.