fig
fig copied to clipboard
failed to launch fig: `failed to connect to socket`
Checks
- [X] I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
- [X] I have run
fig doctor
in the affected terminal session - [X] I have run
fig restart
and replicated the issue again
Operating system
macOS
Expected behaviour
Fig was previously giving me errors so I tried a fresh installation. I thought it would start up correctly and start doing autocomplete after I finished the setup process and restarted my terminal.
Actual behaviour
The fig
command displays:
error: Could not launch fig
fig doctor shows:
Fig socket exists: Fig socket parent directory does not exist
Path: /var/tmp/fig/jonathanmilligan/fig.socket
Attempting to fix automatically...
Failed to fix: Permission denied (os error 13)
Trying to restart fig simply says:
error: Unable to restart Fig
A quick search on the internet shows that it's a permissions problem. Fig isn't able to access its files because the parent director of the fig.socket file didn't exist. I checked /var/tmp/fig/ and didn't find the directory it was looking for. Even after manually creating the required directory fig doctor
now just shows:
Fig socket exists: Fig socket missing
Attempting to fix automatically...
Restarting Fig
Failed to fix: Unable to restart Fig
If someone could explain to me how this could have happened with a fresh installation of Fig I would be very grateful. Thanks!
This issue references the same problem but a restart did not work for me.
Steps to reproduce
I reinstalled Fig with Homebrew and restarted my computer but got the exact same error.
Environment
## NOTE: Fig is not running, run `fig launch` to get the full diagnostics
fig-details:
hardware-info:
- model: MacBook Air
- model-id: MacBookAir10,1
- chip-id: Apple M1
- cores: 8 (4 performance and 4 efficiency)
- mem: 8 GB
os-info:
- macOS 13.0.0 (22A5365d)
environment:
- shell: /bin/zsh
- terminal: iterm
- cwd: /Users/jonathanmilligan/Desktop/mcc/mod6
- exe-path: /opt/homebrew/bin/fig
- install-method: brew
- env-vars:
- TERM_SESSION_ID: 36d85372-ba82-4814-b036-522b5e82cae1
- SHELL: /bin/zsh
- PATH: /opt/homebrew/opt/node@16/bin:/Users/jonathanmilligan/.cargo/bin:/opt/homebrew/Caskroom/miniforge/base/condabin:/Users/jonathanmilligan/Library/Python/3.10/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/sbin:/opt/homebrew/sbin:/opt/homebrew/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/jonathanmilligan/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/jonathanmilligan/Documents/GitHub/cli-tools/scripts:/Users/jonathanmilligan/.bin:/opt/homebrew/opt/fzf/bin:/Users/jonathanmilligan/.fig/bin:/Users/jonathanmilligan/.local/bin
- DISPLAY: /private/tmp/com.apple.launchd.3JN4mOanNS/org.xquartz:0
- TERM: xterm-256color
- FIG_INTEGRATION_VERSION: 8
- FIG_EXECUTION_STRING:
- FIG_START_TEXT: source ~/.zshrc ~/.zshenv ~/.zprofile; clear
- FIG_SHELL: /bin/zsh
- FIG_IS_LOGIN_SHELL: '0'
- FIG_TERM: 1
- FIG_TERM_VERSION: 2.5.3
- FIG_PID: 13804
- FIG_SET_PARENT: 36d85372-ba82-4814-b036-522b5e82cae1
- integrations:
Do you have multiple user accounts on the same machine? Can you run the following commands and share the output here:
-
ls -l /var/tmp/
2.ls -l /var/tmp/fig
3.ls -l /var/tmp/fig/jonathanmilligan
Thanks for the quick response!
ls -l /var/tmp/
total 232
-rw-r--r-- 1 _windowserver wheel 81920 Oct 8 21:11 cbrgbc_1.sqlite
-rw-r--r-- 1 _windowserver wheel 32768 Oct 13 16:35 cbrgbc_1.sqlite-shm
-rw-r--r-- 1 _windowserver wheel 0 Oct 8 21:11 cbrgbc_1.sqlite-wal
-rw-rw-rw-@ 1 root wheel 277 Oct 13 16:36 com.cvnt.anti-ddos.logging.json
drwx-wx-wx 3 root wheel 96 Oct 13 22:30 com.cvnt.eventsink
drwxrwxrwx@ 4 admin wheel 128 Oct 13 16:22 fig
drwxr-xr-x 2 root wheel 64 Oct 8 21:11 kernel_panics
ls -l /var/tmp/fig
total 0
drwxr-xr-x 5 admin wheel 160 Oct 12 12:45 admin
drwxr-xr-x@ 2 root wheel 64 Oct 13 16:22 jonathanmilligan
ls -l /var/tmp/fig/jonathanmilligan
total 0
It seems like you may have installed Fig from your "admin" account? Is this possible?
(We should create this folder with different permissions by default cc @grant0417 )
No, I definitely installed Fig with my "jonathanmilligan" user account. I also signed in the "admin" account which might of overwritten the folder permissions (just brainstorming) but Fig was installed from my user account.
what next , could you please help with this,i am stuck here
Hi, I also have this issue. Fig is basically nonfunctioning, although I can open the dashboard and menubar options. I have two users on my machine.
- First, I did what @realprogrammersusevim did and tried to manually create the directory that was supposedly missing: that didn't work.
- Then I actually (manually) uninstalled fig and reinstalled it, but that didn't help.
- Rebooting hasn't helped either.
Logs
fig launch
Fig is already running!
fig
error: Could not launch fig
fig doctor
jan@Jans-MacBook-Pro ~ % fig doctor
✘ Fig socket exists: Fig socket missing
Attempting to fix automatically...
Restarting Fig
Failed to fix: Unable to restart Fig
✘ Doctor found errors. Please fix them and try again.
If you are not sure how to fix it, please open an issue with fig issue to let us know!
Or, email us at [email protected]!
fig restart
Restarting Fig
error: Unable to restart Fig
ls -l /var/tmp/
total 0
drwxr-xr-x 4 janpersonal wheel 128 18 Oct 17:02 fig
drwxr-xr-x 2 root wheel 64 17 Oct 19:39 kernel_panics
ls -l /var/tmp/fig
total 0
drwxr-xr-x 2 root wheel 64 18 Oct 17:02 jan
drwxr-xr-x 5 janpersonal wheel 160 25 Oct 12:06 janpersonal
ls -l /var/tmp/fig/jan
total 0
ls -l /var/tmp/fig/root
ls: /var/tmp/fig/root: No such file or directory
Well, I don't know what happened but after updating to macOS Ventura, it's now suddenly working...
I had this issue after updating to Ventura. I do have multiple accounts.
Taking into account @mschrage suggestion I went to
/var/tmp/fig
and made a copy of the existing folder belonging to one of the accounts and changed its name to match the name of the other account in my system in order have one folder matching each account name.
After that ran fig doctor
and it fixed the issue for me.
Not sure if this is safe or correct but it did the trick.
Having this issue in 2024 under the new "Code Whisperer" name, for me there is no /var/tmp/fig
. In fact the only folder under tmp
is com.apple.wifianalyticsd
.