alexscheelmeyer / node-phantom

bridge to PhantomJS from Node.js
317 stars 117 forks source link

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

Open ianobermiller opened 11 years ago

ianobermiller commented 11 years ago

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 });
MrOrz commented 11 years ago

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

gkorland commented 11 years ago

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

alexscheelmeyer commented 11 years ago

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.

pongells commented 11 years ago

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.