Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use copilot chat #21750

Closed
1 task done
nervenes opened this issue Dec 9, 2024 · 13 comments
Closed
1 task done

Unable to use copilot chat #21750

nervenes opened this issue Dec 9, 2024 · 13 comments
Labels
bug [core label] copilot AI feedback for Copilot inline completion Umbrella label for Copilot, Supermaven, etc. completions

Comments

@nervenes
Copy link
Contributor

nervenes commented Dec 9, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I'm unable to use copilot chat for some non-obvious reason, I recently did a fresh reinstall of zed and first ran into this weird issue #21710 and later this. I've connected my github to the copilot provider, I've set it up to use the copilot claude model, but zed blocks me from sending prompts.

Things i've tried:

  • Restarting zed: didn't fix it.
  • Restarting my macbook: didn't fix it.
  • Reinstalling zed: didn't fix it.
  • Logging into zed with github: didn't fix it.
  • Logging out of github: didn't fix it.
  • Reconnect copilot: didn't fix it.

Environment

Zed: v0.164.2 (Zed)
OS: macOS 15.1.1
Memory: 8 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Skarminspelning.2024-12-09.kl.17.39.37.mov
Skärmavbild 2024-12-09 kl  17 41 48 Skärmavbild 2024-12-09 kl  17 42 33

If applicable, attach your Zed.log file to this issue.

Zed.log
2024-12-09T17:32:21.889526+01:00 [INFO] ========== starting zed ==========
2024-12-09T17:32:21.94287+01:00 [INFO] Opening main db
2024-12-09T17:32:21.944925+01:00 [INFO] Opening main db
2024-12-09T17:32:21.954929+01:00 [INFO] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git")
2024-12-09T17:32:22.123151+01:00 [INFO] set environment variables from shell:/bin/zsh, path:/opt/homebrew/bin:/opt/homebrew/sbin:/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/share/dotnet:~/.dotnet/tools:/Users/evren/.cargo/bin
2024-12-09T17:32:22.139971+01:00 [INFO] No prompt template overrides directory found at /Users/evren/.config/zed/prompt_overrides. Using built-in prompts.
2024-12-09T17:32:22.141233+01:00 [INFO] extensions updated. loading 5, reloading 0, unloading 0
2024-12-09T17:32:22.182885+01:00 [INFO] Opening main db
2024-12-09T17:32:22.189239+01:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2024-12-09T17:32:22.269802+01:00 [INFO] Opening main db
2024-12-09T17:32:22.277054+01:00 [INFO] Opening main db
2024-12-09T17:32:22.337236+01:00 [INFO] attempting to start language server "rust-analyzer", path: "/Users/evren/Developer/zed", id: 1
2024-12-09T17:32:22.452369+01:00 [INFO] using project environment variables shell launched in "/Users/evren/Developer/zed". PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/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/share/dotnet:~/.dotnet/tools:/Users/evren/.cargo/bin"
2024-12-09T17:32:22.452559+01:00 [INFO] found rust-analyzer in PATH. trying to run `rust-analyzer --help`
2024-12-09T17:32:22.482958+01:00 [INFO] Node runtime install_if_needed
2024-12-09T17:32:22.716324+01:00 [INFO] starting language server process. binary path: "/Users/evren/Library/Application Support/Zed/node/node-v22.5.1-darwin-arm64/bin/node", working directory: "/", args: ["/Users/evren/Library/Application Support/Zed/copilot/copilot-v0.7.0/dist/language-server.js", "--stdio"]
2024-12-09T17:32:22.966119+01:00 [ERROR] failed to run rust-analyzer after detecting it in PATH: binary: "/Users/evren/.cargo/bin/rust-analyzer": exit status: 1, stdout: "", stderr: "error: Unknown binary 'rust-analyzer' in official toolchain '1.81-aarch64-apple-darwin'.\n"
2024-12-09T17:32:22.966252+01:00 [INFO] fetching latest version of language server "rust-analyzer"
2024-12-09T17:32:23.154651+01:00 [INFO] Language server with id 0 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "[lsp] GitHub Copilot Language Server 1.236.0 initialized"
}
2024-12-09T17:32:23.154737+01:00 [INFO] Language server with id 0 sent unhandled notification workspace/configuration:
{
  "items": [
    {
      "section": "github.copilot"
    },
    {
      "section": "github-enterprise"
    },
    {
      "section": "http"
    },
    {
      "section": "telemetry"
    }
  ]
}
2024-12-09T17:32:23.285102+01:00 [INFO] Language server with id 0 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "[certificates] Removed 5 expired certificates"
}
2024-12-09T17:32:23.738255+01:00 [INFO] Language server with id 0 sent unhandled notification featureFlagsNotification:
{
  "rt": false,
  "sn": true,
  "chat": true,
  "ic": true,
  "ep": false,
  "pc": false,
  "x": true
}
2024-12-09T17:32:23.738347+01:00 [INFO] Language server with id 0 sent unhandled notification conversation/preconditionsNotification:
{
  "results": [
    {
      "type": "chat_enabled",
      "status": "ok"
    }
  ],
  "status": "ok"
}
2024-12-09T17:32:23.790638+01:00 [INFO] downloading language server "rust-analyzer"
2024-12-09T17:32:23.798852+01:00 [INFO] starting language server process. binary path: "/Users/evren/Library/Application Support/Zed/languages/rust-analyzer/rust-analyzer-2024-12-09", working directory: "/Users/evren/Developer/zed", args: []
2024-12-09T17:32:36.886549+01:00 [INFO] open paths ["/Users/evren/.config/zed/settings.json"]
2024-12-09T17:32:36.904736+01:00 [INFO] attempting to start language server "json-language-server", path: "/Users/evren/.config/zed/settings.json", id: 2
2024-12-09T17:32:36.904825+01:00 [INFO] Initializing default prettier with plugins {}
2024-12-09T17:32:36.905097+01:00 [INFO] Initializing default prettier with plugins {}
2024-12-09T17:32:36.906131+01:00 [INFO] fetching latest version of language server "json-language-server"
2024-12-09T17:32:36.90687+01:00 [INFO] Node runtime install_if_needed
2024-12-09T17:32:37.903293+01:00 [INFO] downloading language server "json-language-server"
2024-12-09T17:32:37.904023+01:00 [INFO] Node runtime install_if_needed
2024-12-09T17:32:38.053506+01:00 [INFO] Node runtime install_if_needed
2024-12-09T17:32:38.234388+01:00 [INFO] starting language server process. binary path: "/Users/evren/Library/Application Support/Zed/node/node-v22.5.1-darwin-arm64/bin/node", working directory: "/Users/evren/.config/zed", args: ["/Users/evren/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2024-12-09T17:32:57.015577+01:00 [ERROR] oneshot canceled
2024-12-09T17:32:57.016755+01:00 [WARN] skipping diagnostics update, no worktree found for path "/Users/evren/.config/zed/settings.json"
2024-12-09T17:33:00.119413+01:00 [INFO] open paths ["/Users/evren/.config/zed/settings.json"]
2024-12-09T17:33:00.126726+01:00 [INFO] attempting to start language server "json-language-server", path: "/Users/evren/.config/zed/settings.json", id: 3
2024-12-09T17:33:00.126812+01:00 [INFO] Initializing default prettier with plugins {}
2024-12-09T17:33:00.126899+01:00 [INFO] starting language server process. binary path: "/Users/evren/Library/Application Support/Zed/node/node-v22.5.1-darwin-arm64/bin/node", working directory: "/Users/evren/.config/zed", args: ["/Users/evren/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2024-12-09T17:34:14.920671+01:00 [ERROR] error sending request for url (http://localhost:11434/api/tags)

Caused by:
    0: client error (Connect)
    1: tcp connect error: Connection refused (os error 61)
    2: Connection refused (os error 61)
2024-12-09T17:34:28.854209+01:00 [INFO] Initializing default prettier with plugins {}
2024-12-09T17:34:29.40672+01:00 [INFO] Initializing default prettier with plugins {}
2024-12-09T17:34:31.62086+01:00 [INFO] Initializing default prettier with plugins {}
2024-12-09T17:34:31.635127+01:00 [INFO] Initializing default prettier with plugins {}
2024-12-09T17:34:36.384683+01:00 [ERROR] error sending request for url (http://localhost:11434/api/tags)

Caused by:
    0: client error (Connect)
    1: tcp connect error: Connection refused (os error 61)
    2: Connection refused (os error 61)
2024-12-09T17:35:45.953057+01:00 [ERROR] error sending request for url (http://localhost:11434/api/tags)

Caused by:
    0: client error (Connect)
    1: tcp connect error: Connection refused (os error 61)
    2: Connection refused (os error 61)
2024-12-09T17:39:10.081492+01:00 [ERROR] oneshot canceled
2024-12-09T17:39:54.900856+01:00 [ERROR] error sending request for url (http://localhost:11434/api/tags)

Caused by:
    0: client error (Connect)
    1: tcp connect error: Connection refused (os error 61)
    2: Connection refused (os error 61)
2024-12-09T17:41:37.937383+01:00 [INFO] open paths ["/Users/evren/.config/zed/settings.json"]
2024-12-09T17:41:37.967962+01:00 [INFO] attempting to start language server "json-language-server", path: "/Users/evren/.config/zed/settings.json", id: 4
2024-12-09T17:41:37.968282+01:00 [INFO] Initializing default prettier with plugins {}
2024-12-09T17:41:37.969464+01:00 [INFO] starting language server process. binary path: "/Users/evren/Library/Application Support/Zed/node/node-v22.5.1-darwin-arm64/bin/node", working directory: "/Users/evren/.config/zed", args: ["/Users/evren/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
@nervenes nervenes added admin read bug [core label] labels Dec 9, 2024
@hagemajr
Copy link

Experiencing similar behavior, but I do not even see the Copilot models available to select. This is the first time I have tried to set it up so it's possible this is the same issue, but I had no models configured so they don't even populate in the list now. When I click Configure, I'm prompted to sign in to Copilot, I do so, it says it's enabled, but situation repeats.

@nervenes
Copy link
Contributor Author

Now that you mention it, there were moments where the list of model providers were empty besides the model that i had previously selected (in this case copilot claude sonnet), but i didnt come to think much of it as it resolved later when i restarted zed iirc.

@transcental
Copy link

transcental commented Dec 10, 2024

Also running into this issue on aarch64 macOS. Despite being signed in and code completions working, it says I'm not signed in here. Signing in again shows a success message and reverts to this. I also don't have any models available to select. This wasn't fixed by restarting or reinstalling Zed
image
image

@bennetbo
Copy link
Contributor

bennetbo commented Dec 10, 2024

Sounds like #21255 which is fixed in 0.165.x (so this fix will land on stable tomorrow), so i assume all of you are running into this on 0.164.x?. In the meantime you should be able to use this #21255 (comment) workaround.

@bennetbo bennetbo added copilot AI feedback for Copilot awaiting info Issue that needs more information from the user and removed triage labels Dec 10, 2024
@transcental
Copy link

Yep looks like that was my issue - the workaround fixed it, thank you!

@bennetbo
Copy link
Contributor

Nice, going to close this, but feel free to reopen if you run into this after updating (tomorrow) / applying the workaround.

@bennetbo bennetbo removed the awaiting info Issue that needs more information from the user label Dec 10, 2024
@nervenes
Copy link
Contributor Author

@bennetbo issue remains in the latest pre release 0.166.0

Skarminspelning.2024-12-11.kl.19.29.08.mov

@bennetbo
Copy link
Contributor

@nervenes Interesting, can you check what files you have under ~/.config/github-copilot? There should either be an apps.json or a versions.json file

@nervenes
Copy link
Contributor Author

Skärmavbild 2024-12-11 kl  21 52 46

@bennetbo
Copy link
Contributor

bennetbo commented Dec 12, 2024

Huh, that's odd. What does your apps.json look like? Mine look something like this:

{
   "github.com:Iv1.b507a08c87ecfe98":{
      "user":"bennetbo",
      "oauth_token":"sometoken",
      "githubAppId":"Iv1.b507a08c87ecfe98"
   }
}

What happens if you delete both files inside ~/.config/github-copilot and then try logging out/in in Zed?

@nervenes
Copy link
Contributor Author

oh hm interesting, deleting those files and logging back in seems to have solved it! i now see an authorized message as well:
Skärmavbild 2024-12-12 kl  14 17 32

@bennetbo
Copy link
Contributor

Nice, then i'll keep this closed for now unless we see other people running into the same issue.

@JosephTLyons JosephTLyons added the inline completion Umbrella label for Copilot, Supermaven, etc. completions label Jan 9, 2025
@AstralBaby
Copy link

this is a shame! you have to do the configuration twice in order to get this working. in vscode you just click sign in with browser and thats it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] copilot AI feedback for Copilot inline completion Umbrella label for Copilot, Supermaven, etc. completions
Projects
None yet
Development

No branches or pull requests

6 participants