onError exceptions not working on apt-get installed phantomjs

Bug #1587634 reported by daniel
6
This bug affects 1 person
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://ar.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

3) Example test script (save it as test.js and then exec "phantomjs test.js"):

var page = require('webpage').create();
page.onError = function(msg, trace) {
  console.log('Ok, got exception');
  phantom.exit();
  };
page.open('/', function(status) {
  page.evaluate(function(){
    window.dozNotExistz();
  });
  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)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.