Closed Bug 1569089 Opened 3 years ago Closed 3 years ago

The "-version" ("-v") command line option doesn't report version information when using cmd.exe


(Toolkit :: Startup and Profile System, defect, P3)




Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- wontfix
firefox67 --- unaffected
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- verified


(Reporter: yuki, Assigned: emk)


(Keywords: regression)


(1 file)

Firefox supported a command line option "-version" (or "-v") to print its version, like:

> "c:\Program Files\Mozilla Firefox ESR60\firefox.exe" -version | more
Mozilla Firefox 60.7.2


However the option looks unavailable on recent versions.

Steps to reproduce

  1. Install Nightly on Windows.
  2. Open cmd.exe.
  3. Type "c:\Program Files\Mozilla Nightly\firefox.exe" -version | more and run it.

Actual result

Just line breaks are printed and there is no version information, like:

> "c:\Program Files\Mozilla Nightly\firefox.exe" -version | more


Expected result

A valid version information is printed like:

> "c:\Program Files\Mozilla Nightly\firefox.exe" -version | more
Mozilla Firefox 70.0a1



  • Windows 10 1809 Pro
  • Firefox 67.0.1 (64bit)
  • Firefox ESR68.0 (64bit)
  • Nightly 70.0a1 (64bit) build ID: 20190725215157

I've confirmed that the option works with Firefox ESR60. Because mozregression is not usable for this case, the initial failure build is not determined yet.

I successfully got the expected output on the Windows PowerShell. On my environment this works as expected:

PS C:\Users\user> & 'C:\Program Files\Mozilla Firefox\firefox.exe' '-version' | more
Mozilla Firefox 68.0.1

So this looks a problem appearing only on the cmd.exe.

The priority flag is not set for this bug.
:Dolske, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dolske)
Flags: needinfo?(dolske)
Priority: -- → P3
Summary: The "-version" ("-v") command line option doesn't report version information → The "-version" ("-v") command line option doesn't report version information when using cmd.exe

Confirmed issue with 70.0a1 (2019-08-13) on Windows 10.
Hope this helps:

(In reply to Cristian Fogel, QA [:cfogel] from comment #5)

Confirmed issue with 70.0a1 (2019-08-13) on Windows 10.
Hope this helps:

Changes in that range:

Priority: P3 → P2

Dão, or dolske, can you help find someone to work on this, maybe for the 71/72 release? Thanks!
For a simple enough fix, I would still take a patch for 70 beta 13 or 14, tbh, because of how much I love Tree Style Tab ;)

Flags: needinfo?(dolske)
Flags: needinfo?(dao+bmo)

Sorry, I don't manage engineers. It would be helpful to pin down what bug caused this but nothing jumps out at me from the regression range.

Flags: needinfo?(dao+bmo)

Command line handling is handled in the code relating to Startup & Profile system, so lets move this across there and see if the triage owners can help.

Component: General → Startup and Profile System
Flags: needinfo?(dtownsend)
Product: Firefox → Toolkit
Flags: needinfo?(dolske)

Bug 1528963 looks suspicious

Flags: needinfo?(dtownsend)
Priority: P2 → P3

AttachConsole() may change Win32 std handle values if Firefox is launched from
cmd.exe that makes discrepancy between Win32 and CRT. This patch synchronizes
both std handles.

Pushed by
Sync std handles after AttachConsole(). r=aklotz
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Assignee: nobody → VYV03354

Fix verified for 72.0a1 (2019-11-14) on Windows 10.

Unless someone can point to a real-world instance where this bug is causing problems in the wild, I'm inclined to just let this fix ride the trains.

Piro-san, do you want to uplift this to ESR68?

Flags: needinfo?(yuki)

Initially this was reported by my customer who used it. This was actually a usecase in the wild. But they already migrated to something different way (maybe application.ini or the registry of Windows), so it looks not immediately-necessary.

Flags: needinfo?(yuki)
You need to log in before you can comment on or make changes to this bug.