Public bug reported:

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)

** Affects: phantomjs (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1587634

Title:
  onError exceptions not working on apt-get installed phantomjs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/phantomjs/+bug/1587634/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to