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.14k stars 1.17k forks source link

weird error? #616

Open avilabss opened 2 years ago

avilabss commented 2 years ago
Process Process-1:
Traceback (most recent call last):
  File "C:\Users\USER\AppData\Local\Programs\Python\Python39-32\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\USER\AppData\Local\Programs\Python\Python39-32\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\USER\.virtualenvs\ad-clicker-idaRXG-1\lib\site-packages\undetected_chromedriver\dprocess.py", line 59, in _start_detached
    p = Popen([executable, *args], stdin=PIPE, stdout=PIPE, stderr=PIPE, **kwargs)
  File "C:\Users\USER\AppData\Local\Programs\Python\Python39-32\lib\subprocess.py", line 951, in _init_
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\USER\AppData\Local\Programs\Python\Python39-32\lib\subprocess.py", line 1360, in _execute_child
    args = list2cmdline(args)
  File "C:\Users\USER\AppData\Local\Programs\Python\Python39-32\lib\subprocess.py", line 565, in list2cmdline
    for arg in map(os.fsdecode, seq):
  File "C:\Users\USER\AppData\Local\Programs\Python\Python39-32\lib\os.py", line 822, in fsdecode
    filename = fspath(filename)  # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[08:44][ERR]Traceback (most recent call last):
  File "c:\- linkedin\ad-clicker\run.py", line 175, in main
    driver = get_driver(proxy)
  File "c:\- linkedin\ad-clicker\src\browser\get_driver.py", line 120, in get_driver
    driver = webdriver.Chrome(options=options)
  File "C:\Users\USER\.virtualenvs\ad-clicker-idaRXG-1\lib\site-packages\undetected_chromedriver\_init.py", line 388, in __init_
    self.browser_pid = start_detached(
  File "C:\Users\USER\.virtualenvs\ad-clicker-idaRXG-1\lib\site-packages\undetected_chromedriver\dprocess.py", line 37, in start_detached
    pid = reader.recv()
  File "C:\Users\USER\AppData\Local\Programs\Python\Python39-32\lib\multiprocessing\connection.py", line 255, in recv
    buf = self._recv_bytes()
  File "C:\Users\USER\AppData\Local\Programs\Python\Python39-32\lib\multiprocessing\connection.py", line 310, in _recv_bytes
    waitres = _winapi.WaitForMultipleObjects(
KeyboardInterrupt
sebdelsol commented 2 years ago

This is a duplicate. Your error message is barely readable, please format it.

File "C:\Users\USER\AppData\Local\Programs\Python\Python39-32\lib\os.py", line 822, 
in fsdecode filename = fspath(filename) # Does type-checking of filename. 
TypeError: expected str, bytes or os.PathLike object, not NoneType

It means your Chrome executable hasn't been found, uc.find_chrome_executable() returns None :

import undetected_chromedriver as uc
print(uc.find_chrome_executable())  # print nothing

So your Chrome browser is probably not installed in its standard path. Reinstall it or use browser_executable_path argument for uc.Chrome() to specify your browser executable path (please check the docstring here).

avilabss commented 2 years ago

I am reinstalling with default settings, still it fails to find

sebdelsol commented 2 years ago

EDIT: thanks for formatting the error log, it helps.

avilabss commented 2 years ago

It returns -> None

sebdelsol commented 2 years ago

What's the actual path of your Chrome browser executable on your system ? EDIT : when you've found out use browser_executable_path argument to point to it and please close the bug.

ghost commented 2 years ago

Pls answer that

avilabss commented 2 years ago

Hi, we can consider this close, I'm no longer using the project as it never worked for me

ghost commented 2 years ago

Are you using the app on the server?

avilabss commented 2 years ago

if the server is headless then you would need to use xvfb along with selenium

ghost commented 2 years ago

xfvb nedir ?

ghost commented 2 years ago

I'm using Windows Server 2019

avilabss commented 2 years ago

we can talk on discord: https://discord.gg/jv6K8rrX