withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.05k stars 63 forks source link

bug: fig update fails #2716

Open shawnyeager opened 1 year ago

shawnyeager commented 1 year ago

Checks

Operating system

macOS 13.5.1 (22G90)

Expected behaviour

I run fig update and fig updates. Or I click "Check for updates..." from fig UI and it updates.

Actual behaviour

See attached.

Screenshot 2023-09-04 at 1 51 37 PM Screenshot 2023-09-04 at 1 53 21 PM

Steps to reproduce

Run fig update or click "Check for updates..." on the fig UI menu.

Environment

❯ fig diagnostic                                                                               ✘ 1

fig-details:
  - 2.16.0
hardware-info:
  - model:
  - model-id:
  - chip-id: Apple M2
  - cores: 8
  - mem: 16.00 GB
os-info:
  - macOS 13.5.1 (22G90)
environment:
  - shell: /opt/homebrew/Cellar/zsh/5.9/bin/zsh
  - terminal: iterm
  - cwd: /Users/shawn
  - exe-path: /opt/homebrew/bin/fig
  - install-method: brew
  - env-vars:
    - FIGTERM_SESSION_ID: 6e475fd8-707a-400b-9b44-a146378ccd4b
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.16.0
    - PATH: /Users/shawn/.nvm/versions/node/v20.5.1/bin:/Users/shawn/.rbenv/shims:/Users/shawn/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/shawn/.fig/bin:/Users/shawn/.local/bin:/Users/shawn/bin:/Users/shawn/.fig/bin:/Users/shawn/go/bin:/Users/shawn/.nvm/versions/node/v20.5.1/bin:/Users/shawn/.npm-packages/bin:/Users/shawn/.cargo/bin:/Users/shawn/.rbenv/shims:/Users/shawn/.local/bin:/opt/homebrew/opt/go/libexec/bin:/opt/homebrew/opt/openssl/bin:/opt/homebrew/opt/python/libexec/bin:/opt/homebrew/opt/ssh-copy-id/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Applications/iTerm.app/Contents/Resources/utilities:/usr/local/MacGPG2/bin
    - SHELL: /opt/homebrew/bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: com.googlecode.iterm2
    - FIG_PID: 7410
    - FIG_SET_PARENT: 6e475fd8-707a-400b-9b44-a146378ccd4b
mschrage commented 1 year ago

Hmm I haven't seen this before - can you run fig diagnostic and share the output here?

Also how much free space do you have on your machine?

shawnyeager commented 1 year ago

@mschrage: the diagnostic is included above. I have > 240 GB of free space, so definitely not that.

mschrage commented 1 year ago

Can you try running: FIG_LOG_STDOUT=1 FIG_LOG_LEVEL=info fig update

shawnyeager commented 1 year ago

Sure. Here you go:

❯ FIG_LOG_STDOUT=1 FIG_LOG_LEVEL=info fig update                                               ✘ 1
2023-09-14T02:37:50.445159Z  INFO fig_install: 178: Checking for updates...
error: io operation error. If this is unexpected, try running `fig doctor` and then try again.

~
❯ fig doctor                                                                                   ✘ 1

✘ Daemon diagnostics: Daemon websocket error

  Reqwest error: error sending request for url (https://api.fig.io/authenticate/ticket?os=macos&arch=aarch64&cliVersion=2.16.0&manifestVersion=2.16.0&deviceId=d1790aee832c6ecbf6be8de098f22af40004fc1246482205dbd78947a108ee34%3Ashawn%40shawnyeager.com): connection error: Connection reset by peer (os error 54)
Attempting to fix automatically...
Re-running check...

✔ Daemon diagnostics

✔ Everything looks good!

  Fig still not working? Run fig issue to let us know!
  Or, email us at hello@fig.io!

~ 7s
❯ FIG_LOG_STDOUT=1 FIG_LOG_LEVEL=info fig update
2023-09-14T02:38:10.368026Z  INFO fig_install: 178: Checking for updates...
error: io operation error. If this is unexpected, try running `fig doctor` and then try again.
MashiroYae commented 11 months ago

2023-10-22T04:09:54.258985Z INFO fig_install: 178: Checking for updates... 2023-10-22T04:09:54.259003Z WARN fig_util::manifest: 128: Failed reading build manifest: No such file or directory (os error 2) error: manifest not found. If this is unexpected, try running fig doctor and then try again.

shawnyeager commented 11 months ago

New insights based on fig doctor updates. Does this point to a possible solution?

✘ Daemon diagnostics: Daemon websocket error

  Websock next error: Protocol(ResetWithoutClosingHandshake)

Full output:

❯ fig update
error: failed to get system id. If this is unexpected, try running `fig doctor` and then try again.

~
❯ fig doctor
Let's check if you're logged in...
✔ Logged into Fig

Let's check your dotfiles...
✔ bash ~/.bashrc integration check
✔ bash ~/.profile integration check
✔ zsh ~/.zshrc integration check
✔ zsh ~/.zprofile integration check

Let's make sure Fig is setup correctly...
✔ Fig bin exists
✔ PATH contains ~/.local/bin
✔ PATH contains ~/.fig/bin
✔ Settings Corruption
✔ State Corruption
✔ Fig Integration
✔ SSH integration

Let's make sure Fig is running...
✔ Fig is running
✔ Fig socket exists
✔ Daemon
✘ Daemon diagnostics: Daemon websocket error

  Websock next error: Protocol(ResetWithoutClosingHandshake)

Let's see if Fig is in a working state...
✔ Figterm
✔ Insertion lock does not exist
✔ Autocomplete dev mode
✔ Plugin dev mode
✔ Dashboard is loading from the correct URL
✔ Autocomplete is loading from the correct URL

Let's check if your system is compatible...
✔ OS is supported
✔ Fish is up to date
✔ Jetbrains Toolbox Check

Let's check fig diagnostic...
✔ Compatible shell
✔ Fig app installed in the right place
✔ Autocomplete is enabled
✔ Fig CLI path
✔ Accessibility enabled

Let's check your terminal integrations...
✔ Terminal support

  Fig still not working? Run fig issue to let us know!
  Or, email us at hello@fig.io!