zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.59k stars 2.9k forks source link

Sign In doesn't work after update #4434

Open kaisersakhi opened 1 year ago

kaisersakhi commented 1 year ago

Check for existing issues

Describe the bug / provide steps to reproduce it

I updated Zed to the latest stable version, as I open it, clicking on Sign In doesn't do anything. It fails to connect to the server, as it appear from the logs. Note: I have working internet connection.

Environment

Zed: v0.105.5 (stable) OS: macOS 13.6.0 Memory: 16 GiB Architecture: aarch64

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

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

2023-10-04T06:19:24 [INFO] set status on client 0: ConnectionError 2023-10-04T06:19:24 [ERROR] crates/zed/src/main.rs:278: timed out trying to establish connection 2023-10-04T06:19:25 [INFO] set status on client 0: Reauthenticating 2023-10-04T06:19:25 [INFO] set status on client 0: Reconnecting 2023-10-04T06:19:30 [INFO] set status on client 0: ConnectionError 2023-10-04T06:19:30 [ERROR] crates/collab_ui/src/collab_titlebar_item.rs:803: timed out trying to establish connection 2023-10-04T06:20:04 [INFO] set status on client 0: Reauthenticating 2023-10-04T06:20:04 [INFO] set status on client 0: Reconnecting 2023-10-04T06:20:09 [INFO] set status on client 0: ConnectionError 2023-10-04T06:20:09 [ERROR] crates/collab_ui/src/collab_titlebar_item.rs:803: timed out trying to establish connection 2023-10-04T06:22:46 [INFO] set status on client 0: Reauthenticating 2023-10-04T06:22:46 [INFO] set status on client 0: Reconnecting 2023-10-04T06:22:51 [INFO] set status on client 0: ConnectionError 2023-10-04T06:22:51 [ERROR] crates/collab_ui/src/collab_titlebar_item.rs:803: timed out trying to establish connection 2023-10-04T06:24:37 [INFO] set status on client 0: Reauthenticating 2023-10-04T06:24:37 [INFO] set status on client 0: Reconnecting 2023-10-04T06:24:42 [INFO] set status on client 0: ConnectionError 2023-10-04T06:24:42 [WARN] request completed with error: request or operation took longer

JosephTLyons commented 1 year ago

Hey @kaisersakhi, if you quit the app and restart, nothing changes? Its reproducible each time you start the application?

kaisersakhi commented 1 year ago

@JosephTLyons It is likely an issue with my ISP, as sign in did work after I connected to a VPN. I think there should be some form of feedback when sign in doesn't work, or even when it does work.

Manfred commented 8 months ago

I have the same issue, from the logs:

2024-01-25T08:18:35 [INFO] set status on client 0: Authenticating
2024-01-25T08:18:44 [INFO] set status on client 89244: Connecting
2024-01-25T08:18:49 [INFO] set status on client 89244: ConnectionError
2024-01-25T08:18:49 [ERROR] TODO timed out trying to establish connection

When I connect to a VPN to the US, it won't resolve zed.dev at all.

When I connect to a VPN anywhere in Europe it authenticates and starts a session correctly, then I disconnect from the VPN, it immediately drops the connection and gives the following errors:

2024-01-25T08:24:27 [ERROR] connection error: delay between messages too long
2024-01-25T08:24:27 [INFO] set status on client 89244: ConnectionLost
2024-01-25T08:24:27 [INFO] set status on client 89244: Reauthenticating
2024-01-25T08:24:27 [INFO] set status on client 89244: Reconnecting
2024-01-25T08:24:32 [WARN] request completed with error: request or operation took longer than the configured timeout time
2024-01-25T08:24:32 [INFO] set status on client 89244: ConnectionError
2024-01-25T08:24:32 [ERROR] failed to connect request or operation took longer than the configured timeout time
2024-01-25T08:24:32 [INFO] set status on client 89244: ReconnectionError { next_reconnection: Instant { tv_sec: 1333386, tv_nsec: 13117916 } }

And then it just keeps retrying.

TwistingTwists commented 8 months ago

I have a weird related issue

image

The images indicates I am signed in . And I am not signed In.

P.S. I wish Rust Enums would help me choose a state!

After restart, this works fine

jinschoi commented 4 months ago

I'm getting the same error. I think your rpc server is down or unstable.

Here is the last successful connection, today at 6:04 AM:

2024-05-28T06:04:30-04:00 [ERROR] connection error: error reading rpc message from socket

Caused by:
    0: WebSocket protocol error: Connection reset without closing handshake
    1: Connection reset without closing handshake
2024-05-28T06:04:30-04:00 [INFO] set status on client 88729: ConnectionLost
2024-05-28T06:04:30-04:00 [INFO] set status on client 88729: Reauthenticating
2024-05-28T06:04:30-04:00 [INFO] set status on client 88729: Reconnecting
2024-05-28T06:04:31-04:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-05-28T06:04:31-04:00 [INFO] add connection to peer
2024-05-28T06:04:31-04:00 [INFO] add_connection;
2024-05-28T06:04:31-04:00 [INFO] waiting for server hello
2024-05-28T06:04:31-04:00 [INFO] got server hello

Then around noon, a 503:

2024-05-28T12:03:20-04:00 [ERROR] connection error: error reading rpc message from socket

Caused by:
    0: WebSocket protocol error: Connection reset without closing handshake
    1: Connection reset without closing handshake
2024-05-28T12:03:20-04:00 [INFO] set status on client 88729: ConnectionLost
2024-05-28T12:03:20-04:00 [INFO] set status on client 88729: Reauthenticating
2024-05-28T12:03:20-04:00 [INFO] set status on client 88729: Reconnecting
2024-05-28T12:03:21-04:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-05-28T12:03:21-04:00 [INFO] set status on client 88729: ConnectionError
2024-05-28T12:03:21-04:00 [ERROR] failed to connect HTTP error: 503 Service Unavailable

immediately followed by a flurry of similar ConnectionError with 525, 503, 503, 503 error codes, until:

2024-05-28T12:04:01-04:00 [INFO] set status on client 88729: Reauthenticating
2024-05-28T12:04:01-04:00 [INFO] set status on client 88729: Reconnecting
2024-05-28T12:04:01-04:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-05-28T12:04:06-04:00 [INFO] add connection to peer
2024-05-28T12:04:06-04:00 [INFO] add_connection;
2024-05-28T12:04:06-04:00 [INFO] waiting for server hello
2024-05-28T12:04:06-04:00 [INFO] set status on client 88729: ConnectionError
2024-05-28T12:04:06-04:00 [ERROR] failed to connect timed out waiting on hello message from server

which is the error I continue to get every time I try to log in now.

weirdo-adam commented 4 months ago

有解决吗?

chensy98 commented 3 months ago

I have the similar problem. When I use zed in Mac I get timeout error. Very strange that when I use in my Linux desktop under the same network everything goes well.

Here is the log in ~/Library/Logs/Zed

Caused by:
    [28] Timeout was reached
2024-06-20T08:27:42+08:00 [WARN] request completed with error: request or operation took longer than the configured timeout time
2024-06-20T08:27:42+08:00 [ERROR] auto-update failed: error:request or operation took longer than the configured timeout time

Caused by:
    [28] Timeout was reached
2024-06-20T08:36:42+08:00 [WARN] request completed with error: request or operation took longer than the configured timeout time
2024-06-20T08:36:42+08:00 [ERROR] crates/client/src/telemetry.rs:647: request or operation took longer than the configured timeout time

There is little useful information in the log file. I have tried to use a proxy, but it doesn't work.

codeams commented 3 months ago

I have the same issue. It only seems to happen in my home router though. It seems to connect when I'm at coffee shops.

razvbir commented 3 months ago

I have the same issue. It only seems to happen in my home router though. It seems to connect when I'm at coffee shops.

On this note, I had to turn off my VPN and restart zed and then I could sign in

FatLittleFan commented 3 months ago

When I use zed in mac, it failed to sign in. But in Ubuntu, It is successful

gangula-karthik commented 2 months ago

yup faced the same issue on mac, was able to sign in on restart

darltrash commented 2 months ago

Same issue :/ Doesn't work even with a restart

Darshan-Padia commented 2 months ago

The issue is resolved when I disconnect the VPN. I am using ZED for linux.

asthetik commented 2 months ago

I had the same issue on my MacOS.

Environment Zed: v0.147.2 (stable) OS: macOS Sonoma (14.5.0) Memory: 64 GiB Architecture: aarch64

2024-08-09T11:37:02.688149Z [INFO] set status on client 0: Authenticating
2024-08-09T11:37:06.3615Z [INFO] set status on client 124135: Connecting
2024-08-09T11:37:07.112043Z [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-08-09T11:37:26.360012Z [INFO] set status on client 124135: ConnectionError
2024-08-09T11:37:26.360837Z [ERROR] timed out trying to establish connection
2024-08-09T11:38:40.333832Z [INFO] set status on client 124135: Reauthenticating
2024-08-09T11:38:43.365428Z [INFO] set status on client 124135: Reconnecting
2024-08-09T11:38:43.840408Z [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-08-09T11:39:03.66004Z [INFO] set status on client 124135: ConnectionError
2024-08-09T11:39:03.660385Z [ERROR] timed out trying to establish connection
2024-08-09T11:46:03.351207Z [INFO] set status on client 124135: Reauthenticating
2024-08-09T11:46:23.436443Z [INFO] set status on client 124135: Reauthenticating
2024-08-09T11:46:23.437015Z [ERROR] authentication canceled
2024-08-09T11:46:50.175087Z [INFO] set status on client 124135: Reauthenticating
2024-08-09T11:46:50.175938Z [ERROR] authentication canceled
2024-08-09T11:46:53.207397Z [INFO] set status on client 124135: Reconnecting
2024-08-09T11:46:53.772301Z [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-08-09T11:46:55.288539Z [INFO] add connection to peer
2024-08-09T11:46:55.288691Z [INFO] add_connection;
2024-08-09T11:46:55.288806Z [INFO] waiting for server hello
2024-08-09T11:46:55.289889Z [INFO] got server hello
2024-08-09T11:46:55.290042Z [INFO] set status to connected (connection id: ConnectionId { owner_id: 0, id: 0 }, peer id: PeerId { owner_id: 469, id: 999556 })
2024-08-09T11:46:55.290243Z [INFO] set status on client 124135: Connected { peer_id: PeerId { owner_id: 469, id: 999556 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2024-08-09T11:46:55.29063Z [ERROR] unable to construct a typed envelope connection_id=0/0 message_id=1
leaf-potato commented 2 months ago

You can try using a VPN from a different region, such as Japan, although I don't know why this would solve the problem.

arhirani commented 2 months ago

I'm facing the same issue on Mac. Tried with and without VPN but not able to sign in.

darltrash commented 2 months ago

I have tried with several different wifi connections, although without any VPNs, and it won't work.

The domain for it shouldn't be banned 🤔

leaf-potato commented 2 months ago

@arhirani @darltrash It may be a region problem. Try switching the proxy region. Refer to:

You can try using a VPN from a different region, such as Japan, although I don't know why this would solve the problem.

liam-germain commented 2 months ago

I am also having issues signing in and am not on VPN. App did not work after update, I am on starlink however. So that can affect routing at times... I get an error that says 'Error: authentication canceled' It still hasnt worked on app restart either.

Environment: MacOS: Sonoma 14.5 Zed: 0.149.3

darltrash commented 2 months ago

@arhirani @darltrash It may be a region problem. Try switching the proxy region. Refer to:

You can try using a VPN from a different region, such as Japan, although I don't know why this would solve the problem.

I reinstalled my OS because of mantainment reasons, and it works now :/

syahbes commented 1 month ago

with linux mint, having same issue.. can't log in it used to work.. tried with and without VPN image

PacoDw commented 1 month ago

I have the same issue any updates on this :S

runejac commented 2 weeks ago

Any updates?

outcoldman commented 2 weeks ago

Is it possible to enable some kind of verbose/debug logs to see what is going on? I have the same issue. Not sure if it is update related. It definitely worked a month ago. Maybe macOS 15.0 issue? I see that the connection is timed out. I tried also to install the older build, the same issue.

I am in US, no VPN, macOS 15 on aarch64.

outcoldman commented 2 weeks ago

Interesting, I have another macbook, where I just installed Zed for the first time, and login worked. No issues. They are on the same network. Just different macOS versions, one is macOS 15.0, and another one on latest beta of macOS 15.1.

outcoldman commented 2 weeks ago

I have 0 knowledge about rust, tried to change that (in main.rs for zed)

        let level = LevelFilter::Info;

To Trace to see if there any verbose logs, but have not seen anything in the logs.

After trying a few more things, I have removed zed from keychain, and now my Sing In button actually opens a browser. But nothing changes.

Looking into more what else can be causing this.

codeams commented 2 weeks ago

Could this be happening because of private relay being turned on?

It would explain why after update it suddenly stops working, as you are offered to turn on private relay after upgrading os.

outcoldman commented 2 weeks ago

I personally tried with and without private relay. I have tested so many various options. I do believe there is some issue with the networking in Zed or the libraries it uses. I actually just fixed it.

The mac where Zed could not connect is the Mac Pro which is connected with Ethernet and WiFi. I tried various options, but after I made Ethernet inactive, I was able to sign in (did not work when WiFi was off). Feels like their TCP library or something could not realize which connection is the main connection to the internet, and maybe uses the other one. That would explain also VPN issues that people had in the threads. But again, this is just my guess, I have no idea how Zed works, and how it communicates. I do think the team should contribute a bit more in logging and verbose messages to help users to figure out why some things don't work.

IcelandicIcecream commented 2 weeks ago

Dealing with the same thing here. Zed on Linux. Seems to only work on a specific wifi network for me.

outcoldman commented 1 week ago

Today had again the same issue. Opened Zed, it shows that I need to sign in, you press the sign in button, nothing happens. Deactivated Ethernet (only kept WiFi on Mac Pro) - it was able to sign in.

GihanDuane commented 6 days ago

I experience this today. i dont know how to fix the issue.

dontwanttothink commented 6 days ago

I am having this problem right now. A notification appears about a timeout.