Skip to content

Proxy with auth triggers dialog popup #3663

Closed
@lambdina

Description

@lambdina

Image

Hi,
trying to enable a proxy with authentication. Proxy string is "username:password@ip:port", but it still triggers a dialog popup, which is a system level popup, so not possible to interact with it with Javascript.
Since you discourage to use selenium wire or other Header injection techniques, what should I do ?

Chrome version is chrome=135.0.7049.42

Here is the code :

            browser = Driver(
                locale='fr',
                uc=True,
                user_data_dir=path_to_li_cookies,
                headless2=True,
                proxy="username:password@ip:port",
                agent=UserAgent(browsers=['Chrome', 'Edge', 'Firefox']).random,
                block_images=True,
                size=f'{random.randint(800, 1921)}, {random.randint(800, 1081)}'
            )

Thanks

Activity

lambdina

lambdina commented on Apr 9, 2025

@lambdina
Author

Good to know :
The proxy provider specifies :
Proxies format is IP:Port:Username:Password

And even when setting up the proxy manually on my laptop, I still have the dialog popup with my browser.

added
invalid usageYou may need to change what you're doing
can't reproduceWe tried to see what you saw, but didn't
UC Mode / CDP ModeUndetected Chromedriver Mode / CDP Mode
on Apr 9, 2025
mdmintz

mdmintz commented on Apr 9, 2025

@mdmintz
Member

I'm not able to reproduce this.

I also see some discrepancies in your code chunk:

  • You're setting headless, yet you somehow have a screenshot.
  • You're setting user_data_dir to what looks like a cookie dir.
  • You're setting the user agent to a possibly incompatible value.

Note that once you set the user_data_dir, you can't change the proxy after that.
The proxy that you used when initiating the user_data_dir must always be used.

mkuchuman

mkuchuman commented on Apr 10, 2025

@mkuchuman

Have the same issue only on mac, on windows work perfect

lectricas

lectricas commented on May 24, 2025

@lectricas

Same here, mac m1. 136 chrome version (seems like manifest v2 is removed and extenstions are not working. @mdmintz can you help me please?

lectricas

lectricas commented on May 24, 2025

@lectricas
from seleniumbase import SB

proxy = "usr:pwd@brd.superproxy.io:33335"

with SB(
        headless=False,
        proxy=proxy,
) as driver:
    driver.get("https://httpbin.org/ip")
    while True:
        1 + 1
Image

Chrome is up to date
Version 137.0.7151.41 (Official Build) (arm64)

attrs==25.3.0
beautifulsoup4==4.13.4
behave==1.2.6
certifi==2025.4.26
chardet==5.2.0
charset-normalizer==3.4.2
click==8.2.1
colorama==0.4.6
cssselect==1.3.0
et_xmlfile==2.0.0
exceptiongroup==1.3.0
execnet==2.1.1
fasteners==0.19
filelock==3.18.0
h11==0.16.0
idna==3.10
iniconfig==2.1.0
Jinja2==3.1.6
jsonschema==4.23.0
jsonschema-specifications==2025.4.1
loguru==0.7.0
markdown-it-py==3.0.0
MarkupSafe==3.0.2
mdurl==0.1.2
mycdp==1.2.0
notifiers==1.3.3
openpyxl==3.1.5
outcome==1.3.0.post0
packaging==25.0
parameterized==0.9.0
parse==1.20.2
parse_type==0.6.4
pdbp==1.7.0
platformdirs==4.3.8
pluggy==1.6.0
Pygments==2.19.1
pynose==1.5.4
pyotp==2.9.0
PySocks==1.7.1
pytest==8.3.5
pytest-html==4.0.2
pytest-metadata==3.1.1
pytest-ordering==0.6
pytest-rerunfailures==15.1
pytest-xdist==3.6.1
python-dotenv==1.0.1
PyYAML==6.0.2
referencing==0.36.2
requests==2.32.3
rich==14.0.0
rpds-py==0.25.1
sbvirtualdisplay==1.4.0
selenium==4.33.0
seleniumbase==4.39.0
setuptools==80.8.0
six==1.17.0
sniffio==1.3.1
sortedcontainers==2.4.0
soupsieve==2.7
tabcompleter==1.4.0
trio==0.30.0
trio-websocket==0.12.2
typing_extensions==4.13.2
urllib3==2.4.0
websocket-client==1.8.0
websockets==15.0.1
wheel==0.45.1
wsproto==1.2.0
mdmintz

mdmintz commented on May 24, 2025

@mdmintz
Member

There's a situation going on now related to extensions / setting a proxy. See #3771 for details.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    UC Mode / CDP ModeUndetected Chromedriver Mode / CDP Modecan't reproduceWe tried to see what you saw, but didn'tinvalid usageYou may need to change what you're doing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mdmintz@lectricas@lambdina@mkuchuman

        Issue actions

          Proxy with auth triggers dialog popup · Issue #3663 · seleniumbase/SeleniumBase