org.openqa.selenium.SessionNotCreatedException: session not created exception from tab crashed error when executing from Jenkins CI server

后端 未结 3 2001
一生所求
一生所求 2020-12-11 19:24

I am trying to run my automation tests from Jenkins CI server (built with Gradle), but the browser crashes instantly with the error below. It also crashes when I run gradle

相关标签:
3条回答
  • 2020-12-11 19:31

    Please try with Chromedriver version 83.0.4103.39 (https://chromedriver.chromium.org/downloads)

    0 讨论(0)
  • 2020-12-11 19:46

    Chrome Crash issue fix :

    This code with launch the browser without any crash. Make sure, chrome exe is compatible with the current browser.

        ChromeOptions options = new ChromeOptions()
        options.addArguments("--no-sandbox");
        driver = new ChromeDriver(options);
        driver.manage().window().maximize();
        driver.get("https://www.google.com");
    
    0 讨论(0)
  • 2020-12-11 19:49

    This error message...

    org.openqa.selenium.SessionNotCreatedException: session not created exception from tab crashed (Session info: chrome=65.0.3325.181) (Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 2.50 seconds Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z' System info: host: 'USNBDFV9K12', ip: '10.23.4.80', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131' Driver info: driver.version: ChromeDriver
    

    The error stack trace clearly shows your ChromeDriver binary details are not getting detected back as in :

    Driver info: driver.version: ChromeDriver
    

    Though your chromedriver=2.37.544315 and Chrome: 65.0.3325.181 are compatible your main issue is java.version: '1.8.0_131' which is ancient.


    Solution

    • Upgrade JDK to recent levels JDK 8u162
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
    • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
    • Take a system Reboot.
    • Execute your @Test.

    from tab crashed

    from tab crashed was WIP(Work In Progress) with the Chromium Team for quite some time now which relates to Linux attempting to always use /dev/shm for non-executable memory. Here are the references :

    • Linux: Chrome/Chromium SIGBUS/Aw, Snap! on small /dev/shm
    • Chrome crashes/fails to load when /dev/shm is too small, and location can't be overridden
    • As per Comment61#Issue 736452 the fix seems to be have landed with Chrome v65.0.3299.6

    Hence you may need to bump up to Chrome v65.0.3299.6 or later.

    0 讨论(0)
提交回复
热议问题