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

node-phantom calling twice the phantom create callback #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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