Reputation: 2445
I'm currently running tests using PhantomJS and Karma to test a Angular.js application. With the recent release of ChromeHeadless, we have started using ChromeHeadless test browser instead of the default PhantomJS browser.
I currently have karma-chrome-launcher
2.1.0 installed.
When I run my tests, I am presented with several different errors, extracts of which are listed below:
Cannot start ChromeHeadless
[0510/113948.371837:ERROR:resource_bundle.cc(767)] Failed to load /Applications/Google Chrome.app/Contents/Versions/58.0.3029.110/Google Chrome Framework.framework/Versions/A/resources.pak
Some features may not be available.
ChromeHeadless stdout:
10 05 2017 11:39:48.428:ERROR [launcher]: ChromeHeadless stderr: [0510/113948.371837:ERROR:resource_bundle.cc(767)] Failed to load /Applications/Google Chrome.app/Contents/Versions/58.0.3029.110/Google Chrome Framework.framework/Versions/A/resources.pak
Some features may not be available.
ChromeHeadless stderr: [0510/113948.490917:ERROR:resource_bundle.cc(767)] Failed to load /Applications/Google Chrome.app/Contents/Versions/58.0.3029.110/Google Chrome Framework.framework/Versions/A/resources.pak
Some features may not be available.
ChromeHeadless failed 2 times (cannot start). Giving up.
npm ERR! Test failed. See above for more details.
I have tried running a few npm commands, namely npm rebuild
and npm update
as I initially thought it was a dependency issue. That didn't work and I am not sure how to proceed. Any ideas?
Upvotes: 10
Views: 9195
Reputation: 2445
The issue was due to the version of Google Chrome I had installed. Headless Chrome is supported from Chrome 59 onwards, whereas I had 58 installed.
I installed the Chrome Beta to gain access to Headless Chrome.
Upvotes: 7