Hang while stopping tunnel in docker/npm
tylerbrandt opened this issue · 9 comments
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
@tylerbrandt Yup, looks like a bug in this package. Will debug further and revert here
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.
@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).
thanks @tylerbrandt
@tylerbrandt hey, lets us know if it worked.
Yeah, I have it implemented in the production repo and it works great, thanks!
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?
@tamasmahr Above fix was for docker. We will investigate the issue with BitBucket pipelines soon and get back.
We will investigate the issue with BitBucket pipelines soon and get back.
Any news on this? I'm also running into this issue.