Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
744 views
in Technique[技术] by (71.8m points)

angularjs - "Runtime.executionContextCreated has invalid 'context" error when i run Protractor

I am getting this below Error while i run my protractor. And below is the error as shown in my webstorm console.

"C:Program Files (x86)JetBrainsWebStorm 2016.2in unnerw.exe" "C:Program Files odejs ode.exe" c:Usersx216526AppDataRoaming pm ode_modulesprotractoruiltcli.js C:Usersx216526workspace_ProtractorSWA_Protractorconf.js [17:59:58] I/direct - Using ChromeDriver directly... [17:59:58] I/launcher - Running 1 instances of WebDriver [18:00:01] E/launcher - session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"9784.1","isDefault":true},"id":1,"name":"","origin":"://"} (Session info: chrome=54.0.2824.0) (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) [18:00:01] E/launcher - SessionNotCreatedError: session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"9784.1","isDefault":true},"id":1,"name":"","origin":"://"} (Session info: chrome=54.0.2824.0) (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) at WebDriverError (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverliberror.js:26:26) at SessionNotCreatedError (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverliberror.js:307:26) at Object.checkLegacyResponse (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverliberror.js:639:15) at parseHttpResponse (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverhttpindex.js:538:13) at c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverhttpindex.js:472:11 at ManagedPromise.invokeCallback_ (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverlibpromise.js:1379:14) at TaskQueue.execute_ (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverlibpromise.js:2913:14) at TaskQueue.executeNext_ (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverlibpromise.js:2896:21) at c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverlibpromise.js:2820:25 at c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverlibpromise.js:639:7 From: Task: WebDriver.createSession() at Function.createSession (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverlibwebdriver.js:329:24) at Driver (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesselenium-webdriverchrome.js:778:38) at Direct.getNewDriver (c:Usersx216526AppDataRoaming pm ode_modulesprotractoruiltdriverProvidersdirect.js:68:26) at Runner.createBrowser (c:Usersx216526AppDataRoaming pm ode_modulesprotractoruilt unner.js:187:43) at c:Usersx216526AppDataRoaming pm ode_modulesprotractoruilt unner.js:261:30 at _fulfilled (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesqq.js:834:54) at self.promiseDispatch.done (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesqq.js:863:30) at Promise.promise.promiseDispatch (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesqq.js:796:13) at c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesqq.js:556:49 at runSingle (c:Usersx216526AppDataRoaming pm ode_modulesprotractor ode_modulesqq.js:137:13) [18:00:01] E/launcher - "process.on('uncaughtException'" error, see launcher [18:00:01] E/launcher - Process exited with error code 199 Process finished with exit code 199

My config js look like below:

     exports.config = { 
          directConnect: true, // Capabilities to be passed
          //to the webdriver instance. 
         capabilities: { 'browserName': 'chrome', },
         framework: 'jasmine2',
         specs: ['./src/sli_sanitytests/San1_Check_
                        Sli_Homepage_is_Accessible_spec.js',
                 './src/sli_sanitytests/San2_
                  Click_createButton_to_Open_Sli_CreateForm_page_spec.js',
                 './src/sli_sanitytests/San3_
                  Create_Sli_reference_spec.js' ], 
               suites: { 
                         smoke: ['./smoke/!*.spec.js'],
                         regression:['./regression/!*.spec.js'],
                         functional: ['./functional/!*.spec.js'],
                         all: ['./!*!/!*.spec.js'],
                         selected:['./functional/addcustomer.spec.js',
                                    './regression/openaccount.spec.js'],
                         },
                       // Options to be passed to Jasmine
                  jasmineNodeOpts: {
                 //onComplete will be called just before the driver quits.                                
                  onComplete: null, 
                 // If true, display spec names. 
                 isVerbose: true, // If true,print colors to the terminal. 
                 showColors: true, // If true, include stack traces in       
                                   //failures. 
                 includeStackTrace: true, // Default time to wait in ms  
                                         //before a test fails.  
                 defaultTimeoutInterval: 80000 
                             },
                //enter code here 
               onPrepare:function() { 
                   browser.ignoreSynchronization = true;
                   browser.driver.manage().window().maximize(); 
               },
             }
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

2016-10-13: ChromeDriver v2.24 has been released which supports Chrome v52-54. (Thanks @Anton)


2016-08-16: One of the recent updates to the Chrome Dev channel introduced a bug preventing ChromeDriver from properly starting. Having just worked around the same problem, I would suggest backing up your data and reverting to the Beta or Stable release channel of Chrome. See the Chrome Release Channels for more details on safely switching.


Alternatively, switching to the Dev version of ChromeDriver should also fix the issue. From a closed issue on the chromedriver project:

There are some Devtool changes in Chrome dev channel v54 which is not currently supported in Chromedriver stable v2.23. You may want to use dev version of Chromedriver which has the fix. It can be downloaded from chromedriver…/continuous/….zip

Review the issue for the full link.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...