blinksh / blink

Blink Mobile Shell for iOS (Mosh based)
https://blink.sh
GNU General Public License v3.0
6.08k stars 565 forks source link

Running `mosh myserver` instantly crashes Blink #1982

Closed fingolfin closed 3 months ago

fingolfin commented 4 months ago

I enter mosh myserver, press return, and poof blink is dead.

This severs all open connections... and also resets the list of open tabs / connection to a prior version.

Luckily connecting via mosh1 works, but there is no tab completion for mosh1 which still makes this annoying.

I'd be happy to help try debug this, but there I have no idea how.

This is with v17.2.1.866 on iOS 17.3.1, on an iPad Pro (11 inch, 3rd gen).

All in all, unfortunately the new "improved" mosh integration only made things worse for me.

fingolfin commented 4 months ago

I should mention: this affects multiple of my hosts, but not all. All affect use a ProxyCmd ssh -W %h:%p MY_JUMP_HOST (as another aside, I tried to switch those to use ProxyJump instead which supposedly does the same, but this never worked for me, so I left it at the above).

carloscabanero commented 4 months ago

Hi! Got a fix for this. Should be out as soon as Apple approves. As you say, workaround for now is to use mosh1.

carloscabanero commented 4 months ago

About ProxyJump, trying to see if this has any relation to #1974. It really is just converting to the corresponding ProxyCommand. Does it work over ssh? Can you attach a -vvvv output? Thanks!

fingolfin commented 3 months ago

Good news: in v17.2.2.868 mosh myserver doesn't crash anymore.

Bad news: it now fails with an error:

connError(msg: "Socket error: disconnected") - The operation couldn’t be completed. (SSH.SSHError error 0.)
Use mosh1 for the deprecated (previous) mosh version.

Of course I can use mosh1 as a workaround but perhaps the underlying issue can be fixed anyway? Any particular data I could supply to help with debugging this?

(Regarding ProxyJump, I'll investigate and if it still happens, will open a new issue and/or comment on the issue you pointed me at)

carloscabanero commented 3 months ago

Thanks for the report. Quick update on ProxyJump. It is fixed as well as other issues found last week. The fixes run a bit deeper than we initially thought, so we don't feel comfortable pushing directly. Are you on Community/TestFlight by any chance?

For additional feedback on mosh, it would help a lot to run it with the --verbose flag. That should point at where the issue may be.

fingolfin commented 3 months ago

ProxyJump: I tested it with v17.2.2.868 and it seems to be working! To be clear: I last tried this maybe ... a year ago? or longer? I didn't keep track; i.e. I am not claiming this was fixed for me recently, just that it works now. Well, at least with ssh and mosh1 -- with mosh I get an error. I think I didn't mention this but it might be relevant: the hosts were mosh doesn't work for me all have a ProxyJump configured (resp. a ProxyCmd, I am trying both variants now). Given the next thing, I guess that was relevant.

Indeed, with --verbose I see this:

blink> mosh --verbose tutulla
No proxy callback configured. Cannot run ProxyCommand
socket_callback_connected: Socket connection callback: 1 (0)
ssh_socket_exception_callback: Socket exception callback: 1 (0)
ssh_socket_exception_callback: Socket error: disconnected
connError(msg: "Session Exception - Socket error: disconnected")
connError(msg: "Socket error: disconnected") - The operation couldn’t be completed. (SSH.SSHError error 0.)
Use mosh1 for the deprecated (previous) mosh version.

I am using TestFlight but I am not on the Blink TestFlight.

carloscabanero commented 3 months ago

Awesome. So this last issue with the new client should be fixed as well in the next TestFlight towards Blink 17.3. If you don't mind sending me an email (Carlos at blink.sh), I can add you to TF so you will be able to test this there and confirm. Thanks!

fingolfin commented 3 months ago

@carloscabanero thanks, I've sent a mail

fingolfin commented 3 months ago

@carloscabanero not complaining but I've sent you my email address on March 18 with my email address in it (and on it) in case you still want to add me to TestFlight. So if you want to add me so I can test... otherwise I have a working workaround and am happy to test it with the next release, too.

carloscabanero commented 3 months ago

Done! I'm getting a new release out this Friday too, but I'm positive the ProxyJump should now work.

fingolfin commented 3 months ago

OK, I've installed the testflight and mosh into my server now works! Great, thanks!