Skip to content

Commit 6dab309

Browse files
committed
try different launch args
1 parent 75fb12f commit 6dab309

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

src/lib/persist-results/index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,17 @@ import { dirname } from 'path';
22
import { mkdir, writeFile } from 'fs/promises';
33

44
const persistResults = async ({ report, path }) => {
5-
await mkdir(dirname(path), { recursive: true });
6-
await writeFile(path, report);
5+
console.log('Attempting to persist report to:', path);
6+
console.log('Report directory:', dirname(path));
7+
8+
try {
9+
await mkdir(dirname(path), { recursive: true });
10+
await writeFile(path, report);
11+
console.log('Successfully wrote report to:', path);
12+
} catch (error) {
13+
console.error('Failed to persist report:', error);
14+
throw error; // Re-throw to maintain existing error handling
15+
}
716
};
817

918
export default persistResults;

src/run-lighthouse.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ export const runLighthouse = async (url, settings) => {
1010
log.setLevel(logLevel);
1111
chrome = await puppeteer.launch({
1212
args: [
13-
'--headless',
13+
'--headless=new',
1414
'--no-sandbox',
1515
'--disable-gpu',
1616
'--disable-dev-shm-usage',
1717
'--remote-debugging-port=0',
18+
'--disable-software-rasterizer',
19+
'--disable-setuid-sandbox',
20+
'--no-zygote',
1821
],
1922
logLevel,
23+
ignoreDefaultArgs: ['--disable-extensions'],
2024
});
2125

2226
// Get the debugging port from the browser's websocket endpoint

0 commit comments

Comments
 (0)