Giter Site home page Giter Site logo

Comments (8)

yukinying avatar yukinying commented on May 10, 2024

Do you have some quick samples (or urls) that can be shared? The processes become zombies which may mean a parent process dies before the child processes are cleaned up.

from chrome-headless-browser-docker.

caryyu avatar caryyu commented on May 10, 2024

Well, you can see code snippet below, i just wanna parallel every single testcase by multiple threads, but each testcase will start a new chrome process then quit after it's done. Have you ever met this issue before if you're trying to run a huge numbers of testcases ? Anyway , i'm going to upgrade your Docker Image first to make sure if it is still .....

BTW: i've used RemoteWebDriver connecting to this Docker Image.

public class ParallelSolvingTest {
    private static Log log = LogFactory.getLog(ParallelSolvingTest.class);
    private ThreadLocal<WebDriver> wd = new InheritableThreadLocal<>();
    
    @BeforeMethod
    public void beforeMethod() {
        WebDriver webDriver = DriverUtility.openDriver();
        wd.set(webDriver);
    }

    @AfterMethod
    public void afterMethod(){
        WebDriver webDriver = wd.get();
        if(webDriver != null) {
            webDriver.manage().deleteAllCookies();
            webDriver.quit();
        }
    }
}

from chrome-headless-browser-docker.

yukinying avatar yukinying commented on May 10, 2024

Did you use standalone mode or hub mode? I used protractor and I did not see any zombie processes after sending 100 individual protractor tests in standalone mode.

from chrome-headless-browser-docker.

caryyu avatar caryyu commented on May 10, 2024

I'm calling the address like this http://x.x.x.x:4444/wd/hub, maybe this is hub mode.. what you mean the standalone mode is just like connecting straight forward to ChromeWebDriver port right?

from chrome-headless-browser-docker.

yukinying avatar yukinying commented on May 10, 2024

Yes, If you hit it with wd/hub, it is using the hub mode. I tried hub mode as well, and all 100 tests finished without leaving any zombie process. I think you may want to look at the logs and see if there are any crashes, which would have caused the zombie processes to hang around.

from chrome-headless-browser-docker.

caryyu avatar caryyu commented on May 10, 2024

In the log, there are lots of WARN - Exception: no such element: Unable to locate element occurring, i'm not very sure if it's effecting on ..

from chrome-headless-browser-docker.

yukinying avatar yukinying commented on May 10, 2024

Honestly, I have no clue unless I can reproduce it on my machine. I understand your test cases may be more comprehensive thus my tests are not identical as yours. What I usually do with these kind of errors is to set up an environment without docker and verify if this is caused by the docker setup or not.

from chrome-headless-browser-docker.

caryyu avatar caryyu commented on May 10, 2024

I've upgraded to 3.6.0, the issue is gone. maybe version causes this.

from chrome-headless-browser-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.