Headless mode doesn't work with screenshot
Categories
(Firefox :: Headless, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox64 | --- | wontfix |
firefox65 | --- | wontfix |
firefox66 | + | fixed |
People
(Reporter: thomasmo, Assigned: thomasmo)
References
Details
(Keywords: regression)
Attachments
(1 file)
Looks like the fix to Bug 1507352 breaks capturing a screenshot in headless mode, at least with the command in the repro steps below. Removing the fix enables the fix again.
Repro Steps:
In a build that contains https://phabricator.services.mozilla.com/D11969 (Fx 65+), execute the following command:
firefox.exe -headless -no-remote -profile c:\path\to\profile -screenshot c:\path\to\screenshot.jpg https://eggtimer.org
- Expected: screenshot written to disk at c:\path\to\screenshot.jpg, firefox.exe (all of them) terminate
- Actual: no screenshot written to disk, firefox.exe stays open with cpu idle
Comment 1•6 years ago
|
||
I wonder if we'd be better off using this to avoid the about:blank load: https://searchfox.org/mozilla-central/source/docshell/base/nsIDocShell.idl#944
Comment 2•6 years ago
•
|
||
Can you add a debugging statement here: https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/browser/components/shell/HeadlessShell.jsm#36 to print out what uri and location are? For example, something like:
dump(`uri is: ${uri.spec} and location is ${location.spec}\n`);
Comment 3•6 years ago
|
||
(In reply to Dave Townsend [:mossop] (he/him) from comment #1)
I wonder if we'd be better off using this to avoid the about:blank load: https://searchfox.org/mozilla-central/source/docshell/base/nsIDocShell.idl#944
We probably can, but it would be hard to code that since the docshell would live in the content process...
Here is the debug output where that code is:
uri is: undefined and location is https://eggtimer.org/
Comment 5•6 years ago
|
||
Oh, I'm sorry. I had a typo in my previous debug code. What I should have said was:
dump(`uri is: ${uri} and location is ${location.spec}\n`);
My mistake caused the first result to come out as undefined. Any chance you could try this please?
Comment 6•6 years ago
|
||
My guess is that uri would be "https://eggtimer.org" (without the trailing slash)!
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
If my guess is correct, https://phabricator.services.mozilla.com/D17710 should fix the bug.
D'oh! I didn't catch that either. Here's the update:
uri is: https://eggtimer.org and location is https://eggtimer.org/
Yes--the trailing slash makes the difference
Comment 10•6 years ago
|
||
Great, I'd appreciate if you can try out the patch above. It should fix the problem, I'm pretty sure.
Updated•6 years ago
|
Assignee | ||
Comment 11•6 years ago
|
||
Yes--I can confirm that the patch fixes this bug
Comment 12•6 years ago
|
||
Thanks very much!
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Backed out changeset 34e24b0fb7b7 (bug 1522989) for ESLint failure
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=224173570&repo=autoland&lineNumber=276
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=34e24b0fb7b7296e7a4b928dd217b15d2f0d96ac&selectedJob=224173570
Backout:
https://hg.mozilla.org/integration/autoland/rev/33ca2ea6b37064d12c0d4fefc81bf689396a5e57
Comment 15•6 years ago
|
||
Updated•6 years ago
|
Comment 16•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Updated•6 years ago
|
Description
•