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

Can't sign out #156

Closed
tomerarnon opened this issue May 28, 2024 · 6 comments · Fixed by #157
Closed

Can't sign out #156

tomerarnon opened this issue May 28, 2024 · 6 comments · Fixed by #157
Labels
bug Something isn't working upstream Upstream issue

Comments

@tomerarnon
Copy link

tomerarnon commented May 28, 2024

My LSP-copilot is accidentally signed into a github account which does not have copilot access. Hence, it doesn't work. When I try to sign out to use the correct credentials, Copilot: Sign Out has no effect...

@jfcherng
Copy link
Collaborator

jfcherng commented May 29, 2024

Interesting... I can reproduce this with a account which doesn't subscribe to copilot.

:: [10:52:02.047] --> LSP-copilot signOut (7): {}
:: [10:52:02.535] <-  LSP-copilot window/logMessage: {'type': 3, 'message': '[auth] Invalid copilot token: missing token: 403 '}
:: [10:52:02.535] <<< LSP-copilot (7) (duration: 488ms): {'status': 'NotAuthorized', 'user': 'XXXXXX'}

I've started a discussion in https://github.com/orgs/community/discussions/126315

@jfcherng
Copy link
Collaborator

jfcherng commented May 29, 2024

As a workaround, you can delete its session by deleting the whole github-copilot folder.

On Windows, it's %localappdata%\github-copilot.
On other platforms, it's ~/.config/github-copilot.

@jfcherng
Copy link
Collaborator

jfcherng commented May 29, 2024

As a workaround, you can delete its session by deleting the whole github-copilot folder.

If eventually the GitHub officials don't really care Sublime Text, we probably have to delete that directory directly rather than calling Copilot.vim's signOut command. Or someone has to reverse engineer https://github.com/github/copilot.vim/blob/release/dist/agent.js again.


I am not sure whether Copilot.vim suffers from the same issue though... But it looks like it just calls the signOut command directly too. https://github.com/github/copilot.vim/blob/c79d711cbf7c6672c6c57d6df7c5ab7b6cac2b7a/autoload/copilot.vim#L630-L638

@jfcherng jfcherng added bug Something isn't working upstream Upstream issue labels May 29, 2024
@jfcherng
Copy link
Collaborator

jfcherng commented May 29, 2024

It looks like I can't sign out a subscribed account either now.

:: [14:44:16.071] --> LSP-copilot signOut (32): {}
:: [14:44:16.085] <<< LSP-copilot (32) (duration: 14ms): {'status': 'OK', 'user': 'jfcherng'}

@jfcherng
Copy link
Collaborator

jfcherng commented May 29, 2024

A fixed (workaround) new release has been tagged and will be available on Package Control within hours.

@jfcherng
Copy link
Collaborator

jfcherng commented Jun 6, 2024

This is claimed to be fixed in https://github.com/orgs/community/discussions/126315#discussioncomment-9691739 anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Upstream issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants