量角器运行后的uncaughtException

ale*_*cxe 7 javascript testing angularjs selenium-webdriver protractor

升级到Protractor 4.0.0并因为重大变化而调整配置后,我们终于启动了测试.

现在,问题是在测试运行后它失败了:

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

如何调试此问题并了解导致它的原因?


试图在"故障排除"模式下运行Protractor:

$ protractor config/local.conf.js --troubleshoot
Run Code Online (Sandbox Code Playgroud)

但得到完全相同的输出,没有关于错误的详细信息.

cni*_*ina 11

这个目前正在修复,应该很快就会有一个热门修复.快速修复(在热修复发布之前)是更改node_modules中的代码或恢复为3.3.0.

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

    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);
    }
});
Run Code Online (Sandbox Code Playgroud)