Taking a screenshot from the command line doesn't work on Windows
Categories
(Firefox :: Headless, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox97 | --- | fixed |
People
(Reporter: Dexter, Assigned: toshi)
Details
Attachments
(1 file)
This problem is present in both Nightly (96.0a1 (2021-11-30) (64-bit)) and Release (94.0.2 (64 bit)).
STR
- Open a Windows command prompt.
- Execute
firefox.exe -P test -no-remote -screenshot "https://www.example.com"
Expected Outcome
The screenshot of the page gets saved as screenshot.png in the current working directory.
Current Outcome
Nothing is saved, the process lives forever.
Other info
I tried to build locally, and I'm seeing a different problem as well. Whenever I try to take a screenshot:
./mach run --screenshot "https://www.example.com"
0:01.05 d:/mozilla-unified/obj-x86_64-pc-mingw32\dist\bin\firefox.exe --screenshot https://www.example.com -no-remote -wait-for-browser -profile d:\mozilla-unified\obj-x86_64-pc-mingw32\tmp\profile-default -attach-console
Failure taking screenshot: Error: Invalid URL passed to loadContentWindow(): -attach-console
*** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: recipe-client-addon-run
This seems to happen because of this line and its interaction with how parsing happens when taking a screenshot.
Manually adding -attach-console to the previous ./mach run command works around this and allows to reproduce the problem consistently.
| Assignee | ||
Comment 1•4 years ago
|
||
HeadlessShell.handleCmdLineArgs needs to skip arguments starting with a hyphen
to search for a URL.
Updated•4 years ago
|
Comment 2•4 years ago
|
||
The severity field is not set for this bug.
:bdahl, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 4•4 years ago
|
||
| bugherder | ||
Updated•4 years ago
|
Description
•