You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case, I'm developing a Django project which uses selenium and invokes the geckodriver. When I run from the command line, it works fine. When I run it from PyCharm (installed via snap), the geckodriver returns this error:
selenium.common.exceptions.SessionNotCreatedException: Message: Failed to start browser /snap/firefox/current/firefox.launcher: no such file or directory
If I'm reading the code right, it checks for the SNAP_INSTANCE_NAME environment variable, but doesn't check its contents. When running from Pycharm, the geckodriver process inherits the value SNAP_INSTANCE_NAME=pycharm-professional and then tries to find firefox at /snap/firefox/current/firefox.launcher instead of its actual location at /usr/bin/firefox
I can verify this by executing my test suite like this:
SNAP_INSTANCE_NAME=foo ./manage.py test
Traceback (most recent call last):
...
selenium.common.exceptions.SessionNotCreatedException: Message: Failed to start browser /snap/firefox/current/firefox.launcher: no such file or directory
whereas without that variable set, the tests run fine.
The text was updated successfully, but these errors were encountered:
i had the same problem, i solved it on my linux-ubuntu 20.04 by a symlink firefox.launcher in new directory /snap/firefox/current/ to /usr/bin/firefox. It's not elegant, but it works.
sudo mkdir /snap/firefox/current
sudo ln -s /usr/bin/firefox /snap/firefox/current/
sudo mv firefox firefox.launcher
System
In my case, I'm developing a Django project which uses selenium and invokes the geckodriver. When I run from the command line, it works fine. When I run it from PyCharm (installed via snap), the geckodriver returns this error:
I believe this is due to the recent bug https://bugzilla.mozilla.org/show_bug.cgi?id=1769991 and its fix https://hg.mozilla.org/mozilla-central/rev/93e827afaac1
If I'm reading the code right, it checks for the
SNAP_INSTANCE_NAME
environment variable, but doesn't check its contents. When running from Pycharm, the geckodriver process inherits the valueSNAP_INSTANCE_NAME=pycharm-professional
and then tries to find firefox at /snap/firefox/current/firefox.launcher instead of its actual location at /usr/bin/firefoxI can verify this by executing my test suite like this:
whereas without that variable set, the tests run fine.
The text was updated successfully, but these errors were encountered: