Closed raumirco closed 7 years ago
Does this happen every time? If it's a one time situation, there's a manual fix, but it shouldn't be a recurring thing.
https://github.com/leonid-shevtsov/headless#display-socket-is-taken-but-lock-file-is-missing
This error is recurring for me. I also get it while running tests. What's the manual fix?
headless version: 2.1.0 Xfvb version: from XQuartz 2.7.9 ruby version: 2.3.1 OS: OSX 10.11.4
The manual fix is described here.
Are you doing something else with the XQuartz? And please post your Headless.start
arguments.
The manual fix (pkill Xvfb
) is a no-op for me - I can't even find a running process named Xvfb (ps aux | grep -i xvfb
doesn't show anything).
My arguments to Headless.start
:
Headless.new(display: 100, reuse: true, destroy_at_exit: true).start
I also tried it with no options at at all (Headless.new.start
) to see if using the defaults was all I needed to do. I get the same exception.
Let me know if I can provide more info or help in any way.
I see this consistently using the Ubuntu 14 environment on Circle CI. My Headless settings are: Headless.new(reuse: true, destroy_at_exit: false)
on osx EI Capitan (10.11.6) Xfvb version: from XQuartz 2.7.9 ruby version: 2.3.1
gem uninstall capybara-webkit
brew tap homebrew/versions
brew install qt55
brew linkapps qt55
brew link --force qt55
gem install capybara-webkit
Works fine for me: Headless.new(reuse: false).start
Had this problem too.
Needed to just run Xvfb
and/or quartz-wm
once and that solved the issue.
Apparently, that created the /tmp/.X11-unix/ folder, not sure if it created something else.
This fixed this issue for me on macOS El Capitan:
mkdir /tmp/.X11-unix
sudo chmod 1777 /tmp/.X11-unix
sudo chown root /tmp/.X11-unix/
☝️ This worked for me using Capybara with Sierra.
This is an issue on every reboot. My assumption is that /tmp is clearing and I have to recreate the file each time. macOS Sierra 10.12.4, XQuartz 2.7.11. (Edit: also worth noting -- this is the only thing i use XQuartz for)
any updates on this? I also have the same issue on every reboot. Sierra 10.12.6, xquartz 2.7.11
Unfortunately, I can't solve this issue because it's a fundamental X server requirement to have a /tmp/.X11-unix
directory and have it owned by root. In addition, since macOS does clean /tmp
on reboot, you need to set the directory up every time.
Fortunately, XQuartz.app will do that for you, so a simple solution is to add XQuartz.app to login items.
The only thing I can do is improve the error message, and document the solution here: https://github.com/leonid-shevtsov/headless#tmpx11-unix-is-missing
Installing chromedriver fixed this for me (on a mac brew install chromedriver
).
@btucker 's fix worked for me.
When I run my tests in parallel I am getting the following error: "Failure/Error: Unable to find matching line from backtrace Headless::Exception: Display socket is taken but lock file is missing - check the Headless troubleshooting guide