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

Hang while stopping tunnel in docker/npm #25

Closed
tylerbrandt opened this issue Dec 9, 2016 · 9 comments
Closed

Hang while stopping tunnel in docker/npm #25

tylerbrandt opened this issue Dec 9, 2016 · 9 comments

Comments

@tylerbrandt
Copy link

The issue is that Local.prototype.stop hangs indefinitely when invoked from a docker container.

This is easiest to illustrate with an example, so I created a repo: https://github.com/optimizely/browserstack-local-hang

@vedharish
Copy link
Contributor

@tylerbrandt Yup, looks like a bug in this package. Will debug further and revert here

@punitx
Copy link
Collaborator

punitx commented Jan 17, 2017

The issue seems to be related to some zombie processes remaining on the container. Docker does not run processes under a special init process that properly reaps child processes.

To get it working for now, try replacing CMD ["npm", "test"] with CMD ["/bin/bash", "-c", "set -e && npm test"] in your Dockerfile. This should work. We will also try to find a workaround at our end.

@tylerbrandt
Copy link
Author

@punitx thanks for the response! I can confirm that the workaround solves the problem in the sample repo; I'm going to check if it resolves it in my app repo as well (which is a bit more complicated).

@nakula
Copy link

nakula commented Jan 21, 2017

thanks @tylerbrandt

@nakula
Copy link

nakula commented Feb 2, 2017

@tylerbrandt hey, lets us know if it worked.

@tylerbrandt
Copy link
Author

Yeah, I have it implemented in the production repo and it works great, thanks!

@tamasmahr
Copy link

This is still a problem for me. I am running browserstack-local in bitbucket pipelines, thus I cannot configure CMD for the docker image. I tried to prefix bash -c set -e && to the protractor command that starts browserstack-local, but no avail.

Can you do something about it in your code?

@AnkurGel
Copy link
Member

AnkurGel commented Aug 1, 2017

@tamasmahr Above fix was for docker. We will investigate the issue with BitBucket pipelines soon and get back.

@pscanf
Copy link

pscanf commented May 28, 2018

We will investigate the issue with BitBucket pipelines soon and get back.

Any news on this? I'm also running into this issue.

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

No branches or pull requests

8 participants