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
[Bug]: Page.goBack never resolves if chrome is not launched with --disable-extensions #9165
Comments
@chincheta Can you provide the script that show this behavior? |
Here we go:
It gets stuck at await page.goBack(); I noticed that if I do a launch instead of connect it works. The chrome instance I connect to is the latest version installed in Ubuntu 22.04. |
Which version is that? |
Google Chrome 106.0.5249.119 |
I am unable to reproduce with the latest version and the bundled Chromium. Make sure you use the same major Chrome version as the one that Puppeteer bundles. |
Tried with Google Chrome 108.0.5359.30 beta and still the same. |
@chincheta are you using puppeteer v19.2.1+? |
@OrKoN yes, I updated it today and still the same issue. |
@chincheta can you provide the complete executable script? I have adopted your test snippet to use launch instead of connect and goBack resolves properly. |
@OrKoN I posted the exact script I run. It's a jest script transformed by ts-jest. |
@chincheta which arguments do you run you chrome with? are you using the same ones as Puppeteer https://github.com/puppeteer/puppeteer/blob/main/packages/puppeteer-core/src/node/ChromeLauncher.ts#L160 ? |
I execute it like this: google-chrome --window-size=2560,1440 --remote-debugging-port=9222 I am gonna try all of that now. |
@OrKoN I am back. Off all of those settings the one which makes it works is --disable-extensions How is that possible? I don't have any extension installed. |
it's a good question. I am not sure: it looks like chromium is using that flag in multiple places https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/chrome_switches.cc;l=195;drc=44798fcb6d921c4a8fee8331289021a3b25b4450 Perhaps this background mode that is enabled by default is causing this. Very likely an upstream issue. |
Are you sure it's
|
If I launch chrome like this: google-chrome --window-size=2560,1440 --remote-debugging-port=9222 --disable-extensions the code posted works. Maybe there is another flag that if included makes it work. Will try now. Edit: for now it works If I only remove --disable-extensions from all the list of flags added by puppeteer. I continue isolating the issue... |
@OrKoN, well.... adding only Edit: with |
ah yes, BackForwardCache is unfortunately not supported by Puppeteer and, perhaps, it's not deterministic? |
No big issue then. I will just replicate all the flags in the remote chrome instance I have. But disabling extensions was a problem due to ads. Is it ok to run chrome without the |
@chincheta in general, it should work but you will probably see more targets and workers coming from extensions which might be okay. |
Ok thanks. Should we close the bug? |
Yes, since it seems to be caused by BFCache indeed. #8197 is to track progress on BFCache support. |
Bug description
Steps to reproduce the problem:
Puppeteer version
19.1.2
Node.js version
v16.18.0
npm version
8.19.2
What operating system are you seeing the problem on?
Linux
Relevant log output
No response
The text was updated successfully, but these errors were encountered: