UncaughtException after run

After upgrading to Protractor 4.0.0 and configuring it due to cracking changes, we finally run our tests.

Now the problem is that after a test run it fails:

[09:52:22] E/launcher - "process.on('uncaughtException'" error, see launcher [09:52:22] E/launcher - Process exited with error code 199 

How to debug this problem and understand what causes it?


Tried to start Protractor in "troubleshooting" mode:

 $ protractor config/local.conf.js --troubleshoot 

but got exactly the same result without any error details.

+7
javascript angularjs testing selenium-webdriver protractor
source share
5 answers

This is currently fixed , and a fix is โ€‹โ€‹due to be fixed soon. A quick fix (before the fix is โ€‹โ€‹fixed) is to change the code in node_modules or go back to 3.3.0.

Change node_modules/protractor/built/launcher.js to replace uncaughtException on line 168 as follows:

  process.on('uncaughtException', function (e) { var errorCode = exitCodes_1.ErrorHandler.parseError(e); if (errorCode) { var protractorError = e; exitCodes_1.ProtractorError.log(logger, errorCode, protractorError.message, protractorError.stack); process.exit(errorCode); } else { logger.error(e.message); logger.error(e.stack); process.exit(exitCodes_1.ProtractorError.CODE); } }); 
+11
source share

Upgrading to protractor 4.0.10 seems to solve it.

There were several fixes in the launcher from 4.0.0 to 4.0.10. See Change Log: https://github.com/angular/protractor/blob/master/CHANGELOG.md

+3
source share

Not sure what is going on and how best to debug such issues, but here is what I did to fix this:

  • removed node_modules completely
  • npm install (protractor listed as ^4.0.0 in package.json )
  • Completed by node_modules/.bin/webdriver-manager update

And now it works, it no longer throws an uncaughtException .


I also removed protractor-jasmine2-screenshot-reporter , but I don't think that matters.

In addition, we used grunt-protractor-runner to run Protractor tests from the grunt job, and I had to redo it and update the protractor dependency on 4.0.0 .

0
source share

The solution for modifying node_modules / protractor / built / launcher.js works.

Perhaps there was an error: "E / launcher - unknown error: version for Chrome should be> = 53.0.2785.0", which just should update your version of chrome

0
source share

I am using grunt-protractor-runner 4.0.0. I tested certain test files and received this error after I noticed that I accidentally commented on all the files in the specs array in the protractor.conf.js file.

 specs: [ //'test1-spec.js', //'test2-spec.js' ] 

Hope this stupid mistake helps someone.

0
source share

All Articles