uncaughtException after a Protractor run(量角器运行后出现 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?
尝试在疑难解答"模式下运行 Protractor:
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:量角器运行后出现 uncaughtException
				
        
 
            
        基础教程推荐
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
 - Node.js 有没有好的索引/搜索引擎? 2022-01-01
 - WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
 - 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
 - Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
 - 如何在特定日期之前获取消息? 2022-01-01
 - 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
 - 每次设置弹出窗口的焦点 2022-01-01
 - jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
 - 什么是不使用 jQuery 的经验技术原因? 2022-01-01
 
    	
    	
    	
    	
    	
    	
    	
    	
						
						
						
						
						
				
				
				
				