diff --git a/src/node/BrowserFetcher.ts b/src/node/BrowserFetcher.ts index 7a90e4384a4a6..11e85bb666411 100644 --- a/src/node/BrowserFetcher.ts +++ b/src/node/BrowserFetcher.ts @@ -111,10 +111,15 @@ function downloadURL( function handleArm64(): void { fs.stat('/usr/bin/chromium-browser', function (err, stats) { if (stats === undefined) { - console.error(`The chromium binary is not available for arm64: `); - console.error(`If you are on Ubuntu, you can install with: `); - console.error(`\n apt-get install chromium-browser\n`); - throw new Error(); + fs.stat('/usr/bin/chromium', function (err, stats) { + if (stats === undefined) { + console.error(`The chromium binary is not available for arm64.`); + console.error(`If you are on Ubuntu, you can install with: `); + console.error(`\n sudo apt install chromium\n`); + console.error(`\n sudo apt install chromium-browser\n`); + throw new Error(); + } + }); } }); } diff --git a/src/node/Launcher.ts b/src/node/Launcher.ts index 247d1342b2b1b..2384deb9b2e3f 100644 --- a/src/node/Launcher.ts +++ b/src/node/Launcher.ts @@ -104,12 +104,14 @@ class ChromeLauncher implements ProductLauncher { } let chromeExecutable = executablePath; - if (os.arch() === 'arm64') { - chromeExecutable = '/usr/bin/chromium-browser'; - } else if (!executablePath) { - const { missingText, executablePath } = resolveExecutablePath(this); - if (missingText) throw new Error(missingText); - chromeExecutable = executablePath; + if (!executablePath) { + if (os.arch() === 'arm64') { + chromeExecutable = '/usr/bin/chromium-browser'; + } else { + const { missingText, executablePath } = resolveExecutablePath(this); + if (missingText) throw new Error(missingText); + chromeExecutable = executablePath; + } } const usePipe = chromeArguments.includes('--remote-debugging-pipe');