From e153f5e37482c1a56c46a6c1d5dcce3548101c9d Mon Sep 17 00:00:00 2001 From: Jason Laster Date: Thu, 16 Nov 2023 11:10:29 -0800 Subject: [PATCH] Fix launch by passing in RECORD_ALL_CONTENT fixes SCS-1579 (#274) * Fix launch by passing in RECORD_ALL_CONTENT fixes SCS-1579 * record by default of all browsers --------- Co-authored-by: Ryan Duffy --- packages/replay/src/main.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/replay/src/main.ts b/packages/replay/src/main.ts index 38d2a85f..6a4d507c 100644 --- a/packages/replay/src/main.ts +++ b/packages/replay/src/main.ts @@ -831,25 +831,27 @@ async function launchBrowser( const proc = spawn(execPath, browserArgs[browserName], { detached: !attach, - env: { ...process.env, RECORD_REPLAY_DIRECTORY: opts?.directory }, - stdio: "inherit" + env: { + ...process.env, + RECORD_ALL_CONTENT: "1", + RECORD_REPLAY_DIRECTORY: opts?.directory, + }, + stdio: "inherit", }); if (!attach) { proc.unref(); - } - else { + } else { // Wait for the browser process to finish. await new Promise((resolve, reject) => { proc.on("error", reject); proc.on("exit", (code, signal) => { if (code || signal) { reject(new Error(`Process failed code=${code}, signal=${signal}`)); - } - else { + } else { resolve(); } }); - }); + }); } return proc;