node-phantom icon indicating copy to clipboard operation
node-phantom copied to clipboard

Crashes PhantomJS when opening https://www.google.com/offers

Open ianobermiller opened this issue 11 years ago • 4 comments

Not sure what the issue is with this specific site, but using node-phantom I cannot open https://www.google.com/offers. The same code works fine with PhantomJS-Node. I am not sure why this particular site fails; other https sites work fine, including https://www.google.com.

The first part will print "1: opened site? success".

The second, using node-phantom, never throws any errors, but by putting some console.log's in the source I can see that the phantom "exit" event is being raised with an error code of -1073741819 (basically it seems to be crashing). Both are using the same PhantomJS executable (using the phantomjs package) on Windows 8.

var phantom = require('phantom');

phantom.create(function(ph) {
    ph.createPage(function(page) {
        page.open("https://www.google.com/offers", function(status) {
            console.log("1: opened site? ", status);
            ph.exit();
        });
    });
});

var phantom2 = require('node-phantom');

phantom2.create(function(err, ph) {
    if (err) throw err;
    ph.createPage(function(err, page) {
        if (err) throw err;
        page.open("https://www.google.com/offers", function(err, status) {
            if (err) throw err;
            console.log("2: opened site? ", status);
            ph.exit();
        });
    });
}, { phantomPath: require('phantomjs').path });

ianobermiller avatar Feb 18 '13 02:02 ianobermiller

It also crashes on Mac 10.7.5. phantomjs v1.6.1, precompiled binary.

MrOrz avatar Feb 20 '13 12:02 MrOrz

I see similar crashes on phantomjs v1.9.0-windows,

gkorland avatar Apr 13 '13 05:04 gkorland

I am also seeing this with PhantomJS v1.8.1 on OS X and latest node-phantom. I do get an error though:

phantom stderr: PhantomJS has crashed. Please read the crash reporting guide at https://github.com/ariya/phantomjs/wiki/Crash-Reporting and file a bug report at https://code.google.com/p/phantomjs/issues/entry with the crash dump file attached: /tmp/9F717E67-90F2-49BF-926C-2FE113D62E96.dmp

I would guess that the difference is related to setting of some callbacks that PhantomJS-Node does not do.

Unfortunately getting PhantomJS crashes is not uncommon. One could hope they get fixed eventually.

alexscheelmeyer avatar May 22 '13 10:05 alexscheelmeyer

It crashes in the same way when loading 'www.bluewin.ch'. Could it be something with the size of the page?

As a side note, Phantom-Proxy crashes in the same way. It seems like the most reliable bridge is still Phantom-Node.

pongells avatar Jun 10 '13 15:06 pongells