Open Bug 1727624 Opened 9 months ago Updated 5 months ago

When launched from the command line, Firefox detects the macOS version as 10.16 (only applies to Intel arch, which is built with 10.12 SDK)

Categories

(Core :: Widget: Cocoa, defect, P3)

defect

Tracking

()

REOPENED
Tracking Status
thunderbird_esr91 --- wontfix
firefox-esr91 --- wontfix
firefox94 --- wontfix
firefox95 --- wontfix
firefox96 --- affected

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 1 open bug)

Details

Steps to reproduce:

  1. Compile a local Firefox build with the 10.12 SDK.
  2. Capture a profile in it.
  3. Check the macOS version number that is displayed in the top left corner.

Expected results:
On macOS 12 Beta, you should see 12.0.0

Actual results:
In local builds, it says 10.16.0. https://share.firefox.dev/3gwbOYS
Regular Nightly seems to be fine.

This indicates that nsCocoaFeatures::GetSystemVersion gets the wrong version, which indicates that the contents of /System/Library/CoreServices/SystemVersion.plist are spoofed to contain "10.16" instead of "12.0".

Detecting the wrong version can cause various breakage; for example it'll break this check in IsAppRunningFromDmg().

I'm not sure why regular Nightly doesn't have this problem. Maybe the OS behaves differently based on the bundle name.

/System/Library/CoreServices/SystemVersionCompat.plist lists the ProductVersion as 10.16 -- exactly the same as on macOS 11. This means that nsCocoaFeatures::GetSystemVersion sees the system version as 10.16 when Firefox is run from the command line (again, exactly as on macOS 11).

But, as of bug 1690604, this doesn't happen when you run Firefox by double-clicking on its icon, or by using open /Applications/Firefox.app from the command line.

Mozilla should complain to Apple about this. Besides the workaround implemented at bug 1690604, there's not much we can do about it.

I got the same results in both the current Firefox release and today's mozilla-central nightly. I tested by doing about:crashparent, then looking at the crash report that was generated.

Ah indeed, starting from the command line was the difference! Thanks.

This will probably be fixed if we build with the macOS 11 SDK, would you agree? We can just do that.

This will probably be fixed if we build with the macOS 11 SDK, would you agree?

I don't know. You might need to build with the macOS 12 SDK :-(

I'll give it a try.

I built locally with the 11.1 SDK (that's the only 11+ SDK I had) and the build indeed now detects 12.0.0 when launched from the command line.

Summary: Local builds on macOS 12 think they're running on 10.16, regular Nightly is fine → When launched from the command line, Firefox detects the macOS version as 10.16 (only applies to Intel arch, which is built with 10.12 SDK)

Setting initial priority and severity.

Severity: -- → S3
Priority: -- → P3

Now that the minimum SDK has been bumped to 11 in bug 1696504 I guess this can be closed?

Flags: needinfo?(mstange.moz)

Yup, this is fixed by bug 1696504.

Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Flags: needinfo?(mstange.moz)
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

... which got backed out.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 1696504
No longer depends on: 1696513
Target Milestone: 96 Branch → ---
You need to log in before you can comment on or make changes to this bug.