Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64 bit FirefoxDriver does not launch the browser while running on 32 bit jdk #3525

Closed
ghost opened this issue Feb 17, 2017 · 4 comments
Closed

Comments

@ghost
Copy link

ghost commented Feb 17, 2017

Meta -

OS: Windows

Selenium Version: 3.0.1

Browser: Firefox

Browser Version: 51 (and Any)

Expected Behavior -

Firefox browser should launch.

Actual Behavior -

Firefox browser does not launch and shows the following exception

Exception in thread "main" org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA
Build info: version: 'unknown', revision: '1969d75', time: '2016-10-18 09:43:45 -0700'
System info: host: 'agent100', ip: '101.102.103.104', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0'
Driver info: driver.version: FirefoxDriver
	at org.openqa.selenium.firefox.internal.Executable.<init>(Executable.java:75)
	at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:60)
	at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:56)
	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:127)
	at com.abc.test.TestFF.main(TestFF.java:5)

Steps to reproduce -

Run the following java program using a 32 bit jre on a machine with 64 bit Firefox browser.

package com.abc.test;
import org.openqa.selenium.firefox.FirefoxDriver;
public class TestFF {
	public static void main(String[] args) throws Exception {
		FirefoxDriver ff = new FirefoxDriver();
		ff.close();
		ff.quit();
	}
}
@barancev
Copy link
Member

barancev commented Mar 3, 2017

This is a question rather than an issue. Please send questions to the selenium user group

@barancev barancev closed this as completed Mar 3, 2017
@ghost
Copy link
Author

ghost commented Mar 6, 2017

64 bit FirefoxDriver does not launch the browser while running on 32 bit jdk. This is not a question
This is an issue in selenium 3.0.1. The source has changed, FirefoxBinary.java (locateFirefoxBinariesFromPlatform method), and WindowsUtils.java(getPathsInProgramFiles method). Ill update the issue if this is still reproducible in the latest release.

@ghost
Copy link
Author

ghost commented Mar 6, 2017

Im able to reproduce this issue with selenium 3.2.0 as well.

org.openqa.selenium.os.WindowsUtils, getPathsInProgramFiles method, both the calls to getProgramFilesPath() and getProgramFilesPath() returns "C:\Program Files (x86)", when a 32bit jvm is used. (Firefox 64 bit is installed in "C:\Program Files")

This method from WindowsUtils is called from locateFirefoxBinariesFromPlatform method in org.openqa.selenium.firefox.FirefoxBinary.

Workaround is to set the "webdriver.firefox.bin" system property.

@ghost
Copy link
Author

ghost commented Jul 31, 2017

Why not simply using a 64-bit JVM with Mozilla Firefox 64-bit? When the "bitness" of the web browser differs from the bitness of the JVM, I don't see how Selenium can guess which directory to use and keep in mind that you could install 2 different versions of Firefox with 2 different bitnesses (32-bit and 64-bit). Therefore, your workaround is acceptable to me. In my humble opinion, this is a limitation, this isn't a bug... except if you consider that Selenium should look for Firefox binaries in all program files directories whatever the bitness of the JVM.

Tom-Trumper pushed a commit to Tom-Trumper/selenium that referenced this issue Sep 11, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant