New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 767314 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Headless shell cannot navigate to /tmp/foo.html

Project Member Reported by thestig@chromium.org, Sep 21 2017

Issue description

Chrome Version: 63.0.3218.0 dev
OS: Linux

What steps will reproduce the problem?
(1) google-chrome-unstable --headless /tmp/foo.html

What is the expected result?

Successful navigation to /tmp/foo.html

What happens instead?

[0920/224204.961803:ERROR:headless_shell.cc(140)] Navigation to  failed

----

This command works, which is why I was expecting headless mode to be consistent:

- google-chrome-unstable /tmp/foo.html

This is the workaround:

- google-chrome-unstable --headless file:///tmp/foo.html
 
Status: WontFix (was: Untriaged)
you should do file:///tmp.foo.html
dvallet: But as I pointed out, "google-chrome-unstable /tmp/foo.html" works. Isn't it weird that headless mode introduces an inconsistency to the command line interface?
As a Linux user, I have a general expectation that "ls /tmp/foo.html" works. Given that "google-chrome-unstable /tmp/foo.html" and "content_shell /tmp/foo.html" both work, why should users have to special case "google-chrome-unstable --headless /tmp/foo.html" ?
Also, given it works elsewhere, I have a feeling it's just a few lines of changes to headless/app/headless_shell.cc to make it work like content_shell and friends. So, is this really WontFix - i.e. we actively oppose doing this. Or is this really Available / P3 - i.e. we are not opposed to doing this, but it is a low priority, nice to have.
And I'm even willing to fix this: https://chromium-review.googlesource.com/c/chromium/src/+/696492
Status: Available (was: WontFix)
I'm sorry, I somehow didn't parse the second part of your bug report, I've should've read it more carefully.

My misunderstanding is that it matched chrome's behaviors, but that's clearly not the case, as you've pointed out.

Thanks for taking the time to submit the fix!  
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a2b4bf980cff7aa2792c843026c37d22cfa79af8

commit a2b4bf980cff7aa2792c843026c37d22cfa79af8
Author: Lei Zhang <thestig@chromium.org>
Date: Wed Oct 04 05:45:41 2017

Make headless mode understand /path/to/file.

BUG= 767314 

Change-Id: If738ae440ae0adb1c266a21a09f2cba32d91724e
Reviewed-on: https://chromium-review.googlesource.com/696492
Reviewed-by: David Vallet <dvallet@chromium.org>
Commit-Queue: David Vallet <dvallet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506315}
[modify] https://crrev.com/a2b4bf980cff7aa2792c843026c37d22cfa79af8/headless/app/headless_shell.cc
[modify] https://crrev.com/a2b4bf980cff7aa2792c843026c37d22cfa79af8/headless/app/headless_shell.h

Cc: dvallet@chromium.org
Owner: thestig@chromium.org
Status: Fixed (was: Available)
I'll close the bug now but let me know if something else is needed. 
All good here. Thanks for reviewing + CQing.

Sign in to add a comment