【问题标题】:PhantomJS has crashed - Fatal Windows exception, code 0xc0000005PhantomJS 已崩溃 - 致命的 Windows 异常,代码 0xc0000005
【发布时间】:2024-01-16 01:38:01
【问题描述】:

我们已经使用 EmberJS 构建了一个应用程序。当我们使用ember test 测试应用程序时,我们收到了一条失败消息。这里我提到了错误信息

操作系统:Windows 8(64 位) PhantomJS:2.1.1

PhantomJS - error
    ---
        message: >
            Error:          
            Non-zero exit code: 3221225477
            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.


        Log: |
            { type: 'error', text: 'Error: Browser exited unexpectedly' }
            { type: 'error', text: 'Non-zero exit code: 3221225477' }
            { type: 'error',
              text: 'Fatal Windows exception, code 0xc0000005.\r\nPhantomJS has crashed. Please read the bug reporting guide at\r\n<http://phantomjs.org/bug-reporting.html> and file a bug report.\r\n'
 }

【问题讨论】:

  • 这些天我也收到太多这个错误。我在 phantomjs 中看到了一些未解决的问题:12
  • 您的测试中是否有任何异步操作?测试完成时,那些可能还没有完成?
  • 但是这些测试是在linux平台上运行的。
  • 我也在使用 Windows。 (Windows 10,x64)

标签: node.js ember.js phantomjs npm-install


【解决方案1】:

我在 WSL 中的 Windows 10 上运行 PhantomJS 时遇到了非常相似的问题。 我发现:

崩溃可能源于 QT WebSocket 处理代码。

将 Karma 传输设置设置为轮询解决了我的问题,并且 PhantomJS 在启动时不再崩溃。

在您的Karma.conf.js 中添加:

transports: ['polling']

参考链接

【讨论】: