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

[Bug] puppeteer-extra-plugin-recaptcha 3.4.0 does not recognize some captchas

Open allandiego opened this issue 3 years ago • 5 comments

Describe the bug puppeteer-extra-plugin-recaptcha version 3.4.0 does not recognize some captchas that version 3.3.0 was recognizing. Example: https://www2.detran.rj.gov.br/portal/multas/nadaConsta

log debug

  puppeteer-extra-plugin:recaptcha:cs Intialized {"url":"https://www2.detran.rj.gov.br/portal/multas/nadaConsta","opts":{"visualFeedback":true,"debugBinding":"___pepr_cs"}} +0ms        
  puppeteer-extra-plugin:recaptcha:cs findRecaptchas {"url":"https://www2.detran.rj.gov.br/portal/multas/nadaConsta","hasClients":true} +0ms
  puppeteer-extra-plugin:recaptcha:cs getVisibleIframesIds ["gjtkyk3y5rg2"] +0ms
  puppeteer-extra-plugin:recaptcha:cs getInvisibleIframesIds ["gjtkyk3y5rg2"] +1ms
  puppeteer-extra-plugin:stealth/evasions/sourceurl Stripping sourceURL { method: 'Runtime.evaluate' } +7ms
  puppeteer-extra-plugin:stealth/evasions/sourceurl Stripping sourceURL { method: 'Runtime.evaluate' } +1ms
  puppeteer-extra-plugin:stealth/evasions/sourceurl Stripping sourceURL { method: 'Runtime.evaluate' } +1ms
  puppeteer-extra-plugin:stealth/evasions/sourceurl Stripping sourceURL { method: 'Runtime.evaluate' } +0ms
  puppeteer-extra-plugin:recaptcha:cs getIframesIds ["gjtkyk3y5rg2","gjtkyk3y5rg2"] +3ms
  puppeteer-extra-plugin:recaptcha:cs getIframesIds - dedup [] +0ms
  puppeteer-extra-plugin:recaptcha:cs findRecaptchas - result {"captchaNum":0,"result":{"captchas":[],"error":null}} +0ms
  puppeteer-extra-plugin:stealth/evasions/sourceurl Stripping sourceURL { method: 'Runtime.evaluate' } +1ms
  puppeteer-extra-plugin:stealth/evasions/sourceurl Stripping sourceURL { method: 'Runtime.evaluate' } +0ms
  puppeteer-extra-plugin:stealth/evasions/sourceurl Stripping sourceURL { method: 'Runtime.evaluate' } +1ms
  puppeteer-extra-plugin:recaptcha _generateContentScript hcaptcha findRecaptchas undefined +0ms
  puppeteer-extra-plugin:stealth/evasions/sourceurl Stripping sourceURL { method: 'Runtime.evaluate' } +0ms
  puppeteer-extra-plugin:recaptcha Filter results: 0 of 0 captchas filtered from results. +0ms
  puppeteer-extra-plugin:recaptcha findRecaptchas { captchas: [], filtered: [], error: null } +0ms
  puppeteer-extra-plugin:recaptcha solveRecaptchas { captchas: [], filtered: [], solutions: [], solved: [], error: null } +0ms

Versions

"puppeteer": "^10.0.0",
"puppeteer-extra": "^3.1.18",
"puppeteer-extra-plugin-recaptcha": "3.4.0",
"puppeteer-extra-plugin-stealth": "^2.7.8",

allandiego avatar Jun 01 '21 22:06 allandiego

I've found this to be true as well — specifically for Google reCaptcha v3 captchas. Returning to 3.3.0 resolved the issue. I'm happy to help troubleshoot what might have changed.

jonkratz avatar Aug 31 '21 21:08 jonkratz

This log entry is super weird:

  puppeteer-extra-plugin:recaptcha:cs getIframesIds ["gjtkyk3y5rg2","gjtkyk3y5rg2"] +3ms
  puppeteer-extra-plugin:recaptcha:cs getIframesIds - dedup [] +0ms

The code in question is this:

    this.log('getIframesIds', results)
    // Deduplicate results by using the unique id as key
    const dedup = Array.from(new Set(results))
    this.log('getIframesIds - dedup', dedup)

Which makes no sense:

Array.from(new Set(["gjtkyk3y5rg2","gjtkyk3y5rg2"]))
// => ["gjtkyk3y5rg2"]

berstend avatar Sep 13 '21 05:09 berstend

On amazon captcha, it gives this result, and nothing happens about solving the captcha:

{ captchas: [], solutions: [], solved: [], error: null }

I think there is also problem with detection of captcha's on amazon.

yusuferenayas avatar Sep 20 '21 15:09 yusuferenayas

Amazon reCaptcha cannot be detected in version 3.3.0.

What is the status of this issue?

kurohoan avatar Oct 27 '21 03:10 kurohoan

There's also an issue now with detecting hCaptcha in the latest browser version due to the use of the deprecated url.parse method within the injected hCaptcha detection script. The error is silent and leads to the script not being able to detect the existence of hCaptcha in page. It can be solved by switching url.parse to new URL().

dekelev avatar Feb 14 '22 14:02 dekelev