elementary / elementary/files

Files freeze after ssh server drops connection

Open
#1,858 20 comments 7 reactions 0 assignees View on GitHub
Priority: Low
Dominant language
Vala
Stars
365
Forks
82
Avg merge
4d 2h
Merged PRs (30d)
3

Description

### What Happened?

At my university we have a few ssh servers and clusters for running computations. I often connect to these servers from Files, because it's a convenient way to copy files between the servers and my local machine.

These particular servers have an annoying habit of dropping the ssh connection after few minutes of inactivity (unless I'm connected to university wifi - eduroam - which is quite weird in itself). When this happens, and I go to Files and try to interact with the remote directories (navigate folders or refresh current folder view), the Files app freezes. The only point of action afterwards is to kill Files.

One way to prevent this freezing is to disconnect the server from sidebar whenever I suspect the connection was dropped (e.g. coming back 5 minutes or more after I used it last time), then I can reconnect and everything works without issue. But obviously I forget to do that way too often.

I know that the ssh/sftp feature is handled by gvfs backend, however I also use another app - [Taxi](https://github.com/Alecaddd/taxi), the (s)ftp client from AppCenter - which is using the same backend, but doesn't freeze after the connection drops. I know it uses the same feature as it doesn't even ask for password if I already used the password in Files.

### Steps to Reproduce

I admit this will not be easy to reproduce, but it goes something like this:

1. Connect to ssh server which tends to drop connection after some time of inactivity.
2. Wait some time without doing anything so the connection gets dropped.
3. Then try to browse folders or just refresh the current folder.
4. If it didn't freeze yet, click anywhere in the window with a mouse. Now you're there - Files is frozen.

### Expected Behavior

Files should not freeze just because a connection to a server was dropped. Taxi uses the same backend to connect to the servers and does not freeze when connection is dropped.

### OS Version

5.x (Hera)

### Software Version

Latest release (I have run all updates)

### Log Output

```shell
I tried launching Files from terminal, but the freeze doesn't produce any output there. Also `coredumpctl` says there are no coredumps to show.
```

### Hardware Info

All the laptops that I ever had with elementary OS. Acer, Dell, Slimbook, all with Intel chips. I think the issue exists maybe since Loki, but I never paid enough attention to it, until my friend pointed out the dropping connections to our servers (I use a few other servers at different institutes and those are all fine). I then noticed that Files tends to freeze after the connection drops.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.