uncaughtException after a Protractor run

10,989

Solution 1

This is currently being fixed and there should be a hot fix out soon. The quick fix (before the hot fix is released) is to change the code in your node_modules or revert to 3.3.0.

Edit node_modules/protractor/built/launcher.js replace the uncaughtException at line 168 with:

    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);
    }
});

Solution 2

Upgrading to protractor 4.0.10 seems to solve it.

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

Share:
10,989
alecxe
Author by

alecxe

"I am a soldier, at war with entropy itself" I am a Software Developer and generalist who is in love with the Python language and community. I greatly value clean and maintainable code, great software, but I know when I need to be a perfectionist and when it stands in a way of product delivery. I like to break things, to find new ways to break things, to solve hard problems, to put things under test and stress, and to have my mind blown by an interesting question. Some of my interests: Learning, Productivity, AI, Space Exploration, Internet of Things. "If you change the way you look at things, the things you look at change." - Wayne Dyer If you are looking for a different way to say "Thank you": Amazon wish list Pragmatic wish list Today I left my phone at home And went down to the sea. The sand was soft, the ocean glass, But I was still just me. Then pelicans in threes and fours, Glided by like dinosaurs, An otter basked upon its back, And dived to find another snack. The sun corpuscular and bright, Cast down a piercing shaft, And conjured an inspiring sight On glinting, bobbing craft. Two mermaids rose up from the reef, Out of the breaking waves. Their siren song was opium grief, Their faces from the grave. The mermaids asked a princely kiss To free them from their spell. I said to try a poet’s bliss. They shrugged and bid farewell. The sun grew dark and sinister, In unscheduled eclipse. As two eight-headed aliens Descended in their ships. They said the World was nice enough But didn’t like our star. And asked the way to Betelgeuse, If it wouldn’t be too far. Two whales breached far out to sea, And flew up to the sky, The crowd was busy frolicking, And didn’t ask me why. Today I left my phone at home, On the worst day, you’ll agree. If only I had pictures, If only you could see. Not everything was really there, I’m happy to confess, But I still have the memories, Worth more than tweets and stress. Today I left my phone at home, I had no shakes or sorrow. If that is what my mind can do, It stays at home tomorrow. Gavin Miller

Updated on June 22, 2022

Comments

  • alecxe
    alecxe almost 2 years

    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.

  • Ram Pasala
    Ram Pasala almost 8 years
    It's a bug, I hope this would clear up things github.com/angular/protractor/issues/3384 ;)
  • alecxe
    alecxe almost 8 years
    @igniteram1 oh, great, thanks for sharing, I'll watch that issue.
  • ji-ruh
    ji-ruh over 7 years
    I still encounter the issue in 403.