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)
Tracking
()
People
(Reporter: mstange, Assigned: mstange)
References
(Blocks 1 open bug)
Details
Steps to reproduce:
- Compile a local Firefox build with the 10.12 SDK.
- Capture a profile in it.
- 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.
Comment 1•9 months ago
|
||
/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.
Comment 2•9 months ago
|
||
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.
Assignee | ||
Comment 3•9 months ago
|
||
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.
Comment 4•9 months ago
|
||
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 :-(
Assignee | ||
Comment 5•9 months ago
|
||
I'll give it a try.
Comment 6•9 months ago
|
||
Actually, maybe building with the macOS 11 SDK will be enough. As far as I know the current Apple Silicon Firefox releases are all built with this SDK. But none of the crash reports on macOS 12 on Apple Silicon are recorded as "macOS 10.16.0" -- though many of them are on Intel hardware.
Assignee | ||
Comment 7•9 months ago
|
||
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.
Assignee | ||
Updated•9 months ago
|
![]() |
||
Comment 9•6 months ago
|
||
Now that the minimum SDK has been bumped to 11 in bug 1696504 I guess this can be closed?
Assignee | ||
Comment 10•6 months ago
|
||
Yup, this is fixed by bug 1696504.
Assignee | ||
Comment 11•5 months ago
|
||
... which got backed out.
Assignee | ||
Updated•5 months ago
|
Updated•5 months ago
|
Description
•