Skip to content

Conversation

@apdmatos
Copy link

Hi,

Just found a weird behaviour with node-phantom when creating a process.
After calling phantom.create with a callback, after a number of interactions creating and closing pages the callback provided to phantom.create function is executed again.

After digging around with this, I think I found the reason why this happen and here's the fix.

You can find a more detailed description about the bug here: https://github.com/apdmatos/node-phantom-connectionupgrade-bug

And there's a script to reproduce it as well.

For some reason, this does not work with socketio version 1.x.x or higher. So, I've just updated the package.json till someone figure out what is going on with this.

Regards,
André

apdmatos added 2 commits June 15, 2014 15:27
the callback was executed twice with a phantom process to renew the connection, and the first callback instance is useless

with this bug fix, the callback will only be called once and the connection upgrade is transparent to the user
@zhouseahe
Copy link

@apdmatos ,
ph.createPage(function(err, page){ seems waiting ... and no response ...can you help me . thanks

@apdmatos
Copy link
Author

@zhouseahe

Have you tried my example that reproduces the bug here:
https://github.com/apdmatos/node-phantom-connectionupgrade-bug

Or as an alternative can you send me the code please?

@apdmatos
Copy link
Author

wow. Almost 9 years ago. Time flies. Haha

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

Successfully merging this pull request may close these issues.

3 participants