selenium icon indicating copy to clipboard operation
selenium copied to clipboard

WebDriverException: Message: Can't load the profile.

Open Azlirn opened this issue 10 years ago • 12 comments

Hey guys, Trying to figure this one out and I can't seem to come up with a solution based on the research I have done. Any help would greatly be appreciated.

Thanks!

  • Cyb3rdude

Meta

OS: OSX 10.10.5 Selenium Version: 2.53.6 Browser: Firefox Browser Version: 48.0.2 64bit

Expected Behavior -

Mozilla Firefox opens with specified url, takes screenshot, saves, and closes browser.

Actual Behavior -

Mozilla Firefox times out. This issue has been tested on Linux Mint and OSX, both with identical versions of software, and the issue only presents itself on OSX.

Steps to reproduce

Following appropriate software and version numbers above:

from selenium import webdriver
import os, time, datetime

twitLink = "https://www.google.com"
user = "Google"

imageName = str('image.png')
browser = webdriver.Firefox()
browser.get(url)
#wait for page to load
time.sleep(5)

browser.save_screenshot(imageName)
browser.quit()

The resulting error:

Traceback (most recent call last):
  File "screenGrab.py", line 14, in <module>
    browser = webdriver.Firefox()
  File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 80, in __init__
    self.binary, timeout)
  File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in __init__
    self.binary.launch_browser(self.profile, timeout=timeout)
  File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
    self._wait_until_connectable(timeout=timeout)
  File "/Library/Python/2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 108, in _wait_until_connectable
    % (self.profile.path))
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: /var/folders/7s/zf9wc9kj1z5_q9y2_sl1q4b80000gp/T/tmpnQOnTG If you specified a log_file in the FirefoxBinary constructor, check it for details.

Azlirn avatar Sep 20 '16 17:09 Azlirn

I had the same issue with selenium 2.53.6 and FF-48.0.2 64bit.

Using FF-46.0.1 solved the issue for me as of now. It may be that latest FF have changed the access configurations.

rahul2503 avatar Sep 21 '16 12:09 rahul2503

I had this same issue, but only when using pypy 5.1.2. The problem disappeared when I switched to cpython in the same machine. I also don't encounter this issue on a different machine that uses pypy 5.3.1.

jinchoice avatar Sep 21 '16 16:09 jinchoice

Actually, sorry pypy wasn't the issue. It appears this has something to do with supervisor in my case. I'm running selenium through a celery task. When I run celery in the command line (not using supervisor), selenium runs fine. When I run the exact same command using supervisor, I get the error.

jinchoice avatar Sep 21 '16 16:09 jinchoice

I'm on Ubuntu 16.04 LTS and I encountered this error this morning after upgrading to Firefox 49. The very same error

naveenpanwar avatar Sep 23 '16 06:09 naveenpanwar

On Mac I have the same error macOS 10.12(16A323) firefox 49.0 Python 3.5.2 selenium==2.53.6

driver = webdriver.Firefox() File "/Users/kentaro/python/ven_superlist/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 80, in init self.binary, timeout) File "/Users/kentaro/python/ven_superlist/lib/python3.5/site-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in init self.binary.launch_browser(self.profile, timeout=timeout) File "/Users/kentaro/python/ven_superlist/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser self._wait_until_connectable(timeout=timeout) File "/Users/kentaro/python/ven_superlist/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 108, in _wait_until_connectable % (self.profile.path)) selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: /var/folders/vl/nj7qbspd7hlgll3chjfgvl400000gn/T/tmpussk8r2l If you specified a log_file in the FirefoxBinary constructor, check it for details.

kentaro0919 avatar Sep 23 '16 06:09 kentaro0919

Just had this same error on Ubuntu 16.04. Everything was working perfectly until today, not sure what changed. Using Firefox Version 49

arowden avatar Sep 24 '16 09:09 arowden

Ubuntu 16.04 LTS, Firefox v49.

`======================================================================

ERROR: test_Google (WebdriverTest2.WebdriverTest2)

Traceback (most recent call last): File "/home/erian655/git/ladok/selenium/testsuite_test/WebdriverTest2.py", line 9, in setUp self.driver = webdriver.Firefox() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 80, in init self.binary, timeout) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in init self.binary.launch_browser(self.profile, timeout=timeout) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser self._wait_until_connectable(timeout=timeout) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 108, in _wait_until_connectable % (self.profile.path)) WebDriverException: Message: Can't load the profile. Profile Dir: /tmp/tmpCwkK7b If you specified a log_file in the FirefoxBinary constructor, check it for details. `

kirean avatar Sep 26 '16 08:09 kirean

Same issue here: ArchLinux 4.7.4 x86_64

Firefox 49.0.1 Selenium 2.53.6 Python 3.5.2 & 2.7.12

But it is working with Chromium 53.0.2785.116

skropf avatar Sep 26 '16 09:09 skropf

Looks like it's the same problem : https://github.com/SeleniumHQ/selenium/issues/2739

polku avatar Sep 26 '16 09:09 polku

As I mentioned above FF 46.0.1 would resolve this issue as of now.

But, no such issue is generated using chromium or chrome(any version).

rahul2503 avatar Sep 26 '16 09:09 rahul2503

Duplicate of #2739 which is due to Extension signing from Mozilla

AutomatedTester avatar Sep 26 '16 10:09 AutomatedTester

@rahul2503 Spot on. FF 46.0 works for me.

Here are the versions that works for me on MacOS 10.12.6

Python 3.6.3 FF 46.0 Geckodriver 0.19.1 Selenium 3.9.0

maxnathaniel avatar Feb 13 '18 14:02 maxnathaniel