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
416 views
in Technique[技术] by (71.8m points)

javascript - 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.

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

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

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

2.1m questions

2.1m answers

60 comments

57.0k users

...