Skip to content

Options().add_argument('--window-size=X,X') stopped working since 3.4.5; Last working version 3.4.4 #1100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
danielrzad opened this issue Feb 28, 2023 · 7 comments · May be fixed by #1187

Comments

@danielrzad
Copy link

Hi!
I just want to inform that Options().add_argument('--window-size=X,X') stopped working since version 3.4.5 (also not working in 3.4.6). Last working version is 3.4.4. I had hard time today debugging this so I'm posting this just in case someone else would be able to avoid those troubles.

@donggoing
Copy link

I seem encountered the same problem.

shubham-agrawal referenced this issue Mar 1, 2023
damn versioning

    **patch to fix headless mode**
    currently headless undetected:
    https://i.imgur.com/CME9ElR.png

    (but still unsupported!)

    -https://stackoverflow.com/a/73840130/7058266
    -https://support.google.com/chrome/a/answer/7679408#hdlssMod110

    thanks @mdmintz for this info
@Andrezitooo
Copy link

Hi! I just want to inform that Options().add_argument('--window-size=X,X') stopped working since version 3.4.5 (also not working in 3.4.6). Last working version is 3.4.4. I had hard time today debugging this so I'm posting this just in case someone else would be able to avoid those troubles.

just created an account to tell you i love you lol. lost 24h of my life trying to find workarounds, you are the man!

@huyangnl
Copy link

huyangnl commented Mar 11, 2023

I encountered the same problem....
and further more, i print all arguments out:

['--no-first-run --no-service-autorun --password-store=basic --no-default-browser-check --window-size=1200, 800', '--proxy-server=127.0.0.1:2226', '--proxy-bypass-list=<-loopback>', '--remote-debugging-host=127.0.0.1', '--remote-debugging-port=2230', '--user-data-dir=C:\Users\achil\AppData\Local\Temp\tmpa06lg9u0', '--lang=zh-CN', '--no-default-browser-check', '--no-first-run', '--no-sandbox', '--test-type', '--window-size=1920,1080', '--start-maximized', '--no-sandbox', '--log-level=0']

I found only the bold part is from my script, others from -proxy-server=127.0.0.1:2226 are not ....

@kaliiiiiiiiii
Copy link

At undetected_chromedriver/init.py#L379, undetected-chromedriver adds some arguments by default:/

@wind-rain-sky
Copy link

I also encountered this issue, is there any solution? Rolling back to 3.4.4 also requires an older version of the browser, which is not what I want.

@wind-rain-sky
Copy link

I have find a solution.
use Xvfb and pyvirtualdisplay
don't use headless
for the more question, ask chatgpt

@deniskzt
Copy link

i solved the problem:
brws.get("https://wikipedia.org")
brws.set_window_size(1220,2600)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants