mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.2k stars 1.52k forks source link

[Selenium 3.5.0][Geckodriver v 0.18.0][Firefox] 55[Mac]Not able to open url in firefox browser v55 #889

Closed onlyforcoding24 closed 7 years ago

onlyforcoding24 commented 7 years ago

System

Stacktrace

11:16:55.836 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@393caec9
11:16:55.841 INFO - /status: Executing GET on /status (handler: Status)
11:16:56.774 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@4750037c
11:16:56.775 INFO - /status: Executing GET on /status (handler: Status)
11:17:00.857 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@6b911751
11:17:00.858 INFO - /status: Executing GET on /status (handler: Status)
11:17:01.783 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@28c1cbb1
11:17:01.783 INFO - /status: Executing GET on /status (handler: Status)
11:17:05.866 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@7fe1302e
11:17:05.866 INFO - /status: Executing GET on /status (handler: Status)
11:17:06.789 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@6388dfe3
11:17:06.790 INFO - /status: Executing GET on /status (handler: Status)
11:17:08.920 INFO - Binding default provider to: org.openqa.selenium.chrome.ChromeDriverService
11:17:08.921 INFO - Found handler: org.openqa.selenium.remote.server.BeginSession@5abba5dc
11:17:08.921 INFO - /session: Executing POST on /session (handler: BeginSession)
11:17:08.941 INFO - Capabilities are: Capabilities {browserName=firefox, platformName=MAC, version=55, platform=MAC, }
11:17:08.943 INFO - Capabilities {browserName=firefox, platformName=MAC, version=55, platform=MAC, } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
11:17:08.944 INFO - Capabilities {browserName=firefox, platformName=MAC, version=55, platform=MAC, } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
1503380828978   geckodriver INFO    geckodriver 0.18.0
1503380828985   geckodriver INFO    Listening on 127.0.0.1:13666
1503380829106   geckodriver::marionette INFO    Starting browser /Applications/Firefox.app/Contents/MacOS/firefox-bin with args ["-marionette"]
1503380829841   Marionette  INFO    Enabled via --marionette
11:17:10.873 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@6fae9efb
11:17:10.874 INFO - /status: Executing GET on /status (handler: Status)
2017-08-22 11:17:11.528 plugin-container[99173:3742160] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xa03f, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-08-22 11:17:11.532 plugin-container[99173:3742160] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x5507, name = 'com.apple.CFPasteboardClient'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-08-22 11:17:11.532 plugin-container[99173:3742160] void __CFPasteboardSetup() : Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions
11:17:11.795 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@b139fe2
11:17:11.796 INFO - /status: Executing GET on /status (handler: Status)
1503380831861   Marionette  INFO    Listening on port 55746
JavaScript error: chrome://marionette/content/server.js, line 337: NS_ERROR_SOCKET_ADDRESS_IN_USE: Component returned failure code: 0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE) [nsIServerSocket.initSpecialConnection]
1503380831960   Marionette  DEBUG   loaded listener.js
11:17:12.084 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@2e9817f4
11:17:12.085 INFO - Handler thread for session 37c0baf8-9bbe-ee45-8136-6f7852ccb972 (firefox): Executing POST on /session/37c0baf8-9bbe-ee45-8136-6f7852ccb972/window/current/maximize (handler: ServicedSession)
11:17:13.146 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@2e9817f4
11:17:13.146 INFO - Handler thread for session 37c0baf8-9bbe-ee45-8136-6f7852ccb972 (firefox): Executing POST on /session/37c0baf8-9bbe-ee45-8136-6f7852ccb972/execute (handler: ServicedSession)
11:17:13.315 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@2e9817f4
11:17:13.316 INFO - Handler thread for session 37c0baf8-9bbe-ee45-8136-6f7852ccb972 (firefox): Executing POST on /session/37c0baf8-9bbe-ee45-8136-6f7852ccb972/execute (handler: ServicedSession)
11:17:13.358 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@2e9817f4
11:17:13.359 INFO - Handler thread for session 37c0baf8-9bbe-ee45-8136-6f7852ccb972 (firefox): Executing DELETE on /session/37c0baf8-9bbe-ee45-8136-6f7852ccb972 (handler: ServicedSession)
1503380833364   Marionette  INFO    New connections will no longer be accepted
11:17:13.534 INFO - Removing session org.openqa.selenium.remote.server.ServicedSession@2e9817f4
11:17:15.882 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@7d85beee
11:17:15.882 INFO - /status: Executing GET on /status (handler: Status)
11:17:16.802 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@40e0a1a3
11:17:16.803 INFO - /status: Executing GET on /status (handler: Status)
11:17:20.893 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@8ef813
11:17:20.894 INFO - /status: Executing GET on /status (handler: Status)
11:17:21.812 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@50036822
11:17:21.812 INFO - /status: Executing GET on /status (handler: Status)
11:17:25.905 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@408d0de0
11:17:25.905 INFO - /status: Executing GET on /status (handler: Status)
11:17:26.820 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@70adaba0
11:17:26.820 INFO - /status: Executing GET on /status (handler: Status)
11:17:30.913 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@66da764d
11:17:30.913 INFO - /status: Executing GET on /status (handler: Status)
11:17:31.828 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@10a500eb
11:17:31.828 INFO - /status: Executing GET on /status (handler: Status)
11:17:35.927 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@44554f4f
11:17:35.927 INFO - /status: Executing GET on /status (handler: Status)
11:17:36.835 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status@5e826084
11:17:36.835 INFO - /status: Executing GET on /status (handler: Status)
1

Actual Error In Log :

Getting following error

**JavaScript error: chrome://marionette/content/server.js, line 337: NS_ERROR_SOCKET_ADDRESS_IN_USE: Component returned failure code: 0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE) [nsIServerSocket.initSpecialConnection]**
andreastt commented 7 years ago

This means exactly what the error message says: you already have a process with a socket bound to the port geckodriver is attempting to bind to. By default geckodriver binds to port 4444, but it is possible to override this with the -p flag.

I recommend binding to port 0 and having the system atomically allocate a free port.

anupamdas24 commented 7 years ago

@andreastt : Could you please let me know how exactly we can use -p flag to bind the geckodriver to any other port.

andreastt commented 7 years ago
% ./geckodriver -p 6789
1503414921335   geckodriver INFO    geckodriver 0.18.0 (0000000000000000000000000000000000000000 2017-08-22)
1503414921340   geckodriver INFO    Listening on 127.0.0.1:6789
anupamdas24 commented 7 years ago

@andreastt Getting the same issue, even after following the above instructions.

Steps followed:

  1. Launched Terminal and executed the command as ./geckodriver -p 6789
  2. Executed the application from the Eclipse IDE.
  3. Firefox browser launched but the URL is not passed to it.

Issues Found as below:

Running TestSuite 1503429718000 geckodriver INFO geckodriver 0.18.0 1503429718004 geckodriver INFO Listening on 127.0.0.1:11213 1503429718456 geckodriver::marionette INFO Starting browser /Applications/Firefox.app/Contents/MacOS/firefox-bin with args ["-marionette"] 1503429719344 Marionette INFO Enabled via --marionette 1503429721038 Marionette INFO Listening on port 59482 JavaScript error: chrome://marionette/content/server.js, line 337: NS_ERROR_SOCKET_ADDRESS_IN_USE: Component returned failure code: 0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE) [nsIServerSocket.initSpecialConnection] JavaScript error: , line 0: TypeError: NetworkError when attempting to fetch resource. 1503429721820 addons.productaddons WARN Failed downloading XML, status: 0, reason: error 1503429722873 addons.productaddons WARN Failed downloading via XHR, status: 0, reason: error

anupamdas24 commented 7 years ago

Also I tried with many other port numbers, but found the same issue existing.

andreastt commented 7 years ago

If you read your logs carefully, your client is binding geckodriver to port 11213:

1503429718004 geckodriver INFO Listening on 127.0.0.1:11213

Apparently something is already bound to that port, so Maironette fails to start the TCP listener.

anupamdas24 commented 7 years ago

Actually it is geckodriver only.

image

Even though I tried killing the process and reexecuted it , but found the same issue.

whimboo commented 7 years ago

This has nothing to do with geckodriver, Selenium, or profiles. It was just a bug in Marionette which has been fixed in bug 1254136 for Firefox 57 and 56. You will always see the problem in 55, but it should not cause you any problems.

anupamdas24 commented 7 years ago

@whimboo But how to get the firefox 57 and 56 ??? The nightly firefox is not working at all. Even I am not able to launch the URLs manually in the nightly firefox version.

whimboo commented 7 years ago

Firefox specific issues even being able to manually reproduce are clearly a different topic and better covered at https://support.mozilla.org/en-US/products/firefox. Not sure which problem you have.

Otherwise download the latest Firefox 56.0 beta and you should be also fine.

Sanchit-20 commented 6 years ago

Java :openjdk version "1.8.0_151" OS : Ubuntu (16.04 LTS) Browser : Mozilla Firefox 57.0.1 (64-bit) Selenium java jar file : 3.8.1 Mozilla Gecko webdriver :0.19.0 Browser is opened but unable to open the URL.

Code public static void main(String[] args) { //System.setProperty("webdriver.gecko.driver","/home/sanchit/eclipse-workspace/geckodriver.exe"); System.setProperty("webdriver.firefox.marionette","/home/sanchit/eclipse-workspace/geckodriver.exe"); WebDriver driver = new FirefoxDriver(); // Launches Firefox Browser with blank url driver.get("https://www.google.com"); // Navigates to the specified URL String Title = driver.getTitle(); System.out.println(Title); driver.close(); // Closes the Browser }

Getting following exception. Exception in thread "main" org.openqa.selenium.WebDriverException: Timed out waiting 45 seconds for Firefox to start. Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:14.666Z' System info: host: 'sanchit-Vostro-3558', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-101-generic', java.version: '1.8.0_151' Driver info: driver.version: FirefoxDriver at org.openqa.selenium.firefox.XpiDriverService.waitUntilAvailable(XpiDriverService.java:131) at org.openqa.selenium.firefox.XpiDriverService.start(XpiDriverService.java:116) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:120) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:98) at newpackage.Myclass.main(Myclass.java:12) Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:18379/hub/status] to be available after 45039 ms at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100) at org.openqa.selenium.firefox.XpiDriverService.waitUntilAvailable(XpiDriverService.java:129) ... 8 more Caused by: java.util.concurrent.TimeoutException at java.util.concurrent.FutureTask.get(FutureTask.java:205) at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:147) at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75) ... 9 more

Please someone help me to fix it, i am struggling with this since yesterday.

whimboo commented 6 years ago

@Sanchit-20 please do not hijack an issue of someone else which also is closed. File a new issue for your problem and make sure to attach a trace log.