Closed Bug 1403934 Opened 7 years ago Closed 7 years ago

Firefox keeps running after making a headless screenshot, can only kill it.

Categories

(Firefox :: Headless, defect, P2)

57 Branch
defect

Tracking

()

RESOLVED FIXED
Firefox 58
Tracking Status
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: elger.jonker, Assigned: bdahl)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Steps to reproduce:

./firefox --window-size=1280,1024 -screenshot test.png mozilla.org

*screenshot is made, waiting for firefox to quit, it never quits, so hitting control-c*

./firefox --window-size=1280,1024 -screenshot test.png mozilla.org

*directly gives back control to the shell, due to invisible popup*


Actual results:

It makes a screenshot and then never quits. 

There is no way to quit firefox after making a screenshot except signals like killall/control-c. Killing it places firefox in a "closed unexpected" mode. While in this mode no screenshots are made given there is an (invisible) dialog that needs to be clicked away ("A copy of Firefox is already open. Only one copy of Firefox can be open at a time.").

When the "unexpected" dialog is open, making a screenshot again results in being returned to my shell, while there is a firefox process that waits idle until someone clicks an invisible dialog.

Using windowed mode the message can be clicked away. But it will re-appear due to needing to stop firefox.


Expected results:

Dialogs should never appear as there is no UI: dismiss all and make a screenshot in one of the following ways.

A: Make a screenshot and then quit, let me wait until the screenshot is finished. This is by far the easiest for shell integration. Which was the goal here.

B: Leave firefox open, but accept more commands (screenshot, quit) in some documented way from the command line. This requires some more tricky programming to control it programmatically.
Component: Untriaged → Headless
Blocks: 1387587
Priority: -- → P2
Comment on attachment 8914817 [details]
Bug 1403934 - Fix headless screenshot shutdown on MacOS.

https://reviewboard.mozilla.org/r/186098/#review191136
Attachment #8914817 - Flags: review?(dtownsend) → review+
Pushed by bdahl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/29a20bc04c6f
Fix headless screenshot shutdown on MacOS. r=mossop
https://hg.mozilla.org/mozilla-central/rev/29a20bc04c6f
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Comment on attachment 8914817 [details]
Bug 1403934 - Fix headless screenshot shutdown on MacOS.

Approval Request Comment
[Feature/Bug causing the regression]: 1378010
[User impact if declined]: Taking a screenshot from the command line will hang on MacOS
[Is this code covered by automated tests?]: yes
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]:
[Is the change risky?]: no
[Why is the change risky/not risky?]: Single change and it's in a code path that is only triggered by special command line flags 
[String changes made/needed]:
Attachment #8914817 - Flags: approval-mozilla-beta?
Comment on attachment 8914817 [details]
Bug 1403934 - Fix headless screenshot shutdown on MacOS.

I am not sure this is a mainline scenario. Assuming this isn't, I'd prefer this fix ride the 58 train. Sorry!
Attachment #8914817 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: