GNOME Bugzilla – Bug 711267
unhelpful error message "Invalid URI"
Last modified: 2016-03-31 13:22:00 UTC
I didn't read the small print and entered a http uri point at some boot.iso into the url field. That yielded a notification saying: Invalid URI That is technically incorrect - the uri is perfectly valid, you just don't handle it. I think there are two things that could be done here: 1) download the iso and treat it like any other iso (that would be nicely helpful) 2) explain that the uri looks like a download uri, and that I have to download the iso manually, at which point it will appear in the list I then read the small print, and tried to enter the uri in the file chooser location entry, but that gave me an even worse error message: empty location
Created attachment 287636 [details] [review] Better error message for the current bug.
Created attachment 287637 [details] [review] error_msg_changed Hi I took wrong diff in the above patch. Ignore that one.
Hi! Welcome to the community and thanks for submitting this patch! Actually Boxes supports ISO downloading since 3.14. (I must know it, I implemented it ;)) I'm not sure a fix is still needed for this bug: $ git grep -B3 Invalid\ URI src/*.vala src/spice-display.vala- var uri = Xml.URI.parse (uri_as_text); src/spice-display.vala- src/spice-display.vala- if (uri == null) src/spice-display.vala: throw new Boxes.Error.INVALID (_("Invalid URI")); -- src/wizard.vala- private void prepare_for_uri (string uri_as_text) throws Boxes.Error { src/wizard.vala- var uri = Xml.URI.parse (uri_as_text); src/wizard.vala- if (uri == null || uri.scheme == null) src/wizard.vala: throw new Boxes.Error.INVALID (_("Invalid URI")); -- src/wizard.vala- var basename = file.get_basename (); src/wizard.vala- src/wizard.vala- if (basename == null || basename == "" || basename == "/") src/wizard.vala: throw new Boxes.Error.INVALID (_("Invalid URI")); Seems that for every condition, where this message is shown its really an invalid URI, except maybe the last one which could be a valid URI that points to a directory on the server (see http://valadoc.org/#!api=gio-2.0/GLib.File.get_basename - great resource by the way!). A better message for this one could be "Invalid or unsupported URI" or so IMO. In general when you're trying to fix bugs it is a good idea to reproduce them first to see if they are still valid and "get a feeling for the bug". You probably also want to test it again to test if your fix works - even if its a simple one. A thing about the commit messages. You might want to look at `git log` how other people do them. We also have a wiki page with a checklist for this: https://wiki.gnome.org/Git/CommitMessages Feel free to submit another patch :)
(In reply to comment #3) > Hi! > > Welcome to the community and thanks for submitting this patch! > > Actually Boxes supports ISO downloading since 3.14. (I must know it, I > implemented it ;)) > > I'm not sure a fix is still needed for this bug: While the original specific issue might not need fixing, I think we still need better handling of invalid URIs: 1. We shouldn't popup annoying notifications for this but rather provide all feedback in the labels below the entry. 2. Not enable 'continue' until a useable URI is entered. This is covered by bug#686348, which Chitra is also looking into. Thanks for the information and welcome message. :)
I think bug#679890 should also be covered with this. Marking it as duplicate.
*** Bug 679890 has been marked as a duplicate of this bug. ***
*** Bug 733249 has been marked as a duplicate of this bug. ***
Well, we ended up replacing the 'live feedback about entered URL' with static description and examples of URL. Also we expect users to typically copy&paste URLs and also provide completion in the entry based on media URLs from libosinfo.