berstend / puppeteer-extra

💯 Teach puppeteer new tricks through plugins.
https://extra.community
MIT License
6.42k stars 739 forks source link

Recaptcha never gets solved despite supposedly entered successfully [Bug] #781

Open josep11 opened 1 year ago

josep11 commented 1 year ago

Describe the bug

Trying to fill a Google recaptcha v2 in a sign in form and it's not working. I am using the puppeteer-extra-plugin-recaptcha with https://2captcha.com/ as provider and the captcha is found on the page, its making it to 2captcha and it's supposedly entered. However, inside the page only the color changes (from blue to green) after it says it's solved, but the checkbox is never checked.

Before:

Captura de pantalla 2023-03-05 a les 23 37 39

After:

Captura de pantalla 2023-03-05 a les 23 38 59

Versions

Mac OS 13.0.1 node v16.14.0

puppeteer-extra-plugin-recaptcha@3.6.8 puppeteer-extra@3.3.6

Output

*Warn: Website name has been removed.

puppeteer-extra-plugin:recaptcha findRecaptchas { captchas: [ { sitekey: '6LcXfesZAAAAAJM2165Nf6nbqruGRJx8rdK6Bxa3', callback: 'bound value', _vendor: 'recaptcha', id: 'crrh0x979efg', s: null, widgetId: 0, display: [Object], url: 'https://es.xyz.com/', hasResponseElement: true, isEnterprise: true, isInViewport: true, isInvisible: false, _type: 'checkbox' } ],

puppeteer-extra-plugin:recaptcha _generateContentScript recaptcha enterRecaptchaSolutions { solutions: [ { _vendor: 'recaptcha', provider: '2captcha', id: 'crrh0x979efg', requestAt: 2023-03-06T02:37:18.820Z, providerCaptchaId: '73002728347', text: '03AFY_a8XE5MbhrIK4i3QUeIu2-cFf8CuuARdPMrjVJyUhi53pjFQvyVw0zFdaI9-2J1w9r34lvVHs3aC1EwJ6OJEvasfs5yjQj40WVGLv8ovBeX_g_6IuqEW4nFu--LNTjbBCasnKLyyyT-1dSKieYXEqFOkE6POXM_3FN2pv9Z8vllfaNtxcU1M0-zRXG4zsp3OcelTppydpqZGUvQEHMX9mU0jcjmdSYOc-xNmIu5wVatZ8_mSf7p4-aNL-e1cWpWIIuqHhDRmgcrb69tKrl_zFh2EvOg_qDjTXGeGS9QWXs6_oXOQFcboVKBltBsQv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1X92pU48d8kgevciuqru-Ul4ag4EBIPUJTu7nHLs5hV8S3pIzbgEDPcV8FjLn04CA3dNqJ9GAV6gjPYFB-IhjiUrth53X6eF5g-9n7s7jjZMWl4HJFswV3TmRjCXx-Q5ewlV5qw4C_3yttQ4NIRWQbfSYbFwfIHAcUtAD4AMC3yG1Gz-Qni8SMrPIMdaNtDNbhx3Aurp8e2kIKluOAXTMIqdn7dJl0Yw6M56l8_93Tt8eAT2_dqDhJ8sIYMWp68jUW4QK5q_97VHBe_Vr8nwBaLv6q-s1kqvqXXEMW34gvUEW6H8wvStsihdf50L5UcekflCiDjcYwCLHpIKVBp_2zfvAM4oakX7L2R6iyTWNkYEsFsnjDCQ1ySctJ8KxuZmKKcpm0xpLlBo0TabiP_C_YBhe1pSBSnDtitChsZihDvcm4FurQQ8qJmrzqin7VCmPkz9vgMT2Epgq_h6mnSBIEC1A1P4MrvSdyjXr09y_4Prm8piGw_tKNpZR5FkJj57qcGzjC-6lPwt_MnlpxQzzB-b6o', responseAt: 2023-03-06T02:38:09.587Z, hasSolution: true, duration: 50.767 } ] } +0ms puppeteer-extra-plugin:recaptcha:cs Intialized {"url":"https://es.xyz.com/","opts":{"visualFeedback":true,"debugBinding":"___pepr_cs"}} +1m puppeteer-extra-plugin:recaptcha:cs enterRecaptchaSolutions {"url":"https://es.xyz.com/","hasClients":true,"solutionNum":1} +3ms puppeteer-extra-plugin:recaptcha:cs - getClientById:client {"id":"crrh0x979egf","hasClient":true} +0ms puppeteer-extra-plugin:recaptcha:cs - getClientById:client:flatten {"id":"crrh0x979egf","hasClient":true} +3ms puppeteer-extra-plugin:recaptcha:cs - client true +1ms puppeteer-extra-plugin:recaptcha:cs - $iframe true +0ms puppeteer-extra-plugin:recaptcha:cs - $input true +1ms puppeteer-extra-plugin:recaptcha:cs - callback true +0ms puppeteer-extra-plugin:recaptcha:cs - callback - type {"typeof":"function","value":"function () { [native code] }"} +0ms puppeteer-extra-plugin:recaptcha:cs - solved {"_vendor":"recaptcha","id":"crrh0x979egf","responseElement":true,"responseCallback":true,"isSolved":true,"solvedAt":"2023-03-06T02:38:20.522Z"} +26ms puppeteer-extra-plugin:recaptcha:cs enterRecaptchaSolutions - finished {"solved":[{"_vendor":"recaptcha","id":"crrh0x979egf","responseElement":true,"responseCallback":true,"isSolved":true,"solvedAt":"2023-03-06T02:38:20.522Z"}],"error":null} +1ms puppeteer-extra-plugin:recaptcha enterRecaptchaSolutions { solved: [ { _vendor: 'recaptcha', id: 'crrh0x979efg', responseElement: true, responseCallback: true, isSolved: true, solvedAt: {} } ], error: undefined }

wingsofovnia commented 1 year ago

Have the same issue ...

rafa-9 commented 1 year ago

@josep11 @wingsofovnia any resolution? I'm wondering if this issue is with 2captcha or with puppeteer plugin?

SonecaJones commented 1 year ago

Any news on that bug. await page.waitForSelector('iframe[src*="hcaptcha"]', {waitUntil: 'networkidle0'}); let captcha; captcha = await page.solveRecaptchas(); for (const frame of page.mainFrame().childFrames()) { // Attempt to solve any potential reCAPTCHAs in those frames captcha = await frame.solveRecaptchas(); } captcha = await page.solveRecaptchas();

        console.log(captcha);

having the same problem here. Looks like the first captcha solves... but then it gets stuck. { captchas: [], filtered: [], solutions: [], solved: [], error: null } result

jaimecuimo commented 5 months ago

Same issue here, on the same website. It supposedly resolves the captcha, but then it says username/password are incorrect (which they are not)