Fatal Windows Exception Phantom Launcher

I'm having problems checking karma with gulp.

I use the phantomjs launch plugin, and when it tries to start, I see the following:

[09:27:02] Starting 'karma-tests'...
DEPRECATED: use your own version of lodash, this will go away in karma@2.0
DEPRECATED: use your own version of lodash, this will go away in karma@2.0
28 01 2017 09:27:04.817:INFO [karma]: Karma v1.4.0 server started at http://0.0.0.0:9876/
28 01 2017 09:27:04.817:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
28 01 2017 09:27:04.817:INFO [launcher]: Starting browser PhantomJS
28 01 2017 09:27:07.882:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on socket VwHY_WyYXMEj3RvZAAAA with id 284
68634
28 01 2017 09:27:08.436: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.

28 01 2017 09:27:08.471:ERROR [launcher]: PhantomJS crashed.

28 01 2017 09:27:08.475:INFO [launcher]: Trying to start PhantomJS again (1/2).
28 01 2017 09:27:10.457:WARN [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Disconnected (1 times)
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  Disconnectedundefined

[09:27:10] 'karma-tests' errored after 7.9 s
[09:27:10] Error: 1
    at formatError (C:\Users\asus\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:169:10)
    at Gulp.<anonymous> (C:\Users\asus\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:195:15)
    at emitOne (events.js:101:20)
    at Gulp.emit (events.js:188:7)
    at Gulp.Orchestrator._emitTaskDone (C:\Users\asus\Documents\Github\interACT\node_modules\orchestrator\index.js:264
:8)
    at C:\Users\asus\Documents\Github\interACT\node_modules\orchestrator\index.js:275:23
    at finish (C:\Users\asus\Documents\Github\interACT\node_modules\orchestrator\lib\runTask.js:21:8)
    at cb (C:\Users\asus\Documents\Github\interACT\node_modules\orchestrator\lib\runTask.js:29:3)
    at removeAllListeners (C:\Users\asus\Documents\Github\interACT\node_modules\karma\lib\server.js:380:7)
    at Server.<anonymous> (C:\Users\asus\Documents\Github\interACT\node_modules\karma\lib\server.js:391:9)
    at Server.g (events.js:291:16)
    at emitNone (events.js:91:20)
    at Server.emit (events.js:185:7)
    at emitCloseNT (net.js:1555:8)
    at _combinedTickCallback (internal/process/next_tick.js:71:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)

I use the latest versions of karma and phantomjs launcher with the following entries in my package. json:

"karma": "^1.4.0",
"karma-phantomjs-launcher": "^1.0.2"

Plus I have Phantomjs 2.1.1 installed globally

The nature of the error seems to suggest that it is related to Windows, I am running on a Windows platform with 64-bit 64-bit versions.

, , , 7, Windows 10 Linux. 10 , . ( ) 10, , - Windows .

karma, , . .

:

module.exports = function(config) {
  config.set({
    logLevel : config.LOG_INFO,
    colors: true,
    browsers: ['PhantomJS'],
    singleRun: true,
    port: 9876,
    autoWatch: false,
    basePath: '../',
    reporters: ['progress', 'coverage'],

    coverageReporter: {
      dir : 'test/coverage/',
      reporters: [{
        type: 'lcovonly',
        subdir: '.',
        file: 'karma-coverage.dat'
      }, {
        type : 'json',
        subdir: '.',
        file : 'karma-results.json'
      }]
    },

    frameworks: ['jasmine'],
    exclude: ['../dist/client/assets/scripts/angular_app.js'],
    files: [
      'dist/client/assets/scripts/jquery.js',
      'dist/client/assets/scripts/bootstrap.js',
      'dist/client/assets/scripts/bower_libs.js',
      'dist/client/assets/scripts/d3.min.js',
      'dist/client/assets/scripts/main.js',
      'test/mocks/mocks.config.js',
      'test/mocks/**/*.mock.js',
      'src/client/app/**/*.module.js',
      'src/client/app/**/!(*spec).js',
      'src/client/app/**/*.spec.js'
    ],

    preprocessors: {
      'src/client/app/**/!(*spec).js': ['coverage']
    }
  });
};

- , ?

, .

+4
1

, 2.5.0, exe phantom , , phantomjs.

, :

PROJECT_ROOT\node_modules\phantomjs-prebuilt\lib\phantom\bin

, ! , 2.5 , - https://github.com/ariya/phantomjs/milestones

!

+4

Source: https://habr.com/ru/post/1668091/


All Articles