puppeteer: Page.Content freezes without error after running 101 times
- Puppeteer version: puppeteer@1.12.1
- Platform / OS version: Windows 10 (20 Core , 64GB Ram)
- Node.js version: v10.15.0
What steps will reproduce the problem? Run the script and wait to i == 1129 (around 101 page visit) it would just freeze and hang
Please include code that reproduces the issue. Link to Full Code : https://gist.github.com/rainbowhat/00ee308129fd52b87156b5e0715f8fff
What is the expected result? It’s expected to keep running until 10,000
What happens instead? It freezes and no errors appear, The output during the freeze is
After Page.Content
Hit End of Loop
Hit After Visit
1127
Before Page.content
I have to do a ctrl + c to end the program.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 37 (5 by maintainers)
Commits related to this issue
- feat(chromium): roll Chromium to r637110 This roll includes: - https://crrev.com/636867 - devtools: bump max number of devtools isolated worlds Fix #4011 — committed to aslushnikov/puppeteer by aslushnikov 5 years ago
- feat(chromium): roll Chromium to r637110 (#4099) This roll includes: - https://crrev.com/636867 - devtools: bump max number of devtools isolated worlds Fix #4011 — committed to puppeteer/puppeteer by aslushnikov 5 years ago
- feat(chromium): roll Chromium to r637110 (#4099) This roll includes: - https://crrev.com/636867 - devtools: bump max number of devtools isolated worlds Fix #4011 — committed to kiku-jw/puppeteer by aslushnikov 5 years ago
- fix: Upgrade puppeteer Previous version used to randomly hang while creating screenshots This issues shows that some old versions are subjective to random freezes https://github.com/puppeteer/puppet... — committed to cozy/cozy-ui by Ldoppea 3 years ago
Upstream fix has landed as https://chromium-review.googlesource.com/c/chromium/src/+/1496759; this’ll be fixed after a roll.
Happening to me still with v2.0
Have a similar issue with
page.waitForSelector
. At the same timepage.evaluate(() => document.querySelector(...))
works:Seems like a
frame._secondaryWorld
(which is used inpage.content
,page.waitForSelector
and so on) stops to receive execution context at some point. I loggedRuntime.executionContextCreated
event here which normally happens two times per navigation, one for default and one for isolated context. But here after number of reloads event starts to happen just once (for default context).logs
Yes, it’s happening to me still with v2.0 too
@Mahanchello Try this:
Can confirm - downgrading to 1.11.0 solves freezing. (in my case caused by
waitForSelector()
in v 1.13.0 with Chrome )I can reproduce with this reduced code:
It stops at:
Hello! Same here, puppeteer worked great for several iterations of going through a page, then after N loops it will hang at
waitForSelector()
. Running 10.2.0 as well.I am still having this exact same issue as the original post. Running puppeteer 10.2.0? Any thoughts?
We are also facing timeouts issues on jenkins, which is running on docker image. can you help us understand what worked for you?
@djErock : I am also facing the similar issue, it works fine for me in local machine, but when we run it as docker image i see timeout issues for page.waitforselector. Can you please help, if you were able to find some solution for it. Thanks
@pendo324 solution on puppeteer-core v2 headless works great.
page.waitforselector
or iframe works periodically and result in timeout, especially for nested iframe.@vsemozhetbyt helped, thanks 😄
This still happens to me on HeadlessChrome/79.0.3945.79 with puppeteer-core 2.0.0.
If I replace my
page.waitFor
s withmy code works as expected.
Downgrading to 1.11.0 also works as expected.
yeah, 1.11.0 works perfectly!