bermi / sauce-connect-launcher

Downloads and launches an instance of Sauce Connect Selenium Proxy https://wiki.saucelabs.com/display/DOCS/Sauce+Connect+Proxy
72 stars 70 forks source link

Fix detached mode for sauce > 4.3.16 #110

Open johanneswuerbach opened 7 years ago

johanneswuerbach commented 7 years ago

Currently the detached option is only supported for sc <= 4.3.16 due to a bug in the golang reimplementation done in 4.4+ https://github.com/bermi/sauce-connect-launcher/blame/v1.1.1/README.md#L119

A support case has been opened, but no fix is available so far.

makepanic commented 6 years ago

Hi, I'm trying to use the detached version with sc 4.4.12 but somehow killing the process isn't stopping the tunnel.

I've tried to manually spawn the sc binary in detached mode. If I manually kill the spawned process, sc closes the tunnel.

const cp = require('child_process');

const child = cp.spawn(path_to_sc, sc_options, {
  detached: true,
  stdio: 'ignore',
});

console.log(child.pid);
child.unref();

Any suggestions on where to start looking why it isn't working with sauce-connect-launcher? I'll try to investigate it further.