question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Protractor hangs infinitelyon Chrome w/ shardTestFiles and maxInstances caps

See original GitHub issue

The below piece of the config file is for parallel run, though it hangs if running one test at a time

the following error quite often accompanies

- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

  • Protractor Version: 5.4
  • Browser(s): Google Chrome 69.0.3497.100
  • Operating System and Version Ubuntu

Chrome args:

        '--disable-infobars',
        '--disable-notifications',
        '--window-size=1440,900',
        '--headless',
        '--no-sandbox',
        '--disable-gpu',
        '--enable-logging',
        'v=1'

caps:

    capabilities: {
        browserName: 'chrome',
        chromeOptions: chromOpt,
        loggingPrefs: {
            'browser': 'ALL', // "OFF", "SEVERE", "WARNING", "INFO", "CONFIG", "FINE", "FINER", "FINEST", "ALL"
            'server': 'ALL',
            'driver': 'ALL'
        },

        shardTestFiles: true,
        maxInstances: 3
    },

Log:

17:01:44 
17:01:44 [15:01:44] I/testLogger - 
17:01:44 
17:01:44 [15:01:44] I/launcher - 2 instance(s) of WebDriver still running
17:31:06 Build timed out (after 90 minutes). Marking the build as aborted.
17:33:07 [15:33:07] I/testLogger - 
17:33:07 [15:33:07] I/testLogger - 
17:33:07 
17:33:07 [15:33:07] I/launcher - 1 instance(s) of WebDriver still running
17:33:07 /tmp/jenkins8334328386245671923.sh: line 18: 24330 Terminated              protractor test.conf.js --suite=regression --disableChecks
17:33:07 Build was aborted
17:33:07 [htmlpublisher] Archiving HTML reports...
17:33:07 [htmlpublisher] Archiving at PROJECT level /var/lib/jenkins/workspace/STAGING e2e/reports to /var/lib/jenkins/jobs/STAGING e2e/htmlreports/HTML_20Report

Before protractor launch export DBUS_SESSION_BUS_ADDRESS=/dev/null

From what I have read, the root cause of this issue might be chrome browser However IMHO, protractor should not hang but time out if this occurs

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
aj-devcommented, Oct 24, 2018

If you’re running tests on CI server in a docker container, try adding --disable-dev-shm-usage to Chrome args. It solved “Chrome not reachable”, “no such session” and related timeout issues for us when running sharded tests on multiple instances.

Looks like Chrome’s memory usage has changed drastically since v69

1reaction
Izhakicommented, Oct 24, 2018

Same issue. Commenting onComplete solved it for us (shardTestFiles and maxInstances no commented).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Protractor (5.4.2) hangs when running shardTestFiles: true
When trying to run protractor with sharding, the execution works but when ... browserName: 'chrome', shardTestFiles: true, maxInstances: 2 ...
Read more >
Run multiple protractor specs in parallel - Selenium Easy
Run multiple protractor specs in parallel · shardTestFiles · maxInstances · Let us see a simple example with two specs · First create...
Read more >
Protractor parallel execution - Perfecto Help
Run multiple specs simultaneously. This objective can be achieved by setting two capabilities in the Capabilities block of the conf.js file - shardTestFiles...
Read more >
Protractor testing with Selenium WebDriver - TestingBot
Cross browser testing with NodeJS and Protractor. ... name: 'My First Protractor test', shardTestFiles: true, maxInstances: 5, client_key: "api_key", ...
Read more >
Chrome driver update for Browser Version 87.0.4280.141 ...
This causes the protractor tests to fail with below error. Could you pls check this ? And update the driver. Bug report.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found