phantomjs --version.phantomjs_2016-06-03-160135_thaggie-mbp15.crash.txt
03 06 2016 16:01:35.733:ERROR [phantomjs.launcher]: PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
03 06 2016 16:01:35.961:ERROR [launcher]: PhantomJS crashed.
03 06 2016 16:01:35.965:INFO [launcher]: Trying to start PhantomJS again (1/2).
03 06 2016 16:01:46.366:WARN [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: Disconnected (1 times), PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 4 of 82 DISCONNECTED (10.676 secs / 0.01 secs)
(Running on same OS, PJS version etc)
Can confirm that I have a similar crash when downloading WebPacked additional resources. Blacklisting the url of webpacked resource resolves the issue:
Array.prototype.contains = function (v) {
return this.indexOf(v) > -1;
};
var system = require('system');
var args = system.args;
var webPage = require('webpage');
var page = webPage.create();
var blackList = [
"https://www.moneysupermarket.com/etc/designs/moneysupermarket-shop-cbd/bundle/shopbasepage.ab988182b2c59a3aa2cd6bd580dff7e8.js"
];
page.onResourceRequested = function (req, network) {
console.log(req.id+" "+req.url);
if(blackList.contains(req.url))
{
console.log("Blacklisted: "+req.url);
network.abort();
return false;
}
}
page.onResourceError = function(resourceError) {
console.log("[ERROR] "+resourceError.errorString);
}
console.log("Opening "+args[1]);
page.open(args[1], function(status) {
console.log('Status: ' + status);
phantom.exit();
});
phantomjs crash.js https://www.moneysupermarket.com/mortgages/results
Looks to be something specific to WebPack (http://webpack.github.io/)
I just faced the same problem in a project based on mxstbr/react-boilerplate (it uses webpack). PhantomJS was only crashing when the server was running in dev mode. Commenting out devtool: 'cheap-module-eval-source-map' in webpack.dev.babel.js did the trick.
Seems like there is some glitch in PhantomJS, because the project opens without any problems in all browsers I'm testing it in.
Can confirm that we see a lot of sporadic PhantomJS deaths when using one of the eval devtools in Webpack.
Both eval and inline-cheap-module-eval-source-map seem to be problematic. When not setting any devtool, the crashes stop.
This is after upgrading to PhantomJS 2.1.1. With 1.9, this issue was not present.
Also experiencing this issue with any of the eval sourcemap variants in Webpack config when using PhantomJS 2.1.7. A quick workaround was to set NODE_ENV before running any tests that used PhantomJS, and conditionally setting the devtool value to something that didn't cause issues. Would still be nice to not have to do this workaround.
Same here. Commenting out the devtool line in our webpack config fixed the sporadic PhantomJS crashes we were having.
The crash _might be_ originating in the QT WebSocket handling code. Try setting the Karma transports setting to _polling_ to disable the communication through WebSockets:
transports: ['polling']
Same here with devtool: 'eval-source-map' when trying to run Karma/Jasmine tests.
macOS: 10.12.5
webpack: 2.5.0
karma-phantomjs-launcher: 1.0.4
phantomjs-prebuilt: 2.1.14
Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!
Most helpful comment
I just faced the same problem in a project based on
mxstbr/react-boilerplate(it uses webpack). PhantomJS was only crashing when the server was running in dev mode. Commenting outdevtool: 'cheap-module-eval-source-map'inwebpack.dev.babel.jsdid the trick.Seems like there is some glitch in PhantomJS, because the project opens without any problems in all browsers I'm testing it in.