bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.08k stars 229 forks source link

unison-gtk waits 30 seconds when server sends text #885

Closed thekswenson closed 1 year ago

thekswenson commented 1 year ago

My university has some silly message that appears every time I log in via SSH. In the last year, unison-gtk has started to post this message in a new window, seeming to wait for a response:

Screenshot from 2023-03-28 12-01-41

There are two negative effects of this change:

  1. The message doesn't appear for 30 seconds, before which Unison seems to hang so I have to wait 30 seconds before I even get the "Connected" message and the changes start to calculate.
  2. I have to click OK within a short period, or else there is a timeout.

Practically speaking, this means that I have to standby for 30 seconds each time I want to synchronize my files, waiting for the message window to open, so that I can press OK. This was never a problem previous to the existence of this window. If I use unison in a terminal there is no problem and things proceed normally.

tleedjarv commented 1 year ago

Which version are you using? If not the latest, are you able to try with the latest version? Do you use password with ssh?

If I made you a debug version (if it gets to this) would you be able to try it out?

thekswenson commented 1 year ago

I have an RSA key on my server, so no password. I'm using the Ubuntu package, which is version 2.52.0 (ocaml 4.13.1). I'll try to use the most recent client. It may be more difficult to update the server unison version.

thekswenson commented 1 year ago

I'll do whatever necessary to get a debug version running.

tleedjarv commented 1 year ago

I'll try to use the most recent client. It may be more difficult to update the server unison version.

Please do try. You don't have to update the server version, these versions are interoperable.

thekswenson commented 1 year ago

This ocaml interoperability upgrade is really nice!

So I tried unison-v2.53.2+ocaml-4.08.1+x86_64.linux.tar.gz and I still have to wait 30 seconds.

tleedjarv commented 1 year ago

Could I request one more bit of data from you? In terminal, could you execute the following: ssh !!your_server!! echo connected > ssh_stdout.txt 2> ssh_stderr.txt (make sure to replace the hostname) and then attach the files here (attach, not paste the contents). If there is any sensitive information in the files, you can overwrite those parts with some other characters but don't delete anything.

Also, paste any contents output by ssh that did not end up in those files.

thekswenson commented 1 year ago

I'm remembering that I have a non-standard setup. That is, I have to ssh to campus through a machine that has access to the outside world using the "ProxyCommand" in .ssh/config. Here is an anonymized version of my .ssh/config file:

Host accessiblemachine
Hostname acessiblemachine.here.edu                                                       
User myusername                                                                    

Host nonaccessiblemachine
Hostname nonaccessiblemachine.here.edu
User myusername2
ProxyCommand ssh accessiblemachine -W %h:%p

ssh_stderr.txt ssh_stdout.txt

tleedjarv commented 1 year ago

Thank you for the information.

I have a debug build for you at: https://github.com/tleedjarv/unison/actions/runs/4542387077 (you may have to scroll down to see downloads). If you don't see any downloads yet then try again in a few minutes.

It will write some output to stderr. You can either run the GUI from terminal and paste the output here or redirect the output to a file 2> filename and paste/attach the file here. Once again, you can mask any sensitive information in that output but don't delete anything.

thekswenson commented 1 year ago

Here is the output: stderr.txt

tleedjarv commented 1 year ago

Thank you for your help. I've now identified the cause of this issue. A fix will be proposed shortly.

tleedjarv commented 1 year ago

You can get a build with the proposed fix from https://github.com/tleedjarv/unison/actions/runs/4546236635 If it works for you then you're welcome to keep using it (it's basically 2.53.2 + this fix).

You may still see the connection message because it's impossible to distinguish it from error messages. But it should not expect any input from you (please tell if it does) and it should not block the updates scanning in the background (please tell if it does).

thekswenson commented 1 year ago

What a relief! It works as expected. Thank you!