Open ngoanpv opened 1 year ago
Same issue here, anyone has a solution?
I faced this after upgrading to macOS Sonoma (coming from macOS Monterey).
This patch helped me, and it might help you:
diff --git a/dist/upload.js b/dist/upload.js
index 164cda3eb777633922d43bdf988d3d827dda3287..b7c0b7187749bdeb4ab0d3dbfeb79c6a284fad2c 100644
--- a/dist/upload.js
+++ b/dist/upload.js
@@ -11,6 +11,7 @@ const path_1 = __importDefault(require("path"));
const StealthPlugin = require('puppeteer-extra-plugin-stealth')();
StealthPlugin.enabledEvasions.delete('iframe.contentWindow');
StealthPlugin.enabledEvasions.delete('navigator.plugins');
+StealthPlugin.enabledEvasions.delete('media.codecs');
puppeteer_extra_1.default.use(StealthPlugin);
const maxTitleLen = 100;
const maxDescLen = 5000;
You might need to set the executablePath
to a different installation, too.
I ran pnpm dlx @puppeteer/browsers install chrome@stable
in my home directory, then did this when calling upload
:
const [link] = await upload(auth, [videoOptions], {
executablePath: process.env.HOME +
'/chrome/mac-124.0.6367.91/chrome-mac-x64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing',
})
Your path may differ. Read the logs of the pnpm dlx @puppeteer/browsers install chrome@stable
command.
Hello, I don't see the chromium open when I start the code. The error is shown as below: