Unable to obtain driver for chrome using Selenium Manager

et là 2nd cmde ?

sudo python3 -c "import selenium; print(selenium.__version__)"

est ce que peux relancer un « refresh » sur un des équipements ( → pour avoir l’erreur dans le plugin plus haut), puis refaire

sudo ls -l /root/.cache/selenium/chrome/linux64

jeedom@JeedomAtlas:~$ sudo python3 -c "import selenium; print(selenium.__version__)"
4.11.2

j’ai fait un « scanner » dans le plugin, il refait bien l’erreur

mais pas d’arbo

jeedom@JeedomAtlas:~$ sudo ls -l /root/.cache/selenium/chrome/linux64
ls: impossible d'accéder à '/root/.cache/selenium/chrome/linux64': Aucun fichier ou dossier de ce type

selenium n’existe pas

jeedom@JeedomAtlas:~$ sudo ls -l /root/.cache/selenium
ls: impossible d'accéder à '/root/.cache/selenium': Aucun fichier ou dossier de ce type

:confused: :confused:

sur la page de configuration du plugin, tu peux mettre Niveau de log Python = DEBUG
relancer un scan
et partager les logs

[2023-11-23 13:56:08]DEBUG : Task 'syncNoIp' executed now
[2023-11-23 13:56:08]INFO : Début de synchronisation
[2023-11-23 13:56:08]INFO : Starting daemon with cmd >>sudo python3 /var/www/html/plugins/noip/core/class/../../resources/noip-renew.py  --loglevel debug --user xxxx --pwd "***********" --threshold 7 --renew 0 --noip_path /var/www/html/plugins/noip/core/class/../..<<
[2023-11-23 13:56:09]INFO : Log level : debug
[2023-11-23 13:56:09]INFO : User : xxxx
[2023-11-23 13:56:09]INFO : Threshold : 7
[2023-11-23 13:56:09]INFO : Renew : 0
[2023-11-23 13:56:09]DEBUG : Selenium Manager binary found at: /usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/linux/selenium-manager
[2023-11-23 13:56:09]DEBUG : Executing process: /usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/linux/selenium-manager --browser chrome --debug --output json
[2023-11-23 13:56:09]ERROR : Exception has been thrown. Message: Unable to obtain driver for chrome using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
[2023-11-23 13:56:09]DEBUG : [Multimédia][NoIP] file content:
[2023-11-23 13:56:09]ERROR : [Multimédia][NoIP] file content empty
[2023-11-23 13:56:09]INFO : Fin de la synchronisation

les logs python, je les récupères où ?

faut peut être aussi cocher « verbose » ?

non non c’est bon :slight_smile:

j’ai ce qu’il faut au dessus
mais je n’arrive pas à comprendre ce qu’il n’aime pas …
on a la même version de selenium

jeedom@jeedomDev:/usr/bin$ sudo python3 -c "import selenium; print(selenium.__version__)"
4.11.2

pourtant quand je lance la commande de synchro

0006|[2023-11-23 14:12:54][DEBUG] : Selenium Manager binary found at: /usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/linux/selenium-manager
0007|[2023-11-23 14:12:54][DEBUG] : Executing process: /usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/linux/selenium-manager --browser chrome --debug --output json
0008|[2023-11-23 14:13:16][DEBUG] : Checking chromedriver in PATH
0009|[2023-11-23 14:13:16][DEBUG] : Running command: chromedriver --version
0010|[2023-11-23 14:13:16][DEBUG] : Output: ""
0011|[2023-11-23 14:13:16][DEBUG] : chromedriver not found in PATH
0012|[2023-11-23 14:13:16][DEBUG] : Checking chrome in PATH
0013|[2023-11-23 14:13:16][DEBUG] : Running command: which chrome
0014|[2023-11-23 14:13:16][DEBUG] : Output: ""
0015|[2023-11-23 14:13:16][DEBUG] : chrome not found in PATH
0016|[2023-11-23 14:13:16][DEBUG] : chrome has not been discovered in the system
0017|[2023-11-23 14:13:16][DEBUG] : Reading metadata from https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json
0018|[2023-11-23 14:13:16][DEBUG] : Required browser: chrome 119.0.6045.105
0019|[2023-11-23 14:13:16][DEBUG] : Downloading chrome 119.0.6045.105 from https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/linux64/chrome-linux64.zip
0020|[2023-11-23 14:13:16][DEBUG] : chrome 119.0.6045.105 has been downloaded at /root/.cache/selenium/chrome/linux64/119.0.6045.105/chrome
0021|[2023-11-23 14:13:16][DEBUG] : Reading metadata from https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json
0022|[2023-11-23 14:13:16][DEBUG] : Required driver: chromedriver 119.0.6045.105
0023|[2023-11-23 14:13:16][DEBUG] : Driver URL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/linux64/chromedriver-linux64.zip
0024|[2023-11-23 14:13:16][DEBUG] : Driver path: /root/.cache/selenium/chromedriver/linux64/119.0.6045.105/chromedriver
0025|[2023-11-23 14:13:16][DEBUG] : Browser path: /root/.cache/selenium/chrome/linux64/119.0.6045.105/chrome
0026|[2023-11-23 14:13:16][DEBUG] : Using driver at: /root/.cache/selenium/chromedriver/linux64/119.0.6045.105/chromedriver

il dit bien qu’il ne trouve pas chromedriver et donc il se charge de le télécharger.
là où visiblement chez toi/vous … ça ne le fait pas …

bref essayons à la main du coup … avec les 3 commandes suivantes :

wget -qP /tmp/ "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/linux64/chromedriver-linux64.zip"
sudo unzip -oj /tmp/chromedriver-linux64.zip -d /usr/bin
sudo chmod 755 /usr/bin/chromedriver

puis un nouveau scan ensuite

jeedom@JeedomAtlas:~$ wget -qP /tmp/ "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/linux64/chromedriver-linux64.zip"
jeedom@JeedomAtlas:~$ sudo unzip -oj /tmp/chromedriver-linux64.zip -d /usr/bin
Archive:  /tmp/chromedriver-linux64.zip
  inflating: /usr/bin/LICENSE.chromedriver
  inflating: /usr/bin/chromedriver
jeedom@JeedomAtlas:~$ sudo chmod 755 /usr/bin/chromedriver
[2023-11-23 14:11:14]DEBUG : Task 'syncNoIp' executed now
[2023-11-23 14:11:14]INFO : Début de synchronisation
[2023-11-23 14:11:14]INFO : Starting daemon with cmd >>sudo python3 /var/www/html/plugins/noip/core/class/../../resources/noip-renew.py  --loglevel debug --user xxx --pwd "***********" --threshold 7 --renew 0 --noip_path /var/www/html/plugins/noip/core/class/../..<<
[2023-11-23 14:11:14]INFO : Log level : debug
[2023-11-23 14:11:14]INFO : User : xxxx
[2023-11-23 14:11:14]INFO : Threshold : 7
[2023-11-23 14:11:14]INFO : Renew : 0
[2023-11-23 14:11:14]DEBUG : Selenium Manager binary found at: /usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/linux/selenium-manager
[2023-11-23 14:11:14]DEBUG : Executing process: /usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/linux/selenium-manager --browser chrome --debug --output json
[2023-11-23 14:11:14]ERROR : Exception has been thrown. Message: Unable to obtain driver for chrome using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
[2023-11-23 14:11:15]DEBUG : [Multimédia][NoIP] file content:
[2023-11-23 14:11:15]ERROR : [Multimédia][NoIP] file content empty
[2023-11-23 14:11:15]INFO : Fin de la synchronisation

le dernier essaie, après … je donne ma langue au chat pour l’instant …

on désinstalle selenium (x2 : un normal et un sudo : c’est normal) , puis le réinstall :

pip3 uninstall selenium
sudo pip3 uninstall selenium

sudo pip3 install selenium
jeedom@JeedomAtlas:/usr/bin$ pip3 uninstall selenium
Found existing installation: selenium 4.11.2
Uninstalling selenium-4.11.2:
  Would remove:
    /usr/local/lib/python3.7/dist-packages/selenium-4.11.2.dist-info/*
    /usr/local/lib/python3.7/dist-packages/selenium/*
Proceed (Y/n)? sudo pip3 uninstall selenium
Your response ('sudo pip3 uninstall selenium') was not one of the expected responses: y, n,
Proceed (Y/n)? Y
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.7/shutil.py", line 563, in move
    os.rename(src, real_dst)
OSError: [Errno 18] Lien physique inter-périphérique invalide: '/usr/local/lib/python3.7/dist-packages/selenium-4.11.2.dist-info/' -> '/tmp/pip-uninstall-69h9u17v'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/commands/uninstall.py", line 107, in run
    verbose=self.verbosity > 0,
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/req/req_install.py", line 725, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/req/req_uninstall.py", line 381, in remove
    moved.stash(path)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/req/req_uninstall.py", line 272, in stash
    renames(path, new_path)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/utils/misc.py", line 362, in renames
    shutil.move(old, new)
  File "/usr/lib/python3.7/shutil.py", line 575, in move
    rmtree(src)
  File "/usr/lib/python3.7/shutil.py", line 491, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib/python3.7/shutil.py", line 449, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/usr/lib/python3.7/shutil.py", line 447, in _rmtree_safe_fd
    os.unlink(entry.name, dir_fd=topfd)
PermissionError: [Errno 13] Permission non accordée: 'METADATA'
jeedom@JeedomAtlas:/usr/bin$ sudo pip3 uninstall selenium
Found existing installation: selenium 4.11.2
Uninstalling selenium-4.11.2:
  Would remove:
    /usr/local/lib/python3.7/dist-packages/selenium-4.11.2.dist-info/*
    /usr/local/lib/python3.7/dist-packages/selenium/*
Proceed (Y/n)? Y
  Successfully uninstalled selenium-4.11.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
jeedom@JeedomAtlas:/usr/bin$ sudo pip3 install selenium
Collecting selenium
  Using cached selenium-4.11.2-py3-none-any.whl.metadata (7.0 kB)
Requirement already satisfied: urllib3<3,>=1.26 in /usr/local/lib/python3.7/dist-packages (from urllib3[socks]<3,>=1.26->selenium) (2.0.7)
Requirement already satisfied: trio~=0.17 in /usr/local/lib/python3.7/dist-packages (from selenium) (0.22.2)
Requirement already satisfied: trio-websocket~=0.9 in /usr/local/lib/python3.7/dist-packages (from selenium) (0.11.1)
Requirement already satisfied: certifi>=2021.10.8 in /usr/local/lib/python3.7/dist-packages (from selenium) (2023.11.17)
Requirement already satisfied: attrs>=20.1.0 in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (23.1.0)
Requirement already satisfied: sortedcontainers in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (2.4.0)
Requirement already satisfied: idna in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (3.4)
Requirement already satisfied: outcome in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (1.3.0.post0)
Requirement already satisfied: sniffio in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (1.3.0)
Requirement already satisfied: exceptiongroup>=1.0.0rc9 in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (1.1.3)
Requirement already satisfied: wsproto>=0.14 in /usr/local/lib/python3.7/dist-packages (from trio-websocket~=0.9->selenium) (1.2.0)
Requirement already satisfied: pysocks!=1.5.7,<2.0,>=1.5.6 in /usr/local/lib/python3.7/dist-packages (from urllib3[socks]<3,>=1.26->selenium) (1.7.1)
Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from attrs>=20.1.0->trio~=0.17->selenium) (1.7.0)
Requirement already satisfied: h11<1,>=0.9.0 in /usr/local/lib/python3.7/dist-packages (from wsproto>=0.14->trio-websocket~=0.9->selenium) (0.14.0)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from h11<1,>=0.9.0->wsproto>=0.14->trio-websocket~=0.9->selenium) (4.7.1)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->attrs>=20.1.0->trio~=0.17->selenium) (3.15.0)
Using cached selenium-4.11.2-py3-none-any.whl (7.2 MB)
Installing collected packages: selenium
Successfully installed selenium-4.11.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

toujours l’erreur :frowning:

un reboot est envisageable ?

reboot

scanner

toujours l’erreur

tu veux un accès pour jeter un oeil ?

sans + de log …?

honnetement là tout de suite, je ne vois pas quoi faire de + comme test …

:melting_face:
je vais pas avoir une réponse qui va faire avancer la résolution du problème mais :
@tomitomas : on est tous avec toi :slight_smile: merci de tes efforts quoi qu’il advienne

1 « J'aime »

oui idem

[2023-11-23 15:08:54]DEBUG : Task 'syncNoIp' executed now
[2023-11-23 15:08:55]INFO : Début de synchronisation
[2023-11-23 15:08:55]INFO : Starting daemon with cmd >>sudo python3 /var/www/html/plugins/noip/core/class/../../resources/noip-renew.py  --loglevel debug --user xxxx --pwd "***********" --threshold 7 --renew 0 --noip_path /var/www/html/plugins/noip/core/class/../..<<
[2023-11-23 15:08:55]INFO : Log level : debug
[2023-11-23 15:08:55]INFO : User : xxxx
[2023-11-23 15:08:55]INFO : Threshold : 7
[2023-11-23 15:08:55]INFO : Renew : 0
[2023-11-23 15:08:55]DEBUG : Selenium Manager binary found at: /usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/linux/selenium-manager
[2023-11-23 15:08:55]DEBUG : Executing process: /usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/linux/selenium-manager --browser chrome --debug --output json
[2023-11-23 15:08:55]ERROR : Exception has been thrown. Message: Unable to obtain driver for chrome using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
[2023-11-23 15:08:55]DEBUG : [Multimédia][NoIP] file content:
[2023-11-23 15:08:55]ERROR : [Multimédia][NoIP] file content empty
[2023-11-23 15:08:55]INFO : Fin de la synchronisation

la page d’info ne donne pas de piste sur ce qui poserait problème ?

il semble y avoir des échanges sur le sujet

mais je ne sais pas si cela correspond à ce problème

nop pour 2 raisons :

  1. on a fait l’install manuellement donc ca devrait le faire
  2. comme je l’indique plus haut, en théorie on n’a rien à faire et c’est bien confirmé sur ta page :

As of Selenium 4.6, Selenium downloads the correct driver for you. You shouldn’t need to do anything.

tu es en version 4.11, donc bien après la 4.6 !

chromedriver --version 

retourne un truc chez toi ?


jeedom@JeedomAtlas:~$ chromedriver --version
-bash: /usr/bin/chromedriver : impossible d'exécuter le fichier binaire : Erreur de format pour exec()

ca semble plus fonctionner, j’avais fait cette commande il y a 5h (voir plus haut) et cela fonctionnait

uname  -a
jeedom@JeedomAtlas:~$ uname  -a
Linux JeedomAtlas 5.10.43-rockchip64 #21.05.4 SMP PREEMPT Wed Jun 16 08:02:12 UTC 2021 aarch64 GNU/Linux

wget -qP /tmp/ "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/mac-arm64/chromedriver-mac-arm64.zip"
sudo unzip -oj /tmp/chromedriver-mac-arm64.zip -d /usr/bin
sudo chmod 755 /usr/bin/chromedriver