量角器运行后uncaughtException [英] uncaughtException after a Protractor run

查看:80
本文介绍了量角器运行后uncaughtException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于重大更改,升级到Protractor 4.0.0并调整了配置后,我们终于启动了测试.

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.

推荐答案

这是当前已修复,并且应该很快就会解决.快速修补程序(在发布此修补程序之前)是更改node_modules中的代码或还原为3.3.0.

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.

编辑node_modules/protractor/built/launcher.js将第168行的uncaughtException替换为:

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

这篇关于量角器运行后uncaughtException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆