Skip to content

UC incorrectly assumes it has failed CF turnstile captcha #3125

@Jovvik

Description

@Jovvik

These two checks are not correct for cloudflare:

if driver.is_element_present(".footer .clearfix .ray-id"):

if driver.is_element_present(".footer .clearfix .ray-id"):

If there is #challenge-success-text present, the captcha has not failed, and the page just hasn't loaded yet (or the browser is redirected to a url with an unsupported protocol, which gets opened in an external app).

Repro (gets stuck inside uc_gui_handle_captcha), same issue with uc_gui_click_captcha:

from seleniumbase import SB

with SB(uc=True, headed=True) as sb:
    sb.uc_open_with_reconnect(
        "https://csstats.gg/match/204001348/watch/3f164c7658b19e847cc83b3096b225a192637563b50596f908aa0a104386d57c",
        reconnect_time=6
    )
    sb.uc_gui_handle_captcha()

Metadata

Metadata

Assignees

Labels

UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModebugUh oh... Something needs to be fixed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions