diff --git a/browser-profiler/main/lib/local-tooling/ChromeUtils.ts b/browser-profiler/main/lib/local-tooling/ChromeUtils.ts index 2dabd9533..df92b9ab3 100644 --- a/browser-profiler/main/lib/local-tooling/ChromeUtils.ts +++ b/browser-profiler/main/lib/local-tooling/ChromeUtils.ts @@ -10,6 +10,7 @@ export function getChromeDownloadUrlForLinux(fullVersion: string): string { return `https://github.com/ulixee/chrome-versions/releases/download/${fullVersion}/chrome_${fullVersion}_linux.tar.gz`; } +let counter = 0; export async function startChromeAndLoadUrl( executablePath: string, url: string, @@ -26,7 +27,8 @@ export async function startChromeAndLoadUrl( '--no-default-browser-check', '--no-first-run', '--use-mock-keychain', - '--disable-features=MediaRouter,DialMediaRouteProvider' // remove chrome window prompt + '--disable-features=MediaRouter,DialMediaRouteProvider', // remove chrome window prompt + `--user-data-dir=/tmp/${Date.now()}-${(counter += 1)}`, ]; if (headType === 'headless') { if (majorVersion >= 109) { diff --git a/browser-profiler/main/lib/local-tooling/DockerUtils.ts b/browser-profiler/main/lib/local-tooling/DockerUtils.ts index 8a58dc1b2..2e306ff54 100644 --- a/browser-profiler/main/lib/local-tooling/DockerUtils.ts +++ b/browser-profiler/main/lib/local-tooling/DockerUtils.ts @@ -56,7 +56,7 @@ export async function startDockerAndLoadUrl( '--shm-size="3gb"', '--cap-add=SYS_ADMIN', ]; - counter += 1; + const chromeArgs = [ '--allow-running-insecure-content', '--ignore-certificate-errors', diff --git a/browser-profiler/main/package.json b/browser-profiler/main/package.json index 73bbcce13..dd2fcf2b1 100644 --- a/browser-profiler/main/package.json +++ b/browser-profiler/main/package.json @@ -10,9 +10,9 @@ "scripts": { "downloadData": "node ../../build/browser-profiler/main/scripts/cloneData.js", "cleanProfiles": "node -e 'require(\".../../build/browser-profiler/main/scripts/runBrowserstack.js\").cleanProfiles()'", - "profile:browserstack": "node -e 'require(\"../../build/browser-profiler/main/scripts/runBrowserstack.js\").default().catch(console.error)'", - "profile:dom-browserstack": "node -e 'require(\"../../build/browser-profiler/main/scripts/runBrowserstackDoms.js\").default()'", - "profile:dom-local": "node -e 'require(\"../../build/browser-profiler/main/scripts/runLocalDoms.js\").default()'" + "profile:browserstack": "node --inspect -e 'require(\"../../build/browser-profiler/main/scripts/runBrowserstack.js\").default().catch(console.error)'", + "profile:dom-browserstack": "node --inspect -e 'require(\"../../build/browser-profiler/main/scripts/runBrowserstackDoms.js\").default()'", + "profile:dom-local": "node --inspect -e 'require(\"../../build/browser-profiler/main/scripts/runLocalDoms.js\").default()'" }, "dependencies": { "@double-agent/collect": "2.0.0-alpha.28",