onError exceptions not working on apt-get installed phantomjs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
phantomjs (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
page.onError() is not properly called on errors.
1) Ubuntu Release: 16.04 LTS
2) $ apt-cache policy phantomjs
phantomjs:
Instalados: 2.1.1+dfsg-1
Candidato: 2.1.1+dfsg-1
Tabla de versión:
*** 2.1.1+dfsg-1 500
500 http://
100 /var/lib/
3) Example test script (save it as test.js and then exec "phantomjs test.js"):
var page = require(
page.onError = function(msg, trace) {
console.log('Ok, got exception');
phantom.exit();
};
page.open('/', function(status) {
page.
window.
});
console.log('Not ok, should not get here');
phantom.exit();
});
4) IMPORTANT: If I unistall package (sudo apt-get remove phantomjs) and then download binary package from phantomjs.org, everething works fine (and the test above pass)