`garcon --url ...` should exit(1) instead of abort() passed an unsupported URI
Reported by
alex.gay...@gmail.com,
Sep 18
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; CrOS x86_64 10895.56.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.95 Safari/537.36 Steps to reproduce the problem: 1. Install Crostini 2. Open up Terminal 3. gnome-www-browser /usr/share/doc/openssh-client/faq.html What is the expected behavior? Ideally the HTML file on disk opens in the host's browser. Or just a clean error What went wrong? alexgaynor@penguin:~$ gnome-www-browser /usr/share/doc/openssh-client/faq.html E0918 22:13:40.100741025 737 client_context.cc:98] assertion failed: call_ == nullptr /usr/bin/gnome-www-browser: line 2: 737 Aborted /opt/google/cros-containers/bin/garcon --client --url "$@" Did this work before? No Chrome version: 69.0.3497.95 Channel: stable OS Version: 10895.56.0 Flash Version: (It'd be nice if the file-a-bug-form had a better flow from ChromeOS/Crostini bugs)
,
Sep 28
what are you expecting to happen ? if you pass a non-URI, then the browser isn't going to be able to handle it. do you just want it to exit(1) instead of aborting ? that abort is coming from Chrome itself iirc and is the output after chaining a few messages across dbus/vm boundaries.
,
Sep 28
,
Sep 28
Yes, a clean exit with an error message would be a significant improvement.
,
Sep 28
having garcon exit(1) instead of abort() hopefully shouldn't be too hard </last-words>
,
Sep 28
Garcon will currently return -1 from main in this case and print out a message like: Failed to request host system to open url "/some/file/path" error: Failure in OpenUrl I'm not seeing the same error the OP has. (I am on the latest version, but this code hasn't changed since it was first written...except maybe it didn't have 'exec' before invoking garcon in the url handler script.
,
Sep 28
maybe something changed in the meantime. i was seeing the same failure a few days ago, but now it's working correctly. $ xdg-open chrome://settings; echo $? [0928/203802:WARNING:host_notifier.cc(122)] Failed to request host system to open url "chrome://settings" error: Failure in OpenUrl [0928/203802:WARNING:host_notifier.cc(122)] Failed to request host system to open url "chrome://settings" error: Failure in OpenUrl xdg-open: no method available for opening 'chrome://settings' 3 $ gnome-www-browser chrome://settings; echo $? [0928/203805:WARNING:host_notifier.cc(122)] Failed to request host system to open url "chrome://settings" error: Failure in OpenUrl 255 $ gnome-www-browser /etc/passwd; echo $? [0928/203813:WARNING:host_notifier.cc(122)] Failed to request host system to open url "/etc/passwd" error: Failure in OpenUrl 255
,
Oct 1
Closing, please re-open if there's a repro case. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by weifangsun@chromium.org
, Sep 28