Open csarrazi opened 9 years ago
I thought that used Symfony's Process component should be dealing with that kind of errors.
I'm not sure if stopping the Mink session, that used Zombie driver would actually terminate the Zombie's NodeJS process. Are you certain?
I only described the behavior on Windows. I can't reproduce the isue on Linux.
On windows, it seems terminating the Symfony process actually kills the node process too. It seems to be the same on linux, too.
Of course, I'm only speaking about the behavior when doing a return
or die
statement after a successful initialization of the session. On linux, it works fine.
Another thing: When there is an error in the main process (for example if ZombieDriver::triggerBrowserEvent()
fails for an unknown reason), the sub-process still runs in the background, and prevents the next run.
Another thing (but not related to this issue). On Linux (didn't try on windows yet as I only use a windows box at work for one of my clients), the sub-process is not killed if there is an error in the main process. This means the node process is still running in the background if there was an error while runing some code. I'll also investigate a little bit more on this second issue (or make a separate issue).
Another thing: When there is an error in the main process (for example if ZombieDriver::triggerBrowserEvent() fails for an unknown reason), the sub-process still runs in the background, and prevents the next run.
We already have an issue for this: #120 . It's missing a PR though.
Another thing (but not related to this issue). On Linux (didn't try on windows yet as I only use a windows box at work for one of my clients), the sub-process is not killed if there is an error in the main process. This means the node process is still running in the background if there was an error while runing some code. I'll also investigate a little bit more on this second issue (or make a separate issue).
Isn't this the same as above issue?
@stof , apparently Zombie now can be used on Windows. Can you please look into that?
Another thing (but not related to this issue). On Linux (didn't try on windows yet as I only use a windows box at work for one of my clients), the sub-process is not killed if there is an error in the main process. This means the node process is still running in the background if there was an error while runing some code. I'll also investigate a little bit more on this second issue (or make a separate issue).
Isn't this the same as above issue?
Actually, yeah. I went back and forth while writing my message, so I actually repeated myself. Sorry about that!
And yeah, Zombie can indeed be used on windows. It requires VS2010/12/13 to be installed on the machine, to compile the native node module.
@aik099 will try to check with my old computer when I have time (I'm on Ubuntu since september)
We should post that somewhere: Can't use Zombie, because you're on Windows? Switch to Ubuntu!
:)
I wasn't able to install Zombie on Windows myself.
@csarrazi , can you clarify on what VS2010/12/13
is? Is it Visual Studio
? Do I need to install whole Visual Studio just to get Zombie to compile?
Visual Studio. And yes, you need at least Visual Studio Express.
Oh, and you may run into issues when compiling node-gyp if you use a visual studio >2010, if you don't specify the visual studio version using
npm config set msvs_version 2012 --global (or 2013, if you use VS2k13)
Oh yeah, it's a real pain in the ***. ;)
When stopping the server, the
Connection
class throws the following warning:As well as a
RuntimeException
with the following message: "unable to kill the process".Removing the following line from the abstract
Server
class actually fixes the issue.Seems to me that Node's runtime is actually faster than PHP, and for that reason, the node server actually closes the connection when running the server's
stop()
method. This means that the connection as well as the process are closed: