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

FileNotFoundError when starting app (ARM) #51

Open
tired9494 opened this issue Apr 29, 2023 · 6 comments
Open

FileNotFoundError when starting app (ARM) #51

tired9494 opened this issue Apr 29, 2023 · 6 comments

Comments

@tired9494
Copy link

I'm using Debian and have installed undetected_chromedriver via PIP. I get a FileNotFoundError when trying to run the app (the main menu works fine). I'm not great with Linux, so I might've not installed it properly

Exception in thread Thread-2 (start_chrome):
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/tired/ow-league-tokens/src/app.py", line 33, in start_chrome
[2023-04-29 11:16:09,465 - INFO] patching driver executable /home/tired/.local/share/undetected_chromedriver/undetected_chromedriver
    driver = uc.Chrome(
             ^^^^^^^^^^
  File "/home/tired/.local/lib/python3.11/site-packages/undetected_chromedriver/__init__.py", line 246, in __init__
    self.patcher.auto()
  File "/home/tired/.local/lib/python3.11/site-packages/undetected_chromedriver/patcher.py", line 127, in auto
    self.unzip_package(self.fetch_package())
  File "/home/tired/.local/lib/python3.11/site-packages/undetected_chromedriver/patcher.py", line 180, in unzip_package
    os.rename(os.path.join(self.zip_path, self.exe_name), self.executable_path)
FileNotFoundError: [Errno 2] No such file or directory: '/home/tired/.local/share/undetected_chromedriver/undetected/chromedriver' -> '/home/tired/.local/share/undetected_chromedriver/undetected_chromedriver'
Exception in thread Thread-3 (start_chrome):
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/tired/ow-league-tokens/src/app.py", line 33, in start_chrome
    driver = uc.Chrome(
             ^^^^^^^^^^
  File "/home/tired/.local/lib/python3.11/site-packages/undetected_chromedriver/__init__.py", line 246, in __init__
    self.patcher.auto()
  File "/home/tired/.local/lib/python3.11/site-packages/undetected_chromedriver/patcher.py", line 127, in auto
    self.unzip_package(self.fetch_package())
  File "/home/tired/.local/lib/python3.11/site-packages/undetected_chromedriver/patcher.py", line 180, in unzip_package
    os.rename(os.path.join(self.zip_path, self.exe_name), self.executable_path)
FileNotFoundError: [Errno 2] No such file or directory: '/home/tired/.local/share/undetected_chromedriver/undetected/chromedriver' -> '/home/tired/.local/share/undetected_chromedriver/undetected_chromedriver'
Exception in thread Thread-5 (start_chrome):
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/tired/ow-league-tokens/src/app.py", line 33, in start_chrome
    driver = uc.Chrome(
             ^^^^^^^^^^
  File "/home/tired/.local/lib/python3.11/site-packages/undetected_chromedriver/__init__.py", line 246, in __init__
    self.patcher.auto()
  File "/home/tired/.local/lib/python3.11/site-packages/undetected_chromedriver/patcher.py", line 127, in auto
    self.unzip_package(self.fetch_package())
  File "/home/tired/.local/lib/python3.11/site-packages/undetected_chromedriver/patcher.py", line 180, in unzip_package
    os.rename(os.path.join(self.zip_path, self.exe_name), self.executable_path)
FileNotFoundError: [Errno 2] No such file or directory: '/home/tired/.local/share/undetected_chromedriver/undetected/chromedriver' -> '/home/tired/.local/share/undetected_chromedriver/undetected_chromedriver'
Exception in thread Thread-6 (start_chrome):
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/tired/ow-league-tokens/src/app.py", line 33, in start_chrome
    driver = uc.Chrome(
             ^^^^^^^^^^
  File "/home/tired/.local/lib/python3.11/site-packages/undetected_chromedriver/__init__.py", line 441, in __init__
    super(Chrome, self).__init__(
  File "/home/tired/.local/lib/python3.11/site-packages/selenium/webdriver/chrome/webdriver.py", line 84, in __init__
    super().__init__(
  File "/home/tired/.local/lib/python3.11/site-packages/selenium/webdriver/chromium/webdriver.py", line 101, in __init__
    self.service.start()
  File "/home/tired/.local/lib/python3.11/site-packages/selenium/webdriver/common/service.py", line 96, in start
    self._start_process(self._path)
  File "/home/tired/.local/lib/python3.11/site-packages/selenium/webdriver/common/service.py", line 197, in _start_process
    self.process = subprocess.Popen(
                   ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.11/subprocess.py", line 1901, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/tired/.local/share/undetected_chromedriver/undetected_chromedriver'
@tired9494
Copy link
Author

Yeah seems like it's an issue with my installation. Don't think undetected_chromedriver works on ARM

@ucarno
Copy link
Owner

ucarno commented Apr 30, 2023

Yeah seems like it's an issue with my installation. Don't think undetected_chromedriver works on ARM

Look at this issue, there is a problem description and a workaround for it.

@tired9494
Copy link
Author

Thanks! I got it to somewhat work but I randomly get cannot connect to chrome at 127.0.0.1 errors https://pastebin.com/8fS9Sd69

I can see the chromium tabs open. For some reason, a new chromium tab also opens for each profile (so 2 YT tabs, 2 empty tabs). The youtube tabs sometimes open the stream but not always. Sometimes only one of the profiles opens the stream.

@tired9494
Copy link
Author

In the last log neither of the youtube tabs went onto the stream. In this log they both open the stream: https://pastebin.com/KbkbaxGj

@ucarno
Copy link
Owner

ucarno commented May 5, 2023

Does problem persist in newer release?

@ucarno ucarno changed the title FileNotFoundError when starting app FileNotFoundError when starting app (ARM) May 5, 2023
@tired9494
Copy link
Author

tired9494 commented May 5, 2023

I still get the Exec format error. After editing app.py to specify a path to an ARM version (driver = uc.Chrome(driver_executable_path="/home/tired/.local/share/undetected_chromedriver/chromedriver_108")) I get the cannot connect to chrome error again. I didn't see any chromium windows open and headless is disabled

console log attached:
unexpected-error_2023-05-05T20-01-09.txt

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

2 participants