fig icon indicating copy to clipboard operation
fig copied to clipboard

Always complain about missing integration on SSH remote using Fish despite is being installed and configured

Open eramdam opened this issue 3 years ago β€’ 12 comments

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 14.0.0 (23A344) (local) / Ubuntu 22.04.3 LTS (remote)

Expected behaviour

Be able to install, configure Fig on my remote(s) and have autocomplete working.

Actual behaviour

When SSHing into a remote, Fig (local) complains that Fig (remote) isn't installed and configured despite it being configure and installed, but no autocompletion is working on the remote.

Steps to reproduce

No response

Environment

Local machine:

fig-details:
  - 2.17.0
hardware-info:
  - model: 
  - model-id: 
  - chip-id: Apple M1 Max
  - cores: 10
  - mem: 32.00 GB
os-info:
  - macOS 14.0.0 (23A344)
environment:
  - shell: /opt/homebrew/Cellar/fish/3.6.1/bin/fish
  - terminal: iterm
  - cwd: /Users/damien
  - exe-path: /Users/damien/.fig/bin/fig
  - install-method: brew
  - env-vars:
    - FIG_SET_PARENT: w0t0p0:7883D1BE-3230-415F-91AF-D4DDFC7CDD11
    - SHELL: /opt/homebrew/bin/fish
    - __CFBundleIdentifier: com.googlecode.iterm2
    - TERM: xterm-256color
    - FIG_TERM: 2.17.0
    - PATH: /Users/damien/.pyenv/shims:/Users/damien/.rbenv/shims:/Users/damien/Library/Caches/fnm_multishells/37382_1697350040654/bin:/Users/damien/.pyenv/bin:/opt/homebrew/opt/qt@5/bin:/Users/damien/.cargo/bin:/Users/damien/.deno/bin:/Users/damien/.fig/bin:/Users/damien/.local/bin:/Users/damien/go/bin:/Users/damien/.yarn/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/opt/[email protected]/libexec/bin:/Users/damien/.dotfiles/bin/usr:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/Applications/iTerm.app/Contents/Resources/utilities
    - FIG_PARENT: 
    - FIGTERM_SESSION_ID: 8ff2ae98-912b-449c-8f2f-2be2d25decb7
    - FIG_PID: 37371

SSH remote:

fig-details:
  - 2.15.0
hardware-info:
  - model:
  - model-id:
  - chip-id: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
  - cores: 4
  - mem: 15.53 GB
os-info:
  - kernel: 5.15.0-79-generic
  - distro: "Ubuntu"
  - distro-version: "22.04.3 LTS (Jammy Jellyfish)"
environment:
  - shell: /usr/bin/fish
  - terminal: <unknown>
  - cwd: /home/damien
  - exe-path: /usr/bin/fig
  - install-method: unknown
  - env-vars:
    - FIG_SET_PARENT:
    - FIG_PID: 3796059
    - FIGTERM_SESSION_ID: b37d54f1-4233-4036-a8f4-b3f85a3ee397
    - XDG_SESSION_TYPE: tty
    - TERM: xterm-256color
    - FIG_TERM: 2.15.0
    - FIG_PARENT:
    - SHELL: /usr/bin/fish
    - FIG_SET_PARENT_CHECK: 1
    - PATH: /home/damien/.local/bin:/home/damien/bin:/run/user/1000/fnm_multishells/3797252_1697350164425/bin:/home/damien/.fnm:/home/damien/go/bin:/usr/local/go/bin:/home/damien/.local/bin:/home/damien/bin:/run/user/1000/fnm_multishells/3796090_1697350144982/bin:/home/damien/.fnm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/damien/.local/bin:/home/damien/.fig/bin


SSH config of the remote


sudo grep 'AcceptEnv' /etc/ssh/sshd_config
AcceptEnv LANG LC_* FIG_*
sudo grep 'AllowStream' /etc/ssh/sshd_config
AllowStreamLocalForwarding yes

eramdam avatar Oct 15 '23 06:10 eramdam

I just noticed that it works fine on one of my hosts where I use bash instead of fish. The hosts where the completion doesn't work/warning appears are the ones where I use fish, so that's probably the culprit πŸ˜…

EDIT: more details, the completion works with Bash but the warning when SSHing doesn't necessarily go away even after setting bash as the default shell so something is going on.

eramdam avatar Oct 15 '23 06:10 eramdam

I see the same issue. Local:

  • Intel MacOS 14.0.0 from iTerm2 running zsh
  • fig --version => "fig_cli 2.17.0" Remote:
  • Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-1041-raspi aarch64) running bash
  • fig --version => "fig_cli 2.15.0"
    • That's what it is install every time I say yes.

I always see this when connecting. Verified ./ssh/sshd_config as described above after running fig doctor, restarting, logging out, connecting again.

? Up-to-date Fig integration not found on remote. Would you like to install/update? β€Ί
  Always
❯Yes
  No
  Never for this remote
  Never

Hmmm, maybe the Ubuntu source hasn't been updated with v2.15.0 yet?

When I say yes, I see:

curl -fSsL https://fig.io/install-headless.sh | bash; exec $SHELL
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
β•šβ•β•     β•šβ•β• β•šβ•β•β•β•β•β•.io
Performing compatibility checks
Executing https://repo.fig.io/scripts/apt/install.sh
Installing repo dependencies
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lsb-release is already the newest version (11.1.0ubuntu4).
ca-certificates is already the newest version (20230311ubuntu0.22.04.1).
gnupg is already the newest version (2.2.27-3ubuntu2.1).
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Installing Fig repository
Installing Fig key
Updating apt
Hit:1 https://repo.fig.io/apt stable InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Installing Fig
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
fig-headless is already the newest version (2.15.0).
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Installing integrations
Installing dotfiles integration
Already installed
Installing daemon integration
Installed!
Installing ssh integration
Already installed

✨ Fig has been installed ✨

jeffj-simspace avatar Oct 21 '23 00:10 jeffj-simspace

Different issue for me, complains every time i update/install that i'm already logged in, if i log out and log back in then it seems to be ok for that one session but subsequent sessions always complain

error: Already logged in as xxxx, please logout first.

dspaxton avatar Oct 21 '23 02:10 dspaxton

Why does Fig think I want to install itself on all remote servers? Is it a kind of virus now?

tedpelas avatar Oct 22 '23 15:10 tedpelas

Seems we all get pro features for free now and this is part of it. Would’ve appreciated an announcement or a mail or something but I’d prefer to disable this feature until I choose if I want it.Β On Oct 22, 2023, at 11:04β€―AM, Ted Pelas Johansson @.***> wrote:ο»Ώ Why does Fig think I want to install it on all remote servers? Is it a kind virus now?

β€”Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

dspaxton avatar Oct 22 '23 22:10 dspaxton

Same issue for me, running zsh, ohmyzsh/powerlevel10k on remote server if that matters.

JulienEllie avatar Oct 22 '23 23:10 JulienEllie

I get the same on all hosts I connect to via SSH, bash or not. Selecting "never" does not appear to work reliably. This currently breaks all my scripts that rely on executing some SSH commands, and it's seriously annoying. Any way this can be turned off globally? I see no setting for it.

slhck avatar Oct 24 '23 09:10 slhck

I get the same on all hosts I connect to via SSH, bash or not. Selecting "never" does not appear to work reliably. This currently breaks all my scripts that rely on executing some SSH commands, and it's seriously annoying. Any way this can be turned off globally? I see no setting for it.

Kill fig and comment the lines from your ~/.zshrc & ~/.zprofile, is a temporary workaround that worked for me.

tedpelas avatar Oct 24 '23 11:10 tedpelas

This solved my problem:

fig uninstall
brew install fig

And then running the Fig dmg file from the fig installation, in my case:

/Users/{my user}/Library/Caches/Homebrew/downloads/002edc32fde5c17649525d22df1e51853777ff573af22eef17caf323f81234f6--fig.dmg

tedpelas avatar Oct 25 '23 11:10 tedpelas

Hello everyone, Same thing here, seems like I HAVE to comply and install it.. I even had to uninstall fig completely to get rid of it.

aldoyh avatar Nov 12 '23 09:11 aldoyh

Hello everyone,

Same thing here, seems like I HAVE to comply and install it.. I even had to uninstall fig completely to get rid of it.

Indeed, unfortunately

tedpelas avatar Nov 12 '23 09:11 tedpelas

Yeah, but now I don't recognise my Terminal anymore, I've been dependant on fig for too long!

aldoyh avatar Nov 12 '23 11:11 aldoyh