ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
10.06k stars 1.17k forks source link

[Nodriver] Headless mode fails #2040

Open ktantikarun opened 1 month ago

ktantikarun commented 1 month ago

Hi. I am getting the error below when trying to run in headless mode

Exception has occurred: TypeError cannot unpack non-iterable NoneType object
  File "/Users/Workspace/project/src/main.py", line 39, in init_nodriver
    browser = await uc.start(
              ^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object

Any ideas how this is possible ? I've seen some people able to use nodriver in headless mode. So this is apparently not happening to everyone. Here is the command I use to start nodriver

browser = await uc.start(
        headless=True,
        browser_args=['--disable-web-security'],
    )

I am using Chrome Version 129.0.6668.90 (Official Build) (arm64) in mac

Naik-G commented 1 month ago

facing same issue on win 11

tikene commented 1 month ago

this works for me

browser_args.append(f"--headless=new")

ktantikarun commented 1 month ago

this works for me

browser_args.append(f"--headless=new")

Thanks a lot! It works for me as well.

stephanlensky commented 3 weeks ago

Related issue: https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/2013

Since nodriver has not seen much maintenance recently, I created a fork which includes the fix for this: https://github.com/stephanlensky/zendriver