Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/464.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript [phantomjs.launcher]:致命的Windows异常,代码0xC000005_Javascript_Typescript_Unit Testing_Karma Jasmine_Karma Runner - Fatal编程技术网

Javascript [phantomjs.launcher]:致命的Windows异常,代码0xC000005

Javascript [phantomjs.launcher]:致命的Windows异常,代码0xC000005,javascript,typescript,unit-testing,karma-jasmine,karma-runner,Javascript,Typescript,Unit Testing,Karma Jasmine,Karma Runner,首先,这可能是一个重复的问题。我尝试了那里给出的解决方案,但仍然不适用于我 我用karma 4.0.0建立了一个Webpack4(4.16.5)项目(在我使用karma 1.x.x之前,错误仍然是一样的)。自从我在项目中添加了更多的单元测试(尽管没有太多的测试用例)之后,它就开始发生了 下面是我运行测试时得到的结果(不是所有时间,例如,如果我运行10次,它通常运行2-3次) 非常感谢您对如何解决此问题提出建议,这真的很烦人有人能帮助解决此问题吗?我也遇到了同样的错误。 PhantomJS 2.1

首先,这可能是一个重复的问题。我尝试了那里给出的解决方案,但仍然不适用于我

我用
karma 4.0.0
建立了一个
Webpack4(4.16.5)
项目(在我使用
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)
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,

    });
};