ankur-kushwaha / Cucumber-UI

A way to create feature file online using web interface
6 stars 4 forks source link

Error when running - SessionNotCreatedError: session not created exception #3

Open andreasmarkussen opened 5 years ago

andreasmarkussen commented 5 years ago

Given the server is started with 'npm start' And I enter the website with chrome When running the scenario 'Guide Testing' in 'Feature Name' Then it should pass

Actual result -

stdout: [14:34:27]
stdout: Using gulpfile C:\Tech\forks\cucumber-ui\server\e2e\gulpfile.js
[14:34:27] Starting 'e2eTest'...

stderr: (node:10236) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

stdout: [14:34:28] I/local - Starting selenium standalone server...

stdout: [14:34:28] I/launcher - Running 1 instances of WebDriver

stdout: [14:34:30] I/local - Selenium standalone server started at http://192.168.99.1:40238/wd/hub

stderr:

stdout: [14:34:34] E/launcher - Process exited with error code 1

stderr: C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\error.js:580
      throw new ctor(value['message'] + '');
            ^
SessionNotCreatedError: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"3846578EBB6477257A612943B8A31266","isDefault":true,"type":"default"},"id":1,"name":"","origin":"://"}
  (Session info: chrome=70.0.3538.110)
  (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 10.0 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.78 seconds
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'DESKTOP-PU7QKQJ', ip: '192.168.99.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'
Driver info: org.openqa.selenium.chrome.ChromeDriver
    at Object.checkLegacyResponse (C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\error.js:580:13)
    at C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\lib\webdriver.js:64:13
    at Promise.invokeCallback_ (C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\lib\promise.js:1329:14)
    at TaskQueue.execute_ (C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\lib\promise.js:2790:14)
    at TaskQueue.executeNext_ (C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\lib\promise.js:2773:21)
    at asyncRun (C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\lib\promise.js:2652:27)
    at C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\lib\promise.js:639:7
    at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: WebDriver.createSession()
    at acquireSession (C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\lib\webdriver.js:62:22)
    at Function.createSession (C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\lib\webdriver.js:295:12)
    at Builder.build (C:\Tech\forks\cucumber-ui\node_modules\selenium-webdriver\builder.js:458:24)
    at Local.DriverProvider.getNewDriver (C:\Tech\forks\cucumber-ui\node_modules\protractor\built\driverProviders\driverProvider.js:37:33)
    at Runner.createBrowser (C:\Tech\forks\cucumber-ui\node_modules\protractor\built\runner.js:182:43)
    at C:\Tech\forks\cucumber-ui\node_modules\protractor\built\runner.js:255:30
    at _fulfilled (C:\Tech\forks\cucumber-ui\node_modules\q\q.js:834:54)
    at C:\Tech\forks\cucumber-ui\node_modules\q\q.js:863:30
    at Promise.promise.promiseDispatch (C:\Tech\forks\cucumber-ui\node_modules\q\q.js:796:13)
    at C:\Tech\forks\cucumber-ui\node_modules\q\q.js:604:44

stdout: { [Error: protractor exited with code 1]
  message: 'protractor exited with code 1',
  showStack: false,
  showProperties: true,
  plugin: 'gulp-protractor',
  __safety: { toString: [Function: bound ] } }

stdout: [14:34:34] 'e2eTest' errored after 6.95 s
[14:34:34] Error in plugin 'gulp-protractor'
Message:
    protractor exited with code 1

child process exited with code 1
_http_server.js:208
    throw new ERR_HTTP_INVALID_STATUS_CODE(originalStatusCode);
    ^

RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 1
    at ServerResponse.writeHead (_http_server.js:208:11)
    at ServerResponse.writeHead (C:\Tech\forks\cucumber-ui\node_modules\on-headers\index.js:55:19)
    at ServerResponse._implicitHeader (_http_server.js:199:8)
    at write_ (_http_outgoing.js:593:9)
    at ServerResponse.end (_http_outgoing.js:714:5)
    at ServerResponse.send (C:\Tech\forks\cucumber-ui\node_modules\express\lib\response.js:204:10)
    at ServerResponse.sendStatus (C:\Tech\forks\cucumber-ui\node_modules\express\lib\response.js:341:15)
    at ChildProcess.<anonymous> (C:\Tech\forks\cucumber-ui\server\routes\steps.js:90:8)
    at ChildProcess.emit (events.js:182:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cucumber-ui@1.1.0 start: `cd server && node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cucumber-ui@1.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\andre\AppData\Roaming\npm-cache\_logs\2018-12-09T13_34_34_556Z-debug.log
andreasmarkussen commented 5 years ago

Will look at it later. Does it work for anyone?

ankur-kushwaha commented 5 years ago

i have updated the code, please try again or send me your test case