Upload 10 files
Browse files
backend/src/services/screenshotService.js
CHANGED
@@ -283,6 +283,7 @@ class ScreenshotService {
|
|
283 |
// 优化的启动选项
|
284 |
const launchOptions = {
|
285 |
headless: true,
|
|
|
286 |
args: [
|
287 |
// 安全性设置
|
288 |
'--no-sandbox',
|
@@ -307,6 +308,8 @@ class ScreenshotService {
|
|
307 |
timeout: 15000
|
308 |
};
|
309 |
|
|
|
|
|
310 |
this.playwrightBrowser = await playwright.chromium.launch(launchOptions);
|
311 |
|
312 |
// 初始化页面池
|
|
|
283 |
// 优化的启动选项
|
284 |
const launchOptions = {
|
285 |
headless: true,
|
286 |
+
executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH || '/usr/bin/chromium-browser',
|
287 |
args: [
|
288 |
// 安全性设置
|
289 |
'--no-sandbox',
|
|
|
308 |
timeout: 15000
|
309 |
};
|
310 |
|
311 |
+
console.log('🔧 Using Chromium executable:', launchOptions.executablePath);
|
312 |
+
|
313 |
this.playwrightBrowser = await playwright.chromium.launch(launchOptions);
|
314 |
|
315 |
// 初始化页面池
|