“org.openqa.selenium.WebDriverException: java.net.SocketException: Software caused connection abort: recv failed” when trying to launch Firefox

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



“org.openqa.selenium.WebDriverException: java.net.SocketException: Software caused connection abort: recv failed” when trying to launch Firefox



I am using Selenium 3.12,gecko driver version-21 and i have Firefox-61 installed on my system.



I am trying to launch Firefox using the code below:


System.setProperty("java.net.preferIPv4Stack" , "true");
System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir") + "\geckodriver.exe");
FirefoxOptions options = new FirefoxOptions();
options.setCapability("marionette", true);
options.setLogLevel(FirefoxDriverLogLevel.TRACE);
options.setBinary("C:\Program Files\Mozilla Firefox\firefox.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile fxProfile = profile.getProfile("xyzProfile");
fxProfile.setPreference(FirefoxProfile.PORT_PREFERENCE,7056);
driver = new FirefoxDriver(options);



However i am getting the below error and not able to even launch the browser-



org.openqa.selenium.WebDriverException: java.net.SocketException:
Software caused connection abort: recv failed Build info: version:
'3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z' System
info: host: 'INDA201695', ip: '10.164.59.166', os.name: 'Windows 7',
os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131' Driver
info: driver.version: FirefoxDriver



Please help as to what is causing this error and how can i fix the same?





How are you trying to launch Firefox? Using new/existing FirefoxProfile? What is your exact usecase?
– New contributor
Aug 10 at 9:32


trying to launch Firefox


FirefoxProfile





I am trying to launch firefox using existing profile.I even tried without mentioning the profile statements but it did not work.
– Tripti Saigal
Aug 13 at 5:30






The exact use case is just to launch firefox and browse the url of my application.
– Tripti Saigal
Aug 13 at 5:38





Check this discussion stackoverflow.com/questions/49683355/…
– New contributor
Aug 13 at 5:42





I tried with the code mentioned on this link. But still i am unable to launch firefox and getting the error message while debugging: org.openqa.selenium.WebDriverException: java.net.SocketException: Software caused connection abort: recv failed Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z' System info: host: 'INDA201695', ip: '10.164.59.166', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131' Driver info: driver.version: FirefoxDriver
– Tripti Saigal
Aug 16 at 11:14




1 Answer
1



This error message...


org.openqa.selenium.WebDriverException: java.net.SocketException: Software caused connection abort: recv failed
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z'
System info: host: 'INDA201695', ip: '10.164.59.166', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: driver.version: FirefoxDriver



...implies that the GeckoDriver was unable to initiate/spawn a new WebBrowsing Session i.e. Firefox Browser session.



Your main issue is the incompatibility between the version of the binaries you are using as follows:



So there is a clear mismatch between the JDK v8u131 and other binaries.


Test






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS