-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firefox extensions with v2.1.0 puppeteer #5532
Comments
@mjzffr I dug in a bit more this weekend and actually it seems After confirming the above, I was able to load an FF extension:
|
@corford That's great. It's entirely possible that the previous fixes to As for avoiding the sleep: I'm not familiar with web-ext, but |
@corford The proposed solution doesn't work, because
|
Try |
@mjzffr Thanks for the suggestion. I think it ignores this flag. When adding |
@alexanderby I'm not sure I understand where you're trying to pass What I meant is you should start Firefox Nightly with The Firefox options are confusing: |
@mjzffr Here's a code example #6498 const path = require('path');
const puppeteer = require('puppeteer-core');
const webExt = require('web-ext');
async function openFirefox() {
webExt.util.logger.consoleStream.makeVerbose();
const PORT = 1234;
const runner = await webExt.cmd.run({
sourceDir: path.join(__dirname, 'extension'),
firefox: {
'darwin': '/Applications/Firefox Nightly.app/Contents/MacOS/firefox-bin',
'win32': `${process.env.PROGRAMFILES}\\Firefox Nightly\\firefox.exe`,
}[process.platform],
args: [`--remote-debugging-port=${PORT}`]
}, {
shouldExitProgram: false,
});
const {debuggerPort} = runner.extensionRunners[0].runningInfo;
console.log(debuggerPort);
return await puppeteer.connect({
browserWSEndpoint: `ws://localhost:${PORT}`,
});
} But it just starts the debugger on it's own port, the specified one is not available ( |
Now that puppeteer-firefox is deprecated (#5397) and there is not yet any Firefox support for
connect()
(#5152), is there a recommended way for using Puppeteer and Firefox with extensions/add-ons ?This was the previous method we used with puppeteer-firefox (gleaned from: #4162):
The text was updated successfully, but these errors were encountered: