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

node-phantom calling twice the phantom create callback

Open apdmatos opened this issue 11 years ago • 3 comments

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 avatar Jun 15 '14 20:06 apdmatos

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

zhouseahe avatar Jun 27 '14 10:06 zhouseahe

@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 avatar Jun 27 '14 14:06 apdmatos

wow. Almost 9 years ago. Time flies. Haha

apdmatos avatar Mar 19 '23 22:03 apdmatos