Could not start a new session. Response code 500. Message: unknown error: cannot find Chrome binary

மாற்று வழி ஒன்றை முயல்வோமா?

குரோமை விடுத்து பயர்பாக்சு உலாவியை பயன்படுத்துங்கள்.

மேலே உள்ள இணைப்பைக் காண்க.

1 Like
sudo apt purge -y chromium google-chrome-stable; sudo apt autoremove --purge -y

இதை கொடுத்து முதலில் தங்கள் கணினியில் உள்ள chromium மற்றும் google-crome-stable எனும் பேக்கேஜ்களை நீக்கவும். பிறகு இங்கே கூறவும்.

பேக்கேஜ்களை நீக்கிவிட்டேன்

 Could not start a new session. Response code 500. Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line
Build info: version: '4.2.2', revision: '683ccb65d

நான் பயர்பாக்ஸ் பயன்படுத்தினேன்.
பிழை வருகிறது

இங்கு பைதான் நிரல் உள்ளது. இதற்கேற்ப உங்கள் நிரலை மாற்றுங்கள்.

இங்கு உள்ளவற்றையும் செய்யுங்கள்.

உங்கள் நிரலையும் பகிருங்கள்.

இத்த இனைப்பிற்கு சென்று Download Chrome என்பதை கிளிக் செய்யவும். பின் 64 bit .deb என்படை தேர்வு செய்து Accept and Install கொடுக்கவும். இப்போது chrome ன் .deb கோப்பு பதிவிறக்கம் செய்யப்படும். முடிந்தபின் இந்த கமாண்டை கொடுக்கவும்.

sudo apt install ~/Downloads/google-chrome-stable_current_amd64.deb

இந்த கமாண்டை இயக்கி google-chrome நிருவிய பிறகு பின்வரும் கமாண்டை இயக்கவும்

google-chrome-stable --version

வரும் version ஐ பொருத்து பின்வரும் இணைப்பிற்கு சென்று சரியான chromedriver ன் version லிங்கை கிளிக் செய்யவும்.

வரும் இணையப்பக்கத்தில் chromedriver_linux64.zip என்பதை பதிவிறக்கம் செய்யவும்.
பின் இந்த கமாண்டை இயக்கவும்

unzip ~/Downloads/chromedriver_linux64.zip

பின் இந்த கமாண்டை இயக்கவும்

sudo cp chromedriver /usr/bin; sudo chown root:root /usr/bin/chromedriver

இப்போது இந்த கமாண்டை இயக்கி வரும் திரையை பகிரவும்

google-chrome-stable --version; chromedriver --version
kamal@kamal-Lenovo-G50-80:~$ google-chrome-stable --version; chromedriver --version
Google Chrome 103.0.5060.114 
ChromeDriver 103.0.5060.53 (a1711811edd74ff1cf2150f36ffa3b0dae40b17f-refs/branch-heads/5060@{#853})

stock overflow link -யை என்னால் புரிந்து கொள்ள முடியவில்லை.

அருமை. இப்போது இந்த கமாண்டை இயக்கவும்

curl https://paste.rs/YGp | base64 -d | tar xvzf -

பின் கீழே வரும் கமாண்டை இயக்கவும்

DEV=1 ./selenium-test/scripts/bootstrap poetry run ./src/selenium-test.py

இந்த கமாண்டை கொடுத்தால் இறுதி வரியில் Google என்று காட்டுகின்றதா என்று பார்க்கவும். அப்படி காட்டினால் தங்கள் கணினியில் selenium என்பது python நிரல்மொழி வழியாக சரியாக இயங்குகின்றது என்று பொருள். தங்கள் java வில் ஏது தவறு செய்துள்ளீர்கள். அதை சரி செய்ய முயற்சிக்கவும்.

kamal@kamal-Lenovo-G50-80:~$ DEV=1 ./selenium-test/scripts/bootstrap poetry run ./src/selenium-test.py
Traceback (most recent call last):
  File "<stdin>", line 33593, in <module>
  File "<stdin>", line 135, in main
  File "<stdin>", line 111, in bootstrap
  File "<stdin>", line 92, in monkeypatch_for_cert
  File "<frozen zipimport>", line 259, in load_module
  File "/tmp/tmp5p0jtvfc/pip.zip/pip/_internal/commands/__init__.py", line 9, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/tmp/tmp5p0jtvfc/pip.zip/pip/_internal/cli/base_command.py", line 15, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/tmp/tmp5p0jtvfc/pip.zip/pip/_internal/cli/cmdoptions.py", line 24, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/tmp/tmp5p0jtvfc/pip.zip/pip/_internal/cli/parser.py", line 12, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/tmp/tmp5p0jtvfc/pip.zip/pip/_internal/configuration.py", line 26, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/tmp/tmp5p0jtvfc/pip.zip/pip/_internal/utils/logging.py", line 29, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/tmp/tmp5p0jtvfc/pip.zip/pip/_internal/utils/misc.py", line 42, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/tmp/tmp5p0jtvfc/pip.zip/pip/_internal/locations/__init__.py", line 14, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/tmp/tmp5p0jtvfc/pip.zip/pip/_internal/locations/_distutils.py", line 9, in <module>
ModuleNotFoundError: No module named 'distutils.cmd'
failed to install pip
kamal@kamal-Lenovo-G50-80:~$

Google and chrome இந்த சொல் வரவில்லை

sudo apt install -y python3-distutils

இதை இயக்கவும். பின்பு முன்பு கொடுத்த கமாண்டை இயக்கவும்.

kamal@kamal-Lenovo-G50-80:~$ DEV=1 ./selenium-test/scripts/bootstrap poetry run ./src/selenium-test.py
Defaulting to user installation because normal site-packages is not writeable
Collecting pip
  Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 245.3 kB/s eta 0:00:00
Collecting setuptools
  Downloading setuptools-63.1.0-py3-none-any.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 214.1 kB/s eta 0:00:00
Collecting wheel
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, setuptools, pip
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
launchpadlib 1.10.13 requires testresources, which is not installed.
Successfully installed pip-22.1.2 setuptools-63.1.0 wheel-0.37.1
# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/home/kamal/selenium-test/.poetryinst/poetry/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (https://github.com/python-poetry/poetry.git): Creating environment
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt install python3.8-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: ['/home/kamal/selenium-test/.poetryinst/poetry/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']

./selenium-test/scripts/bootstrap: line 45: poetry: command not found
failed to install dependencies
./selenium-test/scripts/bootstrap: line 46: poetry: command not found

பிழை வருகிறது

sudo apt install -y python3.8-venv

இந்த கமாண்டை கொடுக்கவும். பின்பு முன்பே பதிவிறக்கம் செய்த selenium-test டைரக்டரியை டெலிட் செய்யவும். பிறகு

இதில் கொடுக்கப்பட்ட இரண்டு கமாண்டுகளையும் இயக்கவும். இறுதி வரியில் Google என்று வருகின்றதா என்று பார்ககவும்.

How to delete selenium -test

ctrl-alt-t கொடுத்து வரும் டெர்மினலில்

cd
mv selenium-test selenium-test.old.0
curl https://paste.rs/YGp | base64 -d | tar xvzf -
DEV=1 ./selenium-test/scripts/bootstrap poetry run ./src/selenium-test.py

இந்த நான்கு கமாண்டுகளையும் இயக்கவும். இறுதி வரியில் Google வருகின்றதா என்று பார்க்கவும்.

kamal@kamal-Lenovo-G50-80:~$ DEV=1 ./selenium-test/scripts/bootstrap poetry run ./src/selenium-test.py
Defaulting to user installation because normal site-packages is not writeable
Collecting pip
  Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 1.4 MB/s eta 0:00:00
Collecting setuptools
  Downloading setuptools-63.1.0-py3-none-any.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 1.6 MB/s eta 0:00:00
Collecting wheel
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, setuptools, pip
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
launchpadlib 1.10.13 requires testresources, which is not installed.
Successfully installed pip-22.1.2 setuptools-63.1.0 wheel-0.37.1
# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/home/kamal/selenium-test/.poetryinst/poetry/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (https://github.com/python-poetry/poetry.git): Creating enviroInstalling Poetry (https://github.com/python-poetry/poetry.git): Installing PoetInstalling Poetry (https://github.com/python-poetry/poetry.git): An error occurred. Removing partial environment.
Poetry installation failed.
See /home/kamal/poetry-installer-error-zk0rpxkf.log for error logs.
./selenium-test/scripts/bootstrap: line 45: poetry: command not found
failed to install dependencies
./selenium-test/scripts/bootstrap: line 46: poetry: command not found
kamal@kamal-Lenovo-G50-80:~$ ^C

பிழை வருகிறது

curl --data-binary @/home/kamal/poetry-installer-error-zk0rpxkf.log https://paste.rs

இந்த கமாண்டை கொடுத்து வரும் இணைப்பை (url) இங்கு பகிரவும்.

kamal@kamal-Lenovo-G50-80:~$ curl --data-binary @/home/kamal/poetry-installer-error-zk0rpxkf.log https://paste.rs
https://paste.rs/Nk2
kamal@kamal-Lenovo-G50-80:~$
sudo apt install -y git
cd
mv selenium-test selenium-test.old.1
curl https://paste.rs/YGp | base64 -d | tar xvzf -
DEV=1 ./selenium-test/scripts/bootstrap poetry run ./src/selenium-test.py

இந்த கமாண்டுகளை இயக்கவும்.

Creating virtualenv selenium-test-Q_wdoBIG-py3.8 in /home/kamal/selenium-test/.poetryinst/poetry/virtualenvs
Installing dependencies from lock file

Package operations: 18 installs, 0 updates, 0 removals

  • Installing pycparser (2.21)
  • Installing attrs (21.4.0)
  • Installing cffi (1.15.1)
  • Installing async-generator (1.10)
  • Installing cryptography (37.0.3)
  • Installing h11 (0.13.0)
  • Installing idna (3.3)
  • Installing outcome (1.2.0)
  • Installing sniffio (1.2.0)
  • Installing sortedcontainers (2.4.0)
  • Installing certifi (2022.6.15)
  • Installing pyopenssl (22.0.0)
  • Installing pysocks (1.7.1)
  • Installing trio (0.21.0)
  • Installing wsproto (1.1.0)
  • Installing trio-websocket (0.9.2)
  • Installing urllib3 (1.26.9)
  • Installing selenium (4.3.0)
Google
kamal@kamal-Lenovo-G50-80:~$

Google இந்த சொல் வருகிறது