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

Getting Unreachable browser exception after a while when I am running the TestNG tests. OS : MAC #1040

Closed
hemanthsridhar opened this issue May 9, 2016 · 59 comments

Comments

@hemanthsridhar
Copy link

hemanthsridhar commented May 9, 2016

I am running my tests in MAC as well as in Windows. In windows, the code works like a charm. In MAC OSX, I run the same code and it will be working fine BUT after a while I get unreachable browser exception.
I am running my test through maven surefire plugin.
maven version : 3.3.9
surefire plugin : 2.19.1
testng version : 6.9.10
java.version: 1.8.0_77

Here is my stacktrace

UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'Hemanths-MacBook-Pro.local', ip: '192.168.0.8', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.4', java.version: '1.8.0_77'
Driver info: driver.version: RemoteWebDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, chrome={userDataDir=/var/folders/cd/vbgjmfqj67s2_7lxl03xm5wc0000gn/T/.org.chromium.Chromium.uH5fCE}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=50.0.2661.94, platform=MAC, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 900637934c566c1fb4ddc890c4eaaa10
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'Hemanths-MacBook-Pro.local', ip: '192.168.0.8', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.4', java.version: '1.8.0_77'
Driver info: driver.version: RemoteWebDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, chrome={userDataDir=/var/folders/cd/vbgjmfqj67s2_7lxl03xm5wc0000gn/T/.org.chromium.Chromium.uH5fCE}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=50.0.2661.94, platform=MAC, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 900637934c566c1fb4ddc890c4eaaa10
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:363)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:500)
    at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355)
    at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:69)
    at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38)
    at com.sun.proxy.$Proxy16.isDisplayed(Unknown Source)
    at org.openqa.selenium.support.ui.ExpectedConditions.elementIfVisible(ExpectedConditions.java:302)
    at org.openqa.selenium.support.ui.ExpectedConditions.access$100(ExpectedConditions.java:41)
    at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:288)
    at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:285)
    at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:238)
    at org.etna.utils.Waiting.explicitWaitVisibilityOfElement(Waiting.java:36)
    at org.etna.customer.pageobjects.HomePageObjects.waitForProfileDropdownLink(HomePageObjects.java:508)
    at org.etna.modules.LoginModuleTest.TC_Login_009_010_RememberPassword_UserNameAndPasswordRefill(LoginModuleTest.java:115)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
    at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:197)
    at org.etna.maincontroller.MainController.run(MainController.java:208)
    at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:209)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
    at org.testng.TestRunner.privateRun(TestRunner.java:782)
    at org.testng.TestRunner.run(TestRunner.java:632)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
    at org.testng.SuiteRunner.run(SuiteRunner.java:268)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
    at org.testng.TestNG.run(TestNG.java:1064)
    at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
    at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
    at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: org.openqa.selenium.WebDriverException: java.net.SocketException: Bad file descriptor
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'Hemanths-MacBook-Pro.local', ip: '192.168.0.8', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.4', java.version: '1.8.0_77'
Driver info: driver.version: RemoteWebDriver
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
    ... 45 more
Caused by: java.net.SocketException: Bad file descriptor
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at org.apache.http.impl.conn.LoggingOutputStream.write(LoggingOutputStream.java:77)
    at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:126)
    at org.apache.http.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:138)
    at org.apache.http.impl.io.SessionOutputBufferImpl.flush(SessionOutputBufferImpl.java:146)
    at org.apache.http.impl.io.ContentLengthOutputStream.flush(ContentLengthOutputStream.java:101)
    at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:117)
    at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:158)
    at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:162)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:237)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:122)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
    at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144)
    at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)

PFB my TestNG.xml file

<suite name="Etna Automation Suite">
    <listeners>
            <listener class-name="org.etna.maincontroller.MainController"/>
            <listener class-name="org.etna.utils.ReportGenerator"/>
    </listeners>
  <test name="End to End Testing">
    <groups>
    <run>
    <include name="regression"/>
    </run>
    </groups>

    <classes>
      <class name="org.etna.modules.ShopByBrandsModuleTest"/>
      <class name="org.etna.modules.GeneralSearchModuleTest"/>
      <class name="org.etna.modules.PDPModuleTest"/>
      <class name="org.etna.modules.ShopByManufacturersModuleTest"/>
      <class name="org.etna.modules.LoginModuleTest"/>
      <class name="org.etna.modules.MyCartModuleTest"/>
      <class name="org.etna.modules.CategoryModuleTest"/>
      <class name="org.etna.modules.HomePageModuleTest"/>
      <class name="org.etna.modules.APAModuleTest"/>
    </classes>
  </test>
</suite> 

*Each class contains atleast 20 test cases each. *

Here is my pom.xml too.

   <modelVersion>4.0.0</modelVersion>
    <groupId>ETNA</groupId>
    <artifactId>inhouse.NewStandardEcommerceTemplate</artifactId>
    <version>1.0-SNAPSHOT</version>
    <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <compiler.version>1.7</compiler.version>
        <allure.version>1.5.0.RC2</allure.version>
        <aspectj.version>1.8.9</aspectj.version>
        <version.selenium>2.53.0</version.selenium>
         <version.slf4j>1.7.7</version.slf4j>
    </properties>
    <name>ETNA</name>
    <description>New standard ecommerce template</description>
    <dependencies>
     <dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.7.0</version>
  </dependency>
    <dependency>
    <groupId>com.pojosontheweb</groupId>
    <artifactId>monte-repack</artifactId>
    <version>1.0</version>
    </dependency>
    <dependency>
  <groupId>org.testng</groupId>
  <artifactId>testng</artifactId>
  <version>6.9.10</version>
  <scope>test</scope>
</dependency>
    <dependency>
    <groupId>com.jayway.restassured</groupId>
    <artifactId>rest-assured</artifactId>
    <version>2.9.0</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-firefox-driver</artifactId>
        <version>${version.selenium}</version>
    </dependency>
    <dependency>
    <groupId>org.zeroturnaround</groupId>
    <artifactId>zt-zip</artifactId>
    <version>1.7</version>
    </dependency>
    <dependency>
    <groupId>javax.mail</groupId>
    <artifactId>mail</artifactId>
    <version>1.4.7</version>
</dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>${version.selenium}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-server</artifactId>
    <version>${version.selenium}</version>
</dependency>
        <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-testng-adaptor</artifactId>
            <version>${allure.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
        </dependency>
     <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
         <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>${aspectj.version}</version>
          </dependency>
           <dependency>
                   <groupId>org.aspectj</groupId>
                   <artifactId>aspectjrt</artifactId>
                    <version>${aspectj.version}</version>
                    </dependency>     
    </dependencies>
    <build>
<pluginManagement>
     <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${compiler.version}</source>
                    <target>${compiler.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                 <suiteXmlFiles>
                    <suiteXmlFile>testng.xml</suiteXmlFile>
                 </suiteXmlFiles>
                    <argLine>-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar</argLine>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.10.v20150310</version>
                <configuration>
                    <webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
                    <stopKey>stop</stopKey>
                    <stopPort>1234</stopPort>
                </configuration>
            </plugin>
        </plugins>
</pluginManagement>
    </build>
    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>2.5</version>
                  <configuration>
                    <reportVersion>${allure.version}</reportVersion>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>

Again, reminding you that the tests work perfectly fine windows machine. OSX version : 10.11.4 . I hope I can get a fix for this.

Also, Right clicking the testng.xml and clicking on run as testng suite IS WORKING FINE.

@rouke-broersma
Copy link

This has nothing to do with TestNG, file an issue with chrome webdriver: https://bugs.chromium.org/p/chromedriver/issues/list

@juherr
Copy link
Member

juherr commented May 10, 2016

I don't know if the problem comes from Chrome, but you should ask it on selenium project before here ;)

Feel free to reopen the issue when you will have more detail on a testng issue.

@rouke-broersma
Copy link

He already did file a bug report with selenium SeleniumHQ/selenium#2049

@hemanthsridhar
Copy link
Author

@Mobrockers Thank you. :) . I really don't think this is a chromedriver issue because it is not working in firefoxdriver and safari too. The execution simply stops.
@juherr I wish I had more info :). I have raised it to https://issues.apache.org/jira/browse/SUREFIRE-1245 . Can you please add if you have any inputs on what the developer has replied in the comments section ?

@juherr
Copy link
Member

juherr commented May 10, 2016

Ok thank, I will try to follow the discussion you have with @Tibor17

The best thing you can do is find a way to reproduce the issue in a project you can share. It will be easier to find where is the problem and how to fiw it.

@rouke-broersma
Copy link

Perhaps your issue is related to
https://somethingididnotknow.wordpress.com/2014/07/23/forkedbooter-steals-window-focus-on-mac-os-while-maven-is-running/

On Tue, May 10, 2016, 16:52 Hemanth Sridhar notifications@github.com
wrote:

@Mobrockers https://github.com/Mobrockers Thank you. :) . I really
don't think this is a chromedriver issue because it is not working in
firefoxdriver and safari too. The execution simply stops.
@juherr https://github.com/juherr I wish I had more info :). I have
raised it to https://issues.apache.org/jira/browse/SUREFIRE-1245 . Can
you please add if you have any inputs on what the developer has replied in
the comments section ?


You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
#1040 (comment)

@juherr
Copy link
Member

juherr commented May 10, 2016

@hemanthsridhar If the issue is maven related, could you try to run your tests in Windows from your IDE?

@juherr juherr reopened this May 10, 2016
@hemanthsridhar
Copy link
Author

hemanthsridhar commented May 10, 2016

@juherr If you see the first thing that I have mentioned in this issue, you will get the answer. It is working absolutely fine using windows.

@hemanthsridhar
Copy link
Author

@Mobrockers seems like a long shot. Will try it though.

@juherr
Copy link
Member

juherr commented May 10, 2016

Yes, sorry. I wanted to say osx.

The goal is to determine between all layers which one is failing.

If the tests are working well from the ide without maven, we will be able to exclude it from the list of suspects.

@hemanthsridhar
Copy link
Author

@juherr No issues :). Anyways, you want me right click and run as testng suite from the IDE?

@hemanthsridhar
Copy link
Author

@juherr I checked it from the IDE. receiving unreachable browser exception again.

@hemanthsridhar
Copy link
Author

@juherr I ran from testng.xml but it worked fine on that particular day. I really don't know what is going on here now. :(

@hemanthsridhar
Copy link
Author

hemanthsridhar commented May 10, 2016

screen shot 2016-05-11 at 1 24 16 am

@hemanthsridhar
Copy link
Author

hemanthsridhar commented May 10, 2016

@juherr @Tibor17 for proof.

@rouke-broersma
Copy link

Are you not opening too many concurrent browser sessions, grinding your
system to a stop, causing selenium to lose connection to the browser?

On Tue, May 10, 2016, 21:55 Hemanth Sridhar notifications@github.com
wrote:

@juherr https://github.com/juherr for proof.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1040 (comment)

@hemanthsridhar
Copy link
Author

I am not doing anything of that sort. It is just a simple execution of test cases.(Like I told you, working like a charm in Windows).@Mobrockers

@hemanthsridhar
Copy link
Author

@Mobrockers Please see my testng.xml that I have given in the issue.

@rouke-broersma
Copy link

I was assuming that when you say running on osx you also mean a different
machine. A different machine could mean different hardware limitations
that's why I'm asking. Starting a browser instance is not cheap, but should
not matter unless running tests concurrent. Which is when it adds up. It's
kind of hard to read a pomfile in a github issue on mobile, was easier to
just ask you.

On Tue, May 10, 2016, 22:04 Hemanth Sridhar notifications@github.com
wrote:

I am not doing anything of that sort. It is just a simple execution of
test cases.(Like I told you, working like a charm in Windows).@Mobrockers
https://github.com/Mobrockers


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1040 (comment)

@hemanthsridhar
Copy link
Author

hemanthsridhar commented May 10, 2016

@Mobrockers Alright. Did not know that. Ask me anything, I will reply again. Just want this issue to get fixed. If you guys want I can drop a screenshot that it is working fine in windows.
And the answer is no. I am not running any concurrent tests.

@hemanthsridhar hemanthsridhar changed the title Getting Unreachable browser exception after a while when I am running the TestNG tests. Getting Unreachable browser exception after a while when I am running the TestNG tests. OS : MAC May 10, 2016
@hemanthsridhar
Copy link
Author

windowstestngscreenshot

@hemanthsridhar
Copy link
Author

check the os.name in every screenshot.

@juherr
Copy link
Member

juherr commented May 11, 2016

Ok, so if I understand well, now you reproduce the issue with eclipse on Windows too?

@rouke-broersma
Copy link

The windows screenshot is showing a different error message it seems like.

@juherr
Copy link
Member

juherr commented May 11, 2016

True, but it is not the same test. Difficult to conclude something.

And on the OSX one, I read "Bad File descriptor".
Definitely, I think the solution will come from the selenium community.

@rouke-broersma
Copy link

@juherr The error shown in his windows screenshot looks like a selenium TimeoutException on finding an element on the page, as in a normal exception that one would expect while running a selenium test.
Perhaps the screenshot is to show us that it is working fine on windows, not that he can reproduce the same issue on windows.

@hemanthsridhar
Copy link
Author

@juherr then the issue is related to?

@juherr
Copy link
Member

juherr commented May 11, 2016

For me, it is an osx limitation with its default resources configuration.

But as @Mobrockers proposed, you should try with another selenium driver.

@hemanthsridhar
Copy link
Author

Will try with firefox and get back to you guys.

@hemanthsridhar
Copy link
Author

hemanthsridhar commented May 11, 2016

@Mobrockers It is so weird. I ran my test through Firefoxdriver today and it is working perfectly. The other day I did the same and it didn't work. If I face the same I will get back to you guys.
@Mobrockers and @juherr Can you guys please do me a favour? Can you please ask the selenium developer to open the bug again? I had asked him to open it but he didn't. He felt that it was a tutorial.

Thank you so much for your help guys. Please close this issue.

PS : Will get back to the same bug if I face the same using Firefox.(which I did).

@hemanthsridhar
Copy link
Author

@juherr juherr closed this as completed May 11, 2016
@hemanthsridhar
Copy link
Author

screen shot 2016-05-19 at 1 06 59 pm

screen shot 2016-05-19 at 1 07 24 pm

@hemanthsridhar
Copy link
Author

Occurring for firefox now. Please open this issue if required and get this resolved if it is from your end.

@juherr
Copy link
Member

juherr commented May 19, 2016

As I think it is more a Selenium issue than a TestNG one, I propose you try to find help on its mailing list: https://groups.google.com/forum/#!forum/selenium-users

@rouke-broersma
Copy link

rouke-broersma commented May 19, 2016

Since no one else seems to be reporting this particular bug, and you manage to reproduce it consistently across browsers but not systems, I would rather say it's got something to do with your particular hardware + software setup. Have you tried running your testsuite on someone else's mac? In any case like @juherr said you should probably ask in the selenium users group.

Also I just saw in the selenium issue you created that you do not get this problem running your tests in failsafe. Since failsafe is designed to run integration-tests (which selenium tests are) the quick fix for you would be to simply use failsafe. There's really no reason at all NOT to use failsafe for selenium tests.

@hemanthsridhar
Copy link
Author

@Mobrockers I am using allure reports which is dependent on surefire. Anyways, you are right, I will try to set up in someone else's MAC and see whether it works. Will get back to you guys.

@hemanthsridhar
Copy link
Author

Can I share you guys my repo so that you guys can clone it and check please? This is really important. It would mean alot if you guys helped me with this. I really don't see any issue in configuration. Can you guys please check?

@rouke-broersma
Copy link

rouke-broersma commented May 19, 2016

I do not have a mac, sorry. Perhaps @remcowesterhoud can help you.

@hemanthsridhar
Copy link
Author

okay. thank you.

@hemanthsridhar
Copy link
Author

@juherr can you help me with this please?

@hemanthsridhar
Copy link
Author

@hemanthsridhar
Copy link
Author

hemanthsridhar commented May 19, 2016

@Mobrockers does any problem occur if we delete test-output folder? No right? Because I started getting this issue(firefox) once I deleted that folder and pushed the code to bitbucket.

@hemanthsridhar
Copy link
Author

hemanthsridhar commented May 19, 2016

https://bitbucket.org/hemanthsridhar/etna if you can help. Master branch contains the latest code.

@rouke-broersma
Copy link

I don't see how that could have an effect on selenium, no. Sorry

On Thu, May 19, 2016, 20:46 Hemanth Sridhar notifications@github.com
wrote:

@Mobrockers https://github.com/Mobrockers does any problem occur if we
delete test-output folder? No right? Because I started getting this
issue(firefox) once I deleted that folder and pushed the code to bitbucket.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1040 (comment)

@rouke-broersma
Copy link

Nothing in your configuration or source code stands out to me.

@juherr
Copy link
Member

juherr commented May 19, 2016

@juherr can you help me with this please?

No, I have no mac :/

@hemanthsridhar
Copy link
Author

@juherr the bug I raised to the chromedriver guy has a mac. He has my tests, he got the same issue. He's not bothered I guess because it is occurring for Firefox as well. Don't know what is going on.

@remcowesterhoud
Copy link

@hemanthsridhar I just ran your tests and am getting the same error. Were you able to find some sort of pattern in when the exception is thrown. I've been trying and it seems completely random when I run multiple tests. I've changed the order and modules that it runs with no result. However, when I run individual modules they all seem to work.

@hemanthsridhar
Copy link
Author

@remcowesterhoud
You're spot on. No pattern. Occurs randomly. Thank you so much for doing it though.

@hemanthsridhar
Copy link
Author

Any update on this?

@thbindu
Copy link

thbindu commented Nov 13, 2019

@hemanthsridhar did you ever find a solution for this .Im having the same issue on my mac.It works fine on windows.

@SelvamaniD
Copy link

Issue remains same , is suggestion handle the issue ?

@krmahadevan
Copy link
Member

@SelvamaniD - This issue has got nothing to do with TestNG. I think you should be posting on the selenium-users forums.

@hemanthsridhar
Copy link
Author

hemanthsridhar commented Feb 19, 2020

@SelvamaniD @krmahadevan is right. This has nothing to do with TestNG.
The issue was with jdk for Mac.
Problem : I had used alot of statics
Solution : Converted into Objects. Worked like a charm.

Note : You have no idea to what extent I reached to get to the bottom of this issue. Stalking Selenium Developers. Attending a Conference, just to meet them and show them. But unfortunately, the answer was always pointing fingers to someone else.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants