New issue
Advanced search Search tips

Issue 885353 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Oct 1
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

`garcon --url ...` should exit(1) instead of abort() passed an unsupported URI

Reported by alex.gay...@gmail.com, Sep 18

Issue description

UserAgent: 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)
 
Components: OS>Systems>Containers
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.
Labels: -Pri-2 Pri-3
Yes, a clean exit with an error message would be a significant improvement.
Owner: jkardatzke@chromium.org
Summary: `garcon --url ...` should exit(1) instead of abort() passed an unsupported URI (was: Crostini: gnome-www-browser dies on an assertion error if you pass something that's not a URL)
having garcon exit(1) instead of abort() hopefully shouldn't be too hard
</last-words>
Labels: Proj-Containers
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.
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
Status: WontFix (was: Unconfirmed)
Closing, please re-open if there's a repro case.

Sign in to add a comment