11

I use protractor to test Angular2 app. It was working fine and I think I didn't change nothing in conf but now it ends up with this:

...

super(opt_error);
    ^
SessionNotCreatedError: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"4012.1","isDefault":true},"id":1,"name":"","origin":"://"}
  (Session info: chrome=54.0.2840.71)
  (Driver info: chromedriver=2.21.371459

...

I work on a Mac OSX 10.11.4, Chrome 54.0.2840.71.

Any suggestion? Thanks

--- EDIT 26/10

Since it depends on each one settings it looks like theres no absolute answer to this. The main idea is to update protractor/ chromedriver / webdriver-manager accordingly.

Saying that i now face another problem : every basic test i do, including ( for instance ) a browser.get() is failing with :

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

I don't know if it's an isolated case and if it fits here (I use jasmine2 as framework) so I start another question here

Community
  • 1
  • 1
sebap
  • 1,601
  • 5
  • 24
  • 41
  • Try re-installing protractor. even i was facing the same issue today. – Sudharsan Selvaraj Oct 25 '16 at 08:51
  • Or install protractor with below version `npm install protractor@4.0.9 -g` – Sudharsan Selvaraj Oct 25 '16 at 08:54
  • thanks. I did it. no success... – sebap Oct 25 '16 at 08:59
  • This also helped me http://stackoverflow.com/questions/40100960/session-not-created-exception-for-chrome-in-protractor/40101565#40101565 – Sudharsan Selvaraj Oct 25 '16 at 09:01
  • thanks. Actually i had mismatch version between global webdriver and local protractor. i clear it up by uninstalling global and update protractor and webdriver in local. – sebap Oct 25 '16 at 09:21
  • 2
    I haven't changed anything in my setup and I'm experiencing the same thing this morning... only on chrome. Firefox and others run fine, must be a driver issue. – Gunderson Oct 25 '16 at 12:26
  • I manually downloaded chromedriver 2.24 from http://chromedriver.storage.googleapis.com/index.html?path=2.24/ and add it to node_modules/protractor/selenium. Then change node_modules/protractor/config.json to "chromedriver": "2.24". it solves the issue but then another problem comes in : Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL – sebap Oct 25 '16 at 14:43
  • 1
    this might be a duplicate of http://stackoverflow.com/questions/38918486/protractor-getting-runtime-executioncontextcreated-has-invalid-context-erro – adam Oct 25 '16 at 17:43
  • Possible duplicate of [Protractor - Getting "Runtime.executionContextCreated has invalid 'context" error when i run Protractor](https://stackoverflow.com/questions/38918486/protractor-getting-runtime-executioncontextcreated-has-invalid-context-erro) – unutbu Aug 06 '17 at 08:51

5 Answers5

7

I installed ChromeDriver v2.24 and stored it in: /usr/local/Cellar/chromedriver/2.24/bin and it fixed the error for me.

Kat Russo
  • 469
  • 4
  • 8
  • That worked for me too. The important part is to put the chromedriver on your path as described here: http://watir.github.io/docs/chrome/ Just that the version linked to in the watir documentation is confusing. Using http://chromedriver.storage.googleapis.com/index.html?path=2.25/ should work. – Robert Nov 01 '16 at 19:40
2

As mentioned by others, looks like it is a problem with the chromedriver installed in the system with the new version of chrome. For mac, I updated the chromedriver using 'chromedriver-update' and this fixed it.

bindul
  • 66
  • 3
1

I had a similar problem and solver it by forcing chromedriver 2.24 to install by manually removing webdriver-manager

delete the folder rm -rf /usr/local/lib/node_modules/webdriver-manager/

reinstall webdriver npm install -g webdriver-manager

wnordmann
  • 301
  • 2
  • 11
0

I updated the selenium-standalone to the latest version 5.8.0 (from 5.1.0). It will install the newer version of chrome webdriver(2.25), instead of install chrome driver2.21. This solved the issue on my end.(no connection, session exception)

DevGrowth.Tech
  • 1,523
  • 17
  • 23
0

If even after updating the webdriver to 2.25, the error is still occurring and if you are using the terminal app this should help :

I managed to fix the issue by unchecking “Set locale environment variables on startup” checkbox in advanced terminal app settings. Or try to launch your test with this prefix :

LC_NUMERIC=”en_US.UTF-8″ npm test
Evers
  • 223
  • 3
  • 9