mozilla / geckodriver

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

Unable to run Selenium Webdriver script using Jenkins on Linux Server #910

Closed hardeepkukreja closed 7 years ago

hardeepkukreja commented 7 years ago

System

Started by user Hardeep [EnvInject] - Loading node environment variables. Building remotely on automation (slave) in workspace /home/hipaat/jenkins/workspace/demoAutomationProject Updating https://server/PeS-repos/trunk/PrivacyESuite/trunk/automation/hipaatNewProject at revision '2017-08-29T17:05:48.947 -0400' Using sole credentials ppyette/** in realm ‘https://172.10.10.2:443 Subversion Repository’ At revision 9649

No changes for https://server/PeS-repos/trunk/PrivacyESuite/trunk/automation/hipaatNewProject since the previous build Parsing POMs Established TCP socket on 36497 maven32-agent.jar already up to date maven32-interceptor.jar already up to date maven3-interceptor-commons.jar already up to date [demoAutomationProject] $ /home/hipaat/jdk8/bin/java -cp /home/hipaat/jenkins/maven32-agent.jar:/home/hipaat/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Slave/boot/plexus-classworlds-2.5.2.jar:/home/hipaat/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Slave/conf/logging jenkins.maven3.agent.Maven32Main /home/hipaat/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Slave /root/.cache/icedtea-web/cache/0/http/172.10.10.2/jenkins/jnlpJars/remoting.jar /home/hipaat/jenkins/maven32-interceptor.jar /home/hipaat/jenkins/maven3-interceptor-commons.jar 36497 <===[JENKINS REMOTING CAPACITY]===>channel started Executing Maven: -B -f /home/hipaat/jenkins/workspace/demoAutomationProject/pom.xml clean install -U

[INFO] Scanning for projects... [HUDSON] Collecting dependencies info [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building HIPAAT Privacy eSuite Test Automation 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------

[INFO] Downloading: https://repo.maven.apache.org/maven2/org/seleniumhq/selenium/selenium-api/maven-metadata.xml

[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/seleniumhq/selenium/selenium-api/maven-metadata.xml (4 KB at 3.8 KB/sec) [INFO] Downloading: https://repo.maven.apache.org/maven2/org/seleniumhq/selenium/selenium-support/maven-metadata.xml [INFO] Downloaded: https://repo.maven.apache.org/maven2/org/seleniumhq/selenium/selenium-support/maven-metadata.xml (4 KB at 53.8 KB/sec) [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ automation ---

[INFO] Deleting /home/hipaat/jenkins/workspace/demoAutomationProject/target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ automation --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/hipaat/jenkins/workspace/demoAutomationProject/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ automation ---

[INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /home/hipaat/jenkins/workspace/demoAutomationProject/target/classes

[INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ automation --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/hipaat/jenkins/workspace/demoAutomationProject/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ automation --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /home/hipaat/jenkins/workspace/demoAutomationProject/target/test-classes

[INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ automation --- [INFO] Surefire report directory: /home/hipaat/jenkins/workspace/demoAutomationProject/target/surefire-reports


T E S T S

Running com.hipaat.automation.ActivateAPolicyTest Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@ed17bee

1504040769442 geckodriver INFO geckodriver 0.18.0 1504040769475 geckodriver INFO Listening on 127.0.0.1:19905

1504040769971 geckodriver::marionette INFO Starting browser /home/hipaat/firefox/firefox with args ["-marionette"]

1504040770938 Marionette INFO Enabled via --marionette

(firefox:27173): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:27173): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:27173): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:27173): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/home/hipaat/firefox/firefox:27275): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/home/hipaat/firefox/firefox:27275): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(/home/hipaat/firefox/firefox:27275): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(/home/hipaat/firefox/firefox:27275): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

1504040773760 Marionette INFO Listening on port 40844 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] 1504040774085 Marionette DEBUG loaded listener.js Aug 29, 2017 5:06:14 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C 1504040774699 Marionette DEBUG Received DOM event "beforeunload" for "about:blank"

1504040774944 Marionette DEBUG Received DOM event "pagehide" for "about:blank" 1504040774944 Marionette DEBUG Received DOM event "unload" for "about:blank"

1504040776949 Marionette DEBUG Received DOM event "DOMContentLoaded" for "http://35.196.133.90:8080/esuite-admin/authenticate.jsf" 1504040777048 Marionette DEBUG Received DOM event "pageshow" for "http://35.196.133.90:8080/esuite-admin/authenticate.jsf"

1504040778824 Marionette DEBUG Canceled page load listener because no navigation has been detected

1504040778986 Marionette DEBUG Received DOM event "beforeunload" for "http://35.196.133.90:8080/esuite-admin/authenticate.jsf" 1504040779455 Marionette DEBUG Received DOM event "pagehide" for "http://35.196.133.90:8080/esuite-admin/authenticate.jsf" 1504040779457 Marionette DEBUG Received DOM event "unload" for "http://35.196.133.90:8080/esuite-admin/authenticate.jsf"

1504040780641 Marionette DEBUG Received DOM event "DOMContentLoaded" for "http://35.196.133.90:8080/esuite-admin/authenticate.jsf;jsessionid=77805851CB0831838662C6FEAFC7E57E" 1504040780696 Marionette DEBUG Received DOM event "pageshow" for "http://35.196.133.90:8080/esuite-admin/authenticate.jsf;jsessionid=77805851CB0831838662C6FEAFC7E57E"

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.353 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[JENKINS] Recording test results

[INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ automation ---

[INFO] Building jar: /home/hipaat/jenkins/workspace/demoAutomationProject/target/automation-0.0.1-SNAPSHOT.jar [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ automation --- [INFO] Installing /home/hipaat/jenkins/workspace/demoAutomationProject/target/automation-0.0.1-SNAPSHOT.jar to /root/.m2/repository/com/hipaat/automation/0.0.1-SNAPSHOT/automation-0.0.1-SNAPSHOT.jar [INFO] Installing /home/hipaat/jenkins/workspace/demoAutomationProject/pom.xml to /root/.m2/repository/com/hipaat/automation/0.0.1-SNAPSHOT/automation-0.0.1-SNAPSHOT.pom

[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 33.097 s [INFO] Finished at: 2017-08-29T17:06:30-04:00 [INFO] Final Memory: 26M/63M [INFO] ------------------------------------------------------------------------ [JENKINS] Archiving /home/hipaat/jenkins/workspace/demoAutomationProject/pom.xml to com.hipaat/automation/0.0.1-SNAPSHOT/automation-0.0.1-SNAPSHOT.pom [JENKINS] Archiving /home/hipaat/jenkins/workspace/demoAutomationProject/target/automation-0.0.1-SNAPSHOT.jar to com.hipaat/automation/0.0.1-SNAPSHOT/automation-0.0.1-SNAPSHOT.jar channel stopped

Finished: SUCCESS

Unable to figure out the problem. Please guide.

whimboo commented 7 years ago

Sorry, but I don't see where the problem is. As the last log shows there is Finished: SUCCESS. Maybe you attached the wrong log? Also please not to attach a Trace log as requested when filing an issue.

ulrichsg commented 7 years ago

I had a similar issue today (same ref_count assertion failures and NS_ERROR_SOCKET_ADDRESS_IN_USE error code). It turned out to be a case of https://github.com/mozilla/geckodriver/issues/703 - removing the call to maximize the browser fixed the problem. Maybe that helps @hardeepkukreja.

hardeepkukreja commented 7 years ago

Thanks @whimboo @ulrichsg @whimboo This is the error I am getting: (firefox:27173): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed Build is success but the testcase is not executing.

@ulrichsg I don't have any code for maximizing browser in my script. Something else might be conflicting.

whimboo commented 7 years ago

What do you mean is not executed? I can clearly see from the INFO (sadly not TRACE) level log, that several pages are getting loaded, and clicks issued.

Please check again and provide a full TRACE level log. How to do it can be found when filing a new issue, or in the README file of this repository.

whimboo commented 7 years ago

Also those assertions from glib are coming from Firefox and do not cause any harm similar to the 'NS_ERROR_SOCKET_ADDRESS_IN_USE' line.

hardeepkukreja commented 7 years ago

Thanks a lot @whimboo

Is there any way to get rid of these? 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]

whimboo commented 7 years ago

Use a latest Firefox 56.0 beta, which has this fixed.

@hardeepkukreja, is there anything left here? I haven't seen a reply from you yet regarding my questions from https://github.com/mozilla/geckodriver/issues/910#issuecomment-326092194

hardeepkukreja commented 7 years ago

@whimboo Thank for your help. I will close the issue.

lock[bot] commented 5 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue.