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

Sometimes the function page. Waitforxpath() does not detect the DOM that already exists #5539

Closed
aixinalei opened this issue Mar 25, 2020 · 11 comments

Comments

@aixinalei
Copy link

I use puppeter to collect a website,I'll loop collect a lot of pages。
It was normal at the beginning,After collecting many pages of data,the function page.waitforxpath() does not detect the DOM that already exists.and throw error, such as:TimeoutError: waiting for XPath "//table[@Class="hq_table"]/tbody/tr[position()>1]" failed: timeout 3000ms exceeded

i don't know how to deal it. It affected the speed of acquisition

@jnd0
Copy link

jnd0 commented Jul 16, 2020

Same here I think it is the same issue that happened here: #4072

The behaviour I'm having (my browser is always running in the background, I don't close it on each request):

  • The first page works just fine
  • The second try fails on waitForXPath() timing out
  • Third page works
  • 4th fails, etc...

@SpamapS
Copy link

SpamapS commented Jul 31, 2020

Seems unlikely that this is #4072 given that the issue was closed by devs a long, long time ago. We saw this today, where a page presumably got faster, leading to the DOM being loaded sooner, and thusly, the waitForXpath never returns despite the xPath matching the existing content.

@dev-point-team
Copy link

same problem here
( waitFor() % 2) == Timeout()

@LiamKarlMitchell
Copy link

I think I'm having the same issue, it's been quite a while since it was reported, any idea on a work around?

Seems to work in non headless mode.

await browser.newPage({ context: 'context-' + Math.floor(Math.random() * 10000) })

@FishBlanche
Copy link

FishBlanche commented Jul 18, 2022

same problems here
i am using the latest version 15.4.0,but the problem is still there

@OrKoN
Copy link
Collaborator

OrKoN commented Sep 6, 2022

Could someone provide a repro script?

@stale
Copy link

stale bot commented Nov 5, 2022

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.

@stale stale bot added the unconfirmed label Nov 5, 2022
@stale
Copy link

stale bot commented Dec 5, 2022

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accommodate it!

@stale stale bot closed this as completed Dec 5, 2022
@FishBlanche
Copy link

I use puppeter to collect a website,I'll loop collect a lot of pages。 It was normal at the beginning,After collecting many pages of data,the function page.waitforxpath() does not detect the DOM that already exists.and throw error, such as:TimeoutError: waiting for XPath "//table[@Class="hq_table"]/tbody/tr[position()>1]" failed: timeout 3000ms exceeded

i don't know how to deal it. It affected the speed of acquisition

Have u fix this? I have same problem here (version 19.6.3)

@FishBlanche
Copy link

what 's this workaround based on?

@SwapnilSoni1999
Copy link

Any fixes on this?

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

No branches or pull requests

8 participants