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

Copilot chat logged out while autocomplete is logged in #21255

Open
1 task done
toonvd opened this issue Nov 27, 2024 · 5 comments · May be fixed by #21360
Open
1 task done

Copilot chat logged out while autocomplete is logged in #21255

toonvd opened this issue Nov 27, 2024 · 5 comments · May be fixed by #21360
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue

Comments

@toonvd
Copy link

toonvd commented Nov 27, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I am signed in but still see the login prompt. Autocompletion is working.
Got copilot through our company profile, has Github enterprise.

If there is any useful debug info I can provide you, I would be happy to help.

Screenshot 2024-11-27 at 23 33 02

Environment

Zed: v0.163.2 (Zed)
OS: macOS 15.1.0
Memory: 24 GiB
Architecture: aarch64

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

No response

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

I could not find any relevant log entries.

@toonvd toonvd added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Nov 27, 2024
@toonvd
Copy link
Author

toonvd commented Nov 27, 2024

While tailing, I did find this during opening of the assistant:

2024-11-27T23:41:47.425884+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)

@WeetHet
Copy link
Contributor

WeetHet commented Nov 28, 2024

I also had this issue. It's very difficult to reproduce, even removing zed's application support directory doesn't seem to trigger it after I've fixed it. What I've done is reset zed by removing ~/Application Support/Zed and start copilot through the 0.151.1 release, which seems to have resolved this for me, making me think that the issue is with the new versions of zed somehow, but now I can't reproduce it which is even more weird, as copilot version seems to not have changed from when I've had this issue

@CLoaKY233
Copy link

CLoaKY233 commented Nov 28, 2024

Currently facing this issue,
-> Fedora workstation Linux 41 release
Current zed stable and preview both.

Reproducible, although downgrading back to earlier stables does solve the issue, but I'll post further with details

Summary: AI assistant chat configure settings show github copilot yet to be signed in, when it already is, and does not show up in the options for selecting model.

Tried basic fixes -> reinstall, logout reconfigure, downgrade from preview to stable.

Version 0.162 pre release windows build however does not seem to have this issue

@piedrahitac
Copy link

This is happening to me too with Copilot license provided by my employer.

Line completion works fine (and shows the status icon as logged in) but the assistant panel remains logged out with a warning that reads LLM provider is not configured.

Clicking on the sign in button from the assistant panel goes through all the usual flow and shows me the following:

image

However, it remains logged out.

Environment
Zed: v0.163.2 (Zed)
OS: macOS 15.1.1

@fred-sch
Copy link

It appears that the format and location of the Github Copilot file, from which the OAuth token is extracted, have changed. This might be related to the changes introduced in #20520.

The reason Copilot chat is not functioning properly seems to be that the OAuth token is no longer stored in .config/github-copilot/hosts.json, but rather in .config/github-copilot/apps.json. Additionally, the format of this JSON file has changed slightly. The new file format is:

{"github.com:randomAppId":{"user":"username","oauth_token":"token","githubAppId":"randomAppId"}}

whereas Zed is expecting a format like

{"github.com":{"user":"username","oauth_token":"token","githubAppId":"randomAppId"}}

Thus, the easy workaround is to

cp ~/.config/github-copilot/apps.json ~/.config/github-copilot/hosts.json

and then to edit the hosts.json file and remove :randomAppId after github.com.

I think this should work for Linux and macOS, on Windows the path would look like something like C:\Users\Username\AppData\Local\github-copilot\apps.json

@fred-sch fred-sch linked a pull request Nov 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants