Jenkins can't launch selenium tests (Timed out waiting for profile to be created) Jenkins can't launch selenium tests (Timed out waiting for profile to be created) jenkins jenkins

Jenkins can't launch selenium tests (Timed out waiting for profile to be created)


I was recently having this issue too.

I first tried the method mentioned here : http://www.spacevatican.org/2008/9/27/selenium-and-firefox-3 However this fix now seems out of date, as the plugin maxVersion properties were all set to 8.something.

The way I fixed it (as mentioned here : http://www.centripetal.ca/blog/2011/02/07/getting-started-with-selenium-and-jenkins/) was to provide Selenium with a firefox profile.

Steps

  1. Open up Firefox profile manager : $ firefox -ProfileManager
  2. Create a new profile, called Selenium
  3. Now, when running the selenium command, add "-firefoxProfileTemplate "/home/{username}/.mozilla/firefox/{profile dir}" to the command. (where {username} is your username and {profile dir} is the profile directory, which for me was "6f2um01h.Selenium"

My final Selenium command was

$ sudo java -jar /var/lib/jenkins/tools/selenium/selenium-server.jar -htmlSuite *firefox http://google.com "/var/lib/jenkins/jobs/Selenium setup test/workspace/tests/test-testsuite.html" "/var/lib/jenkins/jobs/Selenium setup test/workspace/results/results.html" -log=/tmp/selenium.log -debug=true -firefoxProfileTemplate "/home/username/.mozilla/firefox/6f2um01h.Selenium"

I would also recommend copying and pasting the shell command that jenkins is using into Terminal, to save having to run it through Jenkins each time.


N.B. I'm currently finding that Selenium now hangs (and doesn't crash) on the next step of it's process (Launching Firefox) but this seems like a different bug which I've added to stackoverflow here : Selenium hangs when launching Firefox on Ubuntu


I have similar issues. But the cause and solution are different.

The program (I use python) hangs for a while, and then output:

selenium.common.exceptions.WebDriverException: Message: 'The browser appears to have exited before we could connect. The output was: * LOG addons.xpi: startup\n* LOG addons.xpi: checkForChanges\n*** LOG addons.xpi: Opening database\n*** LOG addons.xpi: No changes found\nFailed to dlopen /usr/lib/libX11.so.6\ndlerror says: /usr/lib/libX11.so.6: wrong ELF class: ELFCLASS32\n'

It is because I have installed both 32 and 64 bit version of libX11. By removing libX11 32 bit version, the program works.


@mattbilson's solution didn't work for me, but I found a different solution to a problem with the same symtomps. I believe In the process of trying to debug the problem, multiple versions of Firefox had been installed, and not all from clean deb packages.

To fix the problem I did:

sudo apt-get purge firefoxsudo mv /usr/lib/firefox /usr/lib/firefox.baksudo apt-get install firefox=<MY_FIREFOX_VERSION>

After that I could run the Selenium JAR without any special parameters.