javascript - [phantomjs.launcher]:致命的 Windows 异常,代码 0xc0000005
问题描述
首先,这可能是来自PhantomJS has crashed 的重复问题 - 致命的 Windows 异常,代码 0xc0000005。我尝试了那里给出的解决方案,但它仍然不适合我
我建立了一个webpack 4 (4.16.5)
项目karma 4.0.0
(在我使用之前,karma 1.x.x
但错误仍然相同)。自从我向项目中添加了更多单元测试(尽管没有太多测试用例)后,它就开始发生了。
所以这就是我运行测试时得到的结果(不是一直,例如如果我运行 10 次,它通常会工作 2-3 次)
PhantomJS 2.1.1 (Windows 8.0.0): Executed 0 of 37 SUCCESS (0 secs / 0 secs)
12 02 2019 14:01:09.798:ERROR [phantomjs.launcher]: Fatal Windows exception, code 0xc0000005.
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
12 02 2019 14:01:09.910:ERROR [launcher]: PhantomJS crashed.
Fatal Windows exception, code 0xc0000005.
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
12 02 2019 14:01:09.910:ERROR [launcher]: PhantomJS stdout:
12 02 2019 14:01:09.911:ERROR [launcher]: PhantomJS stderr: Fatal Windows exception, code 0xc0000005.
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
12 02 2019 14:01:09.915:INFO [launcher]: Trying to start PhantomJS again (1/2).
PhantomJS 2.1.1 (Windows 8.0.0) ERROR
Disconnectedreconnect failed before timeout of 2000ms (transport error)
PhantomJS 2.1.1 (Windows 8.0.0): Executed 0 of 37 DISCONNECTED (5.91 secs / 0 secs)
我点击链接http://phantomjs.org/bug-reporting.html但找不到任何有价值的信息。
以下是我的内容karma.conf.ts
module.exports = function karmaConfig(config) {
config.set({
singleRun: true,
frameworks: [
'jasmine'
],
files: [
'sdk/**/*.spec.ts'
],
preprocessors: {
'sdk/**/*.spec.ts': ['webpack', 'sourcemap'],
'sdk/**/!(*.spec).ts': ['coverage']
},
browsers: [
'PhantomJS'
],
reporters: [
'progress',
'coverage',
'junit'
],
coverageReporter: {
dir: 'coverage/',
reporters: [
{ type: 'text-summary' },
{ type: 'html' },
{
type: 'lcov',
dir: 'reports',
subdir: 'coverage'
}
]
},
junitReporter: {
outputFile: 'reports/junit/TEST-karma.xml',
useBrowserName: false
},
transports: ['polling'],
webpack: require('./webpack.config'),
webpackMiddleware: {
stats: 'errors-only'
},
logLevel: config.LOG_INFO,
});
};
非常感谢有关如何解决此问题的任何建议,这真的很烦人
解决方案
推荐阅读
- java - 如何计算需要覆盖字符串的选项卡数
- sql - 电子商务结帐:何时何地在关系数据库中为购物车中的商品创建中间和最终订单
- javascript - 如何使页面的特定部分居中,使其与平滑滚动完美结合?
- c# - 使用 C# 创建文件
- reactjs - 我可以将 ref 存储在 Redux 存储中,还是被认为是不好的做法?
- mysql - 构建动态 SQL 查询以对有限制的记录进行排序
- php - 使用 ajax 和 jquery 的简单食物跟踪器
- javascript - 键“local_part”的重复条目“0-0”
- javascript - Codeceptjs 无法在不使用元素的情况下滚动/向下滑动
- python - 无法从 angel.co 网站抓取所有数据