--screenshot option in Firefox headless mode stopped working
Categories
(Firefox :: Headless, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr60 | --- | unaffected |
| firefox-esr68 | --- | fixed |
| firefox68 | --- | unaffected |
| firefox69 | --- | verified |
| firefox70 | --- | verified |
People
(Reporter: pascalc, Assigned: aswan)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(2 files)
|
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-esr68+
|
Details | Review |
|
460.46 KB,
image/png
|
Details |
Mozilla/5.0 (X11; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 ID:20190725215157
STR:
1/ type firefox --screenshot https://mozilla.org in a terminal
ER:
A screenshot.png page is generated in the current folder
AR:
No screenshot generated.
This regression was reported by a user (guillermo) in IRC and I can reproduce the bug.
| Reporter | ||
Comment 1•7 years ago
|
||
I quickly tested manually as I can't find how to use mozregression in headless mode, 68 is not affected but this is a 69 regression. marking as tracking for 69 and 70 as this is a functional regression of the headless mode.
Updated•7 years ago
|
| Reporter | ||
Comment 2•7 years ago
|
||
mozregression --good 2019-05-25 --arg="--screenshot" --arg="https://mozilla.org" --arg="--headless"
16:34.99 INFO: Last good revision: d08d899e5431458f7c28ca66a13e3e95dff9c7c1
16:34.99 INFO: First bad revision: 2236a18eb0a91be02e72c22e370a6f5aa877f11e
16:34.99 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=d08d899e5431458f7c28ca66a13e3e95dff9c7c1&tochange=2236a18eb0a91be02e72c22e370a6f5aa877f11e
Regressed by bug 1560178 which was uplifted to beta, Gijs could you have a look please? Thanks!
Comment 3•7 years ago
|
||
Andrew, can you maybe take a look at this since Gijs is on PTO for the next couple weeks and we're running low on time for Fx69? Thanks!
| Assignee | ||
Comment 4•7 years ago
|
||
It looks like --screenshot has always loaded the page to take a screenshot of in the parent process (the relevant code is basically the entire contents of browser/components/shell/HeadlessShell.jsm) so its no surprise that it was broken by bug 1560178.
My knowledge of the platform level here is shaky, the only way I would know how to approach this is to load a small document that contains a <browser remote="true"> and then load the actual content page inside that browser.
Leaving the needinfo for myself pending further research.
| Assignee | ||
Comment 5•7 years ago
|
||
Okay, I think the approach from comment 4 is the only way to go.
Also this has a test but for some reason it is a chrome mochitest. The test copies the test profile preferences to create a profile to run firefox -screenshot but since this is a chrome mochitest, the new profile inherits among other things: browser.tabs.remote.autostart = false. So, we're testing the unsupported e10s-disabled configuration where of course content loads in the parent process are allowed. Yay.
| Assignee | ||
Comment 6•7 years ago
|
||
not ready for landing, putting this up to get feedback before polishing.
note that the automated test of this feature is still broken, bug 1570554
is on file for fixing it.
Comment 7•7 years ago
|
||
Clearing the regression-window-wanted tag based on comment 2.
Comment 8•7 years ago
|
||
Thanks for looking at this, Andrew!
Updated•7 years ago
|
Comment 10•7 years ago
|
||
Backed out changeset b4678e759a18 (Bug 1569135) for mochitest failures at test_headless_screenshot.html.
Backout: https://hg.mozilla.org/integration/autoland/rev/b7f5d743d08b5df92c5b167eb7b03ded01250b7c
Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=pending%2Crunning%2Csuccess%2Ctestfailed%2Cbusted%2Cexception&revision=b4678e759a188230e3929f4f4874c967e1cabfd2&selectedJob=260398429
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=260398429&repo=autoland&lineNumber=4042
| Assignee | ||
Comment 11•7 years ago
|
||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 14•7 years ago
|
||
Comment on attachment 9082157 [details]
Bug 1569135 Fix --screenshot r=kmag
Beta/Release Uplift Approval Request
- User impact if declined: Running firefox with the -screenshot command line argument will be broken
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: See original bug
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The only changes to shipping code are bundling a new jsm and modifying code that is only loaded/run when -screenshot is present in the command line arguments.
- String changes made/needed: none
| Assignee | ||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 15•7 years ago
|
||
Comment on attachment 9082157 [details]
Bug 1569135 Fix --screenshot r=kmag
Fixes a regression in 69 causing the --screenshot flag to be broken. Approved for 69.0b13.
Comment 16•7 years ago
|
||
| bugherder uplift | ||
Comment 17•7 years ago
|
||
Hi Andrew,
I've been trying to reproduce this bug but I have a problem. As you can see in my screenshot, I've installed version 69.0b12 to first try and reproduce this bug. When I run the command <./firefox -p> to execute FF, it does so without problems. As seen, it opens version 69.ob12. However, when I try to take the screenshot the console is trying to take the screenshot of version 68.0.1.
This way, I can't reproduce the bug nor verify if it's fixed since it always takes the screenshot of version 68.0.1, regardless of the version I've downloaded.
Is there a way around or is this a problem with firefox?
Best regards, Flor.
| Assignee | ||
Comment 18•7 years ago
|
||
It looks like you just need to use ./firefox instead of firefox when running the tests with the -screenshot argument?
Comment 19•7 years ago
|
||
Hi Andrew,
Thanks a lot for the help! I've been able to reproduce the bug on older versions and I've been able to take the screenshot on the latest nightly 70.0a1 (2019-08-16) (64-bit) and latest beta 69.0b13 (64-bit). Therefore, I've changed the status of the bug to verified fixed.
Best regards, Flor.
Updated•7 years ago
|
Comment 20•7 years ago
|
||
Comment on attachment 9082157 [details]
Bug 1569135 Fix --screenshot r=kmag
Per https://bugzilla.mozilla.org/show_bug.cgi?id=1560178#c34.
Comment 21•7 years ago
|
||
| bugherder uplift | ||
Updated•4 years ago
|
Description
•