angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.12k stars 1.24k forks source link

Gulp test:e2e failing #2327

Open bestconsultant opened 8 years ago

bestconsultant commented 8 years ago

Today my e2e do not work anymore. I tried with a fresh scaffolded app and get the same error.

Before launching i ran these 2 commandes npm run update-webdriver export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"

Here is the output of gulp test:e2e.

/Users/Me/Documents/testApp/node_modules/selenium-webdriver/error.js:26
  constructor(opt_error) {
                         ^
SessionNotCreatedError: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"1528.1","isDefault":true},"id":1,"name":"","origin":"://"}
  (Session info: chrome=54.0.2840.71)
  (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Mac OS X 10.9.5 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.81 seconds
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'MacBook-Pro.local', ip: '10.0.0.7', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.8.0_65'
Driver info: org.openqa.selenium.chrome.ChromeDriver
    at WebDriverError (/Users/Me/Documents/testApp/node_modules/selenium-webdriver/error.js:26:26)
    at SessionNotCreatedError (/Users/Me/Documents/testApp/node_modules/selenium-webdriver/error.js:295:26)
    at Object.checkLegacyResponse (/Users/Me/Documents/testApp/node_modules/selenium-webdriver/error.js:580:13)
    at /Users/Me/Documents/testApp/node_modules/selenium-webdriver/lib/webdriver.js:64:13
    at Promise.invokeCallback_ (/Users/Me/Documents/testApp/node_modules/selenium-webdriver/lib/promise.js:1329:14)
    at TaskQueue.execute_ (/Users/Me/Documents/testApp/node_modules/selenium-webdriver/lib/promise.js:2790:14)
    at TaskQueue.executeNext_ (/Users/Me/Documents/testApp/node_modules/selenium-webdriver/lib/promise.js:2773:21)
    at /Users/Me/Documents/testApp/node_modules/selenium-webdriver/lib/promise.js:2652:27
    at /Users/Me/Documents/testApp/node_modules/selenium-webdriver/lib/promise.js:639:7
    at process._tickCallback (node.js:382:9)
From: Task: WebDriver.createSession()
    at acquireSession (/Users/Me/Documents/testApp/node_modules/selenium-webdriver/lib/webdriver.js:62:22)
    at Function.createSession (/Users/Me/Documents/testApp/node_modules/selenium-webdriver/lib/webdriver.js:295:12)
    at Builder.build (/Users/Me/Documents/testApp/node_modules/selenium-webdriver/builder.js:458:24)
    at Local.DriverProvider.getNewDriver (/Users/Me/Documents/testApp/node_modules/protractor/built/driverProviders/driverProvider.js:37:33)
    at Runner.createBrowser (/Users/Me/Documents/testApp/node_modules/protractor/built/runner.js:182:43)
    at /Users/Me/Documents/testApp/node_modules/protractor/built/runner.js:255:30
    at _fulfilled (/Users/Me/Documents/testApp/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/Users/Me/Documents/testApp/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/Users/Me/Documents/testApp/node_modules/q/q.js:796:13)
    at /Users/Me/Documents/testApp/node_modules/q/q.js:604:44
    at runSingle (/Users/Me/Documents/testApp/node_modules/q/q.js:137:13)
    at flush (/Users/Me/Documents/testApp/node_modules/q/q.js:125:13)
    at nextTickCallbackWith0Args (node.js:433:9)
    at process._tickCallback (node.js:362:13)
[16:23:14] E/launcher - Process exited with error code 1
{ [Error: protractor exited with code 1]
  message: 'protractor exited with code 1',
  showStack: false,
  showProperties: true,
  plugin: 'gulp-protractor',
  __safety: { toString: [Function: bound ] } }
Item Version
generator-angular-fullstack 3.7.6
Operating System OS X 10
Item Answer
Transpiler Babel
Markup HTML
CSS CSS
Router ngRoute
Client Tests Jasmine
DB MongoDB
Auth Y
Awk34 commented 8 years ago

A quick Google search shows me some possible solutions....

http://stackoverflow.com/questions/33155562/selenium-webdriver-sessionnotcreatederror#33156278

bestconsultant commented 8 years ago

Thanks for your reply but I don't see the solution in the SO post.

I tried setting gulp-protractor to 3.0.0 in package.json but it doesn't solve the problem. Chrome hangs with data:text/html,<html></html> in the url bar.

Are you not having this issue on your side?

Awk34 commented 8 years ago

It runs fine for me. I'd assume it's something wrong with your selenium

bestconsultant commented 8 years ago

When I launch gulp test:e2e it logs the following versions:

I/update - chromedriver: v2.25 up to date I/update - selenium standalone: v2.53.1 up to date

I can't believe I am the only one in trouble, event my previous versions with grunt test:e2e aren't working anymore. So if you see what can fix this it would be much appreciated, because I'm lost.