puppeteer-extra icon indicating copy to clipboard operation
puppeteer-extra copied to clipboard

[Bug] TimeoutError: waiting for function failed: timeout 10000ms exceeded

Open khalitovsv opened this issue 3 years ago • 6 comments

index.cjs.js:760

return window.___grecaptcha_cfg && window.___grecaptcha_cfg.count

Must be replaced with

return window.___grecaptcha_cfg && (window.___grecaptcha_cfg.count || window.___grecaptcha_cfg.isolated_count)

Otherwise in some sites we will get TimeoutError, for example here:

https://www.reestr-zalogov.ru/search/index

khalitovsv avatar Feb 17 '21 05:02 khalitovsv

This is most likely fixed already in the upcoming @extra/recaptcha: https://github.com/berstend/puppeteer-extra/blob/automation-extra/packages/plugin-recaptcha/src/index.ts#L77

If you want to you can test the new version and let me know if it works: https://github.com/berstend/puppeteer-extra/pull/303#issuecomment-775277480

I probably don't have time to backport this fix to the current (and soon obsolete) recaptcha plugin.

berstend avatar Feb 17 '21 07:02 berstend

Just to make sure, does that mean we should stop using puppeteer-extra-plugin-recaptcha because it will become unmaintained, and move to the @extra/recaptcha from now?

EDIT - Not now, I mean when it's out of beta

wywywywy avatar Feb 22 '21 11:02 wywywywy

Neither of these suggested solutions work for https://biz.yelp.com/login

Tried both:

return Object.keys((window.___grecaptcha_cfg || {}).clients || {}).length


return window.___grecaptcha_cfg && (window.___grecaptcha_cfg.count || window.___grecaptcha_cfg.isolated_count)

They both result in timeout 10000ms exceeded

jtmilne avatar Mar 02 '21 19:03 jtmilne

Hey there,

Also having issues with either solutions on a couple of sites (using @extra//@next). Happy to give you the links in private as necessary.

Trace: TimeoutError: waiting for function failed: timeout 10000ms exceeded
    at new WaitTask (node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:509:34)
    at DOMWorld.waitForFunction (node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:464:26)
    at Frame.waitForFunction (node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:909:32)
    at Page.waitForFunction (node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1286:33)
    at RecaptchaPlugin.findRecaptchas (node_modules\@extra\recaptcha\dist\index.cjs.js:756:24)

Best.

Quentin-M avatar Mar 10 '21 08:03 Quentin-M

@Quentin-M interested in the sites where this is failing, kindly DM me on discord :-)

berstend avatar Mar 10 '21 21:03 berstend

@jtmilne yelp configured this weirdly, it seems they added the recaptcha script but are not using it?

image

Did you see an active recaptcha on that site in your tests? If so I'm interested in what window.___grecaptcha_cfg looks like while a checkbox/challenge is shown.

berstend avatar Mar 10 '21 21:03 berstend