Skip to content

Commit

Permalink
Fix launch by passing in RECORD_ALL_CONTENT fixes SCS-1579 (#274)
Browse files Browse the repository at this point in the history
* Fix launch by passing in RECORD_ALL_CONTENT fixes SCS-1579

* record by default of all browsers

---------

Co-authored-by: Ryan Duffy <ryan@replay.io>
  • Loading branch information
jasonLaster and ryanjduffy authored Nov 16, 2023
1 parent ebdaac7 commit e153f5e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/replay/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>((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;
Expand Down

0 comments on commit e153f5e

Please sign in to comment.