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-In to Zed: HTTP error: 400 Bad Request (KDE) #25649

Open
fornellas-maze opened this issue Feb 26, 2025 · 6 comments
Open

Can't Sign-In to Zed: HTTP error: 400 Bad Request (KDE) #25649

fornellas-maze opened this issue Feb 26, 2025 · 6 comments
Labels

Comments

@fornellas-maze
Copy link

Summary

I'm unable to sign-in, meaning I'm unable to use GH Copilot.

Steps to trigger the problem:

  1. Open zed
  2. Click "Sign in"

Actual Behavior:

I get this error:

Image

Expected Behavior:

for it to... sign in.

The issue seems to be here:

2025-02-26T14:25:12.583853248Z [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2025-02-26T14:25:12.930474442Z [INFO] set status on client 304613: ConnectionError
2025-02-26T14:25:12.930750137Z [ERROR] HTTP error: 400 Bad Request

Caused by:
    HTTP error: 400 Bad Request

Full log: Zed.log

Zed Version and System Specs

Zed: v0.174.8 (Zed)
OS: Linux Wayland neon 24.04
Memory: 30.7 GiB
Architecture: x86_64
GPU: AMD Radeon 780M (RADV GFX1103_R1) || radv || Mesa 24.2.8-1ubuntu1~24.04.1

@notpeter
Copy link
Member

Is this happening when you are attempting to:

  1. login into Zed (upper right hand corner)
  2. GitHub Copilot (copilot icon -> sign in)
  3. GitHub Copilot (Assistant->Configuration->Copilot Chat->Sign In)

Logging into Zed is with your GitHub login is distinct from authorizing Zed as a device for Copilot. They are entirely distinct authorization flows (e.g they can be logged into distinct accounts and have independent login/logout state)

@sakloui
Copy link
Contributor

sakloui commented Feb 26, 2025

I can confirm this is happening to me as well on v0.174.6 and v0.175.5. This is at least for me specifically for logging into Zed. I have not tried logging into Github Copilot.

This is on fedora 41, KDE Plasma 6.3.1

Building v0.173.11 right now, will update below.
Update: Seems v0.173.11 also is not working. Going further back just in case.
Update 2: v0.168.3 also has the issue

screenshots

Image

Image

Image

@notpeter notpeter changed the title Can't login Can't Sign-In to Zed: HTTP error: 400 Bad Request Feb 26, 2025
@sakloui
Copy link
Contributor

sakloui commented Feb 26, 2025

Alright did some more testing, this seems to be an issue in oo7/Kwallet. I haven't been able to figure out which of the two.

Check KWalletManager and check if there's a key under Secret Service > Binary Data > zed-github-account

Like so

Image

If it isn't there you can try the following:

  • Close Zed
  • Go to settings > KDE Wallet and untick "Use KWallet for the Secret Service interface"
  • Kill kwalletd6
  • Start Zed, the Sign in button should no longer have the disconnected icon to the left of it
  • Click Sign in and go through the log in process
  • Close Zed
  • Re-enable "Use KWallet for the Secret Service interface"
  • Kill kwalletd6 again
  • Start KWalletManager and open the wallet
  • If you start Zed, it should shown the same Sign in button as before
  • Do the log in process again
  • It should hopefully have now added the key to the keychain, restarting Zed should automatically log in.

This worked for me at least, YMMV.

@notpeter notpeter changed the title Can't Sign-In to Zed: HTTP error: 400 Bad Request Can't Sign-In to Zed: HTTP error: 400 Bad Request (KDE) Feb 26, 2025
@fornellas-maze
Copy link
Author

@notpeter

Is this happening when you are attempting to:

This: login into Zed (upper right hand corner)

Image

@sakloui

Check KWalletManager and check if there's a key under Secret Service > Binary Data > zed-github-account

No key there:

Image

It should hopefully have now added the key to the keychain, restarting Zed should automatically log in.

Everything worked until the previous step, but no key added at this point, and Zed asks to login every time it is open.

If I leave "Use KWallet for the Secret Service interface" unset, zed login survives a restart, so... "fixed".

@sakloui
Copy link
Contributor

sakloui commented Feb 27, 2025

If you disable KWallet's SS interface it won't write a permanent key for login, so it's a solution. Though any other application won't be able to use KWallet either, so it's not a perfect solution.

After re-enabling the "Use KWallet for the Secret Service interface" setting, could you also enable "Prompt when an application accesses a wallet" under the Access Control tab. Then kill KWallet6d again and follow the steps after re-enabling the setting? It should prompt you for access when opening the keyring with KWalletManager and Zed.

@sakloui
Copy link
Contributor

sakloui commented Feb 27, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants