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

Headless Crash with NWJS + Nightwatch #7151

Closed
gahubaul opened this issue Sep 5, 2019 · 1 comment
Closed

Headless Crash with NWJS + Nightwatch #7151

gahubaul opened this issue Sep 5, 2019 · 1 comment
Labels

Comments

@gahubaul
Copy link

gahubaul commented Sep 5, 2019

NWJS Version : v0.40.1
Operating System : macOS Mojave 10.14.6

Expected behavior

I use NightwatchJS (Selenium/Node) and Cucumber to perform non-regulation tests on a web page. To run the CI tests I wanted to run NWJS in headless mode for.
I would like to run my Nightwatchjs/Cucumber/NWJS tests on a CI in headless mode

Actual behavior

I have a NWJS crash when I launch it as a headless

Feature: S'authentifier avec un mauvais mot de passe

  @JIRA-PRDPOS-3036 @JIRA-PRDPOS-3036 @EPIC-AUTHENTIFICATION @RELEASE-DARK_VADOR
  Scenario: Cas nominal passant : Message d'erreur (uid:4ac0d127-a3c5-4bf8-a039-3aa666364937)
   Response 500 POST /wd/hub/session (3745ms)
   { value:
      { error:
         [ '  (unknown error: unable to discover open pages)',
           '  (The process started from chrome location /Users/no_name/workspace/no_name/driver/nwjs/nwjs.app/Contents/MacOS/nwjs is no longer running, so ChromeDriver is assuming that Chrome has crashed.)',
           '  (Driver info: chromedriver=76.0.3809.100 (ac9418ba9c3bd7f6baaffa0b055dfe147e0f8364-refs/branch-heads/3538@{#468}),platform=Mac OS X 10.14.6 x86_64) (WARNING: The server did not provide any stacktrace information)',
           'Command duration or timeout: 3.68 seconds',
           'Build info: version: \'3.141.59\', revision: \'e82be7d358\', time: \'2018-11-14T08:25:53\'',
           'System info: host: \'MacBook-Pro\', ip: \'fe80:0:0:0:ce2:7a57:eaa9:286e%en0\', os.name: \'Mac OS X\', os.arch: \'x86_64\', os.version: \'10.14.6\', java.version: \'11.0.2\'',
           'Driver info: driver.version: unknown' ],
        message: 'unknown error: Chrome failed to start: crashed' },
     status: 13 }
    ✖ failed
      Error: An error occurred while retrieving a new session: "unknown error: Chrome failed to start: crashed"
          at SeleniumProtocol.handleSessionCreateError (/Users/no_name/workspace/no_name/node_modules/nightwatch/lib/transport/transport.js:99:15)
          at HttpRequest.request.on.err (/Users/no_name/workspace/no_name/node_modules/nightwatch/lib/transport/transport.js:154:32)
          at HttpRequest.emit (events.js:198:13)
          at HttpResponse.originalIssuer.on.args (/Users/no_name/workspace/no_name/node_modules/nightwatch/lib/http/request.js:105:19)
          at HttpResponse.emit (events.js:198:13)
          at IncomingMessage.res.on (/Users/no_name/workspace/no_name/node_modules/nightwatch/lib/http/response.js:60:14)
          at IncomingMessage.emit (events.js:203:15)
          at endReadableNT (_stream_readable.js:1145:12)
          at process._tickCallback (internal/process/next_tick.js:63:19)
    Given I am on "LOGIN_FORM_PAGE"
    - skipped
    And I type "POS_User" in "LOGIN_LOGIN_INPUT"
    - skipped
    And I type "9999" in "LOGIN_PASSWORD_INPUT"
    - skipped
    When I select "LOGIN_SUBMIT"
    - skipped

my Nightwatch Capabilities:

	screenshots: screenshots,
	selenium: {
		cli_args: {
			'webdriver.chrome.driver': `${__dirname}/driver/nwjs/chromedriver`,}
	},
	desiredCapabilities: {
		loggingPrefs: {driver: "INFO", server: "OFF", browser: "INFO"},
		browserName: 'NodeWebkit',
		javascriptEnabled: true,
		acceptSslCerts: true,
		chromeOptions: {
			w3c: false,
			args: [
				'--disable-infobars',
				'--enable-automation',
				'--allow-running-insecure-content',
				'--disable-popup-blocking',
				'--disable-application-cache',
				'--ignore-certificate-errors',
				'--test-type',
				'--lang=fr',
				'--disable-gpu',
				'--no-sandbox',
				"--privileged",
				'--headless'
			]
		}
	}
}```

### How to reproduce
To reproduce the bug, simply put the `--headless' variable in the browser options

I use all its versions for my project:
╔═══════════════════╤═══════════╗
║ Type              │ Version   ║
╟───────────────────┼───────────╢
║ OS                │ Darwin    ║
╟───────────────────┼───────────╢
║ Node              │ 10.16.3   ║
╟───────────────────┼───────────╢
║ Ruby              │ 2.3.7p456 ║
╟───────────────────┼───────────╢
║ Npm               │ 6.9.0     ║
╟───────────────────┼───────────╢
║ Selenium          │ 2.20.0    ║
╟───────────────────┼───────────╢
║ ChromeDriver      │ 76.0.0    ║
╟───────────────────┼───────────╢
║ Hiptest-Publisher │ 1.25.0    ║
╚═══════════════════╧═══════════╝
@gahubaul gahubaul changed the title Headless Headless Crash with NWJS + Nightwatch Sep 5, 2019
@stale
Copy link

stale bot commented Aug 31, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 31, 2020
@stale stale bot closed this as completed Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant