Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createPage callback not fired in node v0.10 #58

Closed
cedmax opened this issue Jun 14, 2013 · 10 comments
Closed

createPage callback not fired in node v0.10 #58

cedmax opened this issue Jun 14, 2013 · 10 comments

Comments

@cedmax
Copy link

cedmax commented Jun 14, 2013

I've noticed that using node 0.10 this code doesn't work

(function(){
    var phantom = require('node-phantom');

    phantom.create(function(e, ph){
        ph.createPage(function() {
            console.log("in");
        });
    });
})();

not sure what the issue is, but it works just fine with node 0.11 and <0.10

@skotchio
Copy link

I have the same one!

@accerqueira
Copy link

I had the same problem with node v0.10.8, upgraded to v0.10.12 and the problem is gone!

@skotchio
Copy link

skotchio commented Jul 4, 2013

Yes in a new nodejs version all works fine!

@alexscheelmeyer
Copy link
Owner

Weird. I am currently on 0.10.7 and does not see issues. Probably just a temporary fluke in node.

@jokeyrhyme
Copy link

I'm currently experiencing this with Node.JS v0.10.26 on OS X 10.9.3 (dev seed).

According to my console.log output, the callback for phantom.create is being called, with no error, but the callback for ph.createPage is not being called at all. I'm even really sure where to start diagnosing this.

@jokeyrhyme
Copy link

By the way, that's with the phantomjs@1.9.7-4 and node-phantom@0.2.5 packages.

Could this be related to #97 ?

@electerious
Copy link

Same problem when using node v0.10.28, phantomjs@1.9.7 and node-phantom@0.2.5 on OS X 10.9.

console.log 0

phantom.create (err, ph) ->

    console.log 1
    console.log err
    console.log ph

    ph.createPage (err, page) ->

        console.log 2

The output:

0
1
null
{ createPage: [Function],
  injectJs: [Function], …

The callback of ph.createPage never fires. No error…

@electerious
Copy link

#102 is responsible for this issue.

@zhouseahe
Copy link

@alexscheelmeyer , It seems several people confused by the version of socket.io . So , ah, I think you can test again . If Socket.io >=1.0.0 have no much promote for node-phantom , Set version to 0.9.17 should be considered . what if it's a bug of Socket.io . thanks for your work . thanks you can read my lines

@Ryan-YJL
Copy link

The latest version of node and socket.io are causing problems hanging with no response or an "Enoent" error. I'm using node locally for parsing/scraping data from the web so I can set the version as required.

Using the info the commenters, I downgraded to node 0.10.7 and set node_modules/node-phantom/package.json to use

"dependencies": {
    "socket.io": "0.9.17"
  },

npm install and got it working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants