alecxe alecxe - 1 year ago 834
Javascript Question

uncaughtException after a Protractor run

After upgrading to Protractor 4.0.0 and adjusting the config because of the breaking changes, we finally have our tests launching.

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

[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 is causing it?

Tried to run Protractor in "troubleshoot" mode:

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

but got exactly the same output with no details about the error.

Answer Source

Still not sure what was happening and what is the best way to debug problems like this, but here is what I've done to fix it:

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

And now it works, it does not throw the uncaughtException anymore.

I've also removed the protractor-jasmine2-screenshot-reporter, but I don't think it is relevant.

Also, we've been using grunt-protractor-runner to run Protractor tests from a grunt task and I had to fork it and update protractor dependency to 4.0.0.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download