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
With Firefox page.goto() times out on some websites like Twitter due to COOP headers #6940
Comments
Hi, it should help: await page.goto("https://twitter.com/", { waitUntil: ['load', 'domcontentloaded'] }); |
@EpsilonMoves could you please enable |
I can reproduce this too, on both 8.0.0 and 7.1.0. I attached both the The Firefox logs have some lines truncated, not sure how to fix that, but I hope it doesn't matter. |
The CDP implementation in Firefox (which puppeteer uses) is not compatible with navigations that force the new page to run in a different process. twitter.com defines COOP headers which enforce this (see https://hacks.mozilla.org/2020/07/safely-reviving-shared-memory/ & https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy) Supporting cross process navigations is not currently on our roadmap for CDP. We are focusing on implementing WebDriver BiDi which should be used by puppeteer in the future and which will support cross process navigations. In the meantime I wonder if we could have any way to give better user feedback here (eg "navigating to twitter.com triggered a process change which is not supported at the moment"). We should have the necessary events to detect that, it might be worth doing. |
Please note that we track that problem via https://bugzilla.mozilla.org/show_bug.cgi?id=1706353. |
We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days. |
We are tracking this problem on our own. See #6940 (comment). It's very unlikely that we will get this fixed in Firefox for our CDP implementation, but this kind of navigation should already work with WebDriver BiDi. As such closing this issue. |
The following code prints "success" to console
puppeteer = require("puppeteer");
(async () => {
const browser = await puppeteer.launch({
product: "firefox",
headless: false
});
const page = await browser.newPage();
await page.goto("https://google.com/");
console.log('success');
await browser.close();
})();
Changed the site from 'google' to 'twitter'. The following code results in TimeoutError: Navigation timeout of 30000 ms exceeded
const puppeteer = require("puppeteer");
(async () => {
const browser = await puppeteer.launch({
product: "firefox",
headless: false
});
const page = await browser.newPage();
await page.goto("https://twitter.com/");
console.log('success');
await browser.close();
})();
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
Code pasted above
What is the expected result?
"success" printed to console
What happens instead?
TimeoutError: Navigation timeout of 30000 ms exceeded
The text was updated successfully, but these errors were encountered: