Skip to content
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

[Nodriver] Headless mode fails #2040

Open
ktantikarun opened this issue Oct 7, 2024 · 4 comments
Open

[Nodriver] Headless mode fails #2040

ktantikarun opened this issue Oct 7, 2024 · 4 comments

Comments

@ktantikarun
Copy link

ktantikarun commented Oct 7, 2024

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
Copy link

Naik-G commented Oct 10, 2024

facing same issue on win 11

@tikene
Copy link

tikene commented Oct 10, 2024

this works for me

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

@ktantikarun
Copy link
Author

this works for me

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

Thanks a lot! It works for me as well.

@stephanlensky
Copy link

Related issue: #2013

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

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

No branches or pull requests

4 participants