I keep getting an error like this
org.openqa.selenium.WebDriverException: java.io.IOException: unexpected end of stream on Connection{localhost:13080, proxy=DIRECT hostAddress=localhost/127.0.0.1:13080 cipherSuite=none protocol=http/1.1}
when trying to read cookies from firefox. The exact same action can be performed with chrome with no problem. Port used is pretty random, anytime I start a new test I get a new port assigned as well. Should specifying another port be able to do something here? The line of code that produces it is:
driver.manage().getCookies().forEach(cookie -> System.out.println(cookie.toString()));
I wonder if it's an initialization problem with firefox and setting some value will get me past it. The initialization I do is just this:
FirefoxOptions Foptions = new FirefoxOptions();
Foptions.setBinary("/home/user/firefox/firefox");
Foptions.setCapability("marionette", true);
driver = new FirefoxDriver(Foptions);