jamulus icon indicating copy to clipboard operation
jamulus copied to clipboard

Do not fail silently if IP in connection window is invalid

Open ann0see opened this issue 4 years ago • 8 comments

Follow up #1938 by @softins

If an invalid IP is entered, the connection window closes after clicking on connect and Jamulus does not give an error message.

Proposed behaviour:

  1. Check IP/Domain on entry and give a red warning "The IP you entered is invalid. Make sure you enter it in a correct format"
  2. Same as above, but after clicking on connect as error message

ann0see avatar Aug 08 '21 12:08 ann0see

It's really a bug, so I'll flag for next release in hope.

gilgongo avatar Nov 07 '21 09:11 gilgongo

#1938 is rather long. Was there any particular comment?

By "Invalid", does this mean "Syntactically incorrect", rather than "Cannot connect to a Jamulus server at that address"?

If it's the former, it should be before closing the Connect dialog. If it's the latter, the existing warning banner should suffice.

pljones avatar Nov 07 '21 12:11 pljones

@pljones I think invalid as in syntactically incorrect (so 192.168.o.10, and hopefully also a DNS address that doesn't resolve) as the message is "Make sure you enter it in a correct format". Should probably be "The address you entered is invalid..." I think.

gilgongo avatar Nov 07 '21 13:11 gilgongo

Yes. (Ugh, took a while to read your message correctly...)

It's got to cope with non-IP addresses, of course. "I0.10.123.I0" is a perfectly valid address syntactically (it probably doesn't resolve, so you won't connect to anything).

The easiest check is to do just that - attempt to resolve the input text to an IP address (with optional port).

If it fails, you error: "The address entered is not valid. Make sure you typed it correctly."

If it works, you exit the Connect dialog and proceed to attempting to communicate with the provided network address.

pljones avatar Nov 07 '21 14:11 pljones

De-Tagged. I think it’s a thing for the backlog

ann0see avatar Jun 14 '22 20:06 ann0see

I'm going to put this on the 3.11.0 backlog as it shouldn't be too hard.

pljones avatar Aug 12 '23 16:08 pljones

Probably we can check with a regular expression. I still believe the problem lies deeper: what if we enter an which doesn't have a Jamulus server running? But maybe that's already handled correctly with a timeout.

ann0see avatar Aug 12 '23 21:08 ann0see