Skip to content
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

await page.content() is hanging without a response #4065

Closed
kselax opened this issue Feb 25, 2019 · 4 comments
Closed

await page.content() is hanging without a response #4065

kselax opened this issue Feb 25, 2019 · 4 comments

Comments

@kselax
Copy link

kselax commented Feb 25, 2019

I have this code

...
await Promise.race([
  page.goto(${permalink}, { timeout: 0, waitUntil: 'networkidle0' }),
  page.waitForFunction(`document.querySelector('[selected="true"] a[href*="tab=sdfsdf"]') !== null`)
])

console.log('here we are');
// await page.waitFor(10000)

const content = await page.content()
console.log('here we are2');
...

When I do 30 iterations this cod always hanging on the line
const content = await page.content()
here is the output

r[0].insertId = 0
r[0].affectedRows = 1
i = 28; permalink = https://some_url
here we are

"here we are" and why page.content() is hanging? it doesn't throw any errors.

@matheusb-comp
Copy link

matheusb-comp commented Feb 28, 2019

I believe this is related to #4011

@aslushnikov
Copy link
Contributor

Dupe of #4011

@kselax
Copy link
Author

kselax commented Mar 17, 2019

No, it's when you open one tab and loading new urls without close/create new page close to the 30th iteration it starts working wrong. (different page functions stop working namely content, click, etc...)
So you have to always create/close the page when you load a new url

@aslushnikov
Copy link
Contributor

@kselax does it still fail for you in the latest release of Puppeteer - v1.13.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants