Closed Bug 1728339 Opened 3 years ago Closed 3 years ago

.dmg detection does not work

Categories

(Toolkit :: Startup and Profile System, defect)

All
macOS
defect

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird_esr91 --- unaffected
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox91 --- unaffected
firefox92 --- fixed
firefox93 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(1 file)

The detection from bug 516362 works in local builds (in the dmg produced by ./mach package), but it does not seem to work in official "Firefox Nightly.app" builds. And it doesn't appear to work on try builds either.

STR:

  1. Download Nightly.
  2. Open the .dmg
  3. Double click the "Firefox Nightly" icon in the .dmg folder.

Expected results:
There should be a modal dialog prompting you to install.

Actual results:
A regular Firefox window opens.

The detection seems to work correctly when the build is launched from the command line.

I made a try build with lots of logging.

When double-clicked in the dmg (or actually right clicked + "Open", because it's unsigned) it logs that statfsBuf.f_mntfromname is /Volumes/Firefox Nightly 2/Firefox Nightly.app.
This is surprising. It's expected to be something of the form /dev/diskXsY.

To see the logging from the try build, open Console.app, start streaming, and filter for processes with the name firefox.

Blocks: 516362, 1700795
No longer depends on: 516362

It looks like this might only happen under App Translocation. I've only seen it in builds from dmgs which have the quarantine bit set.

I made another try build which tries to call statfs again, and that seems to be a possible workaround:
Bundle path: /private/var/folders/96/nv6fx_mx75jg7tm4rwmlzfnh0000gn/T/AppTranslocation/D660235B-EBE2-448E-A9F2-773FFE4DCE11/d/Firefox Nightly.app
f_mntfromname: /Volumes/Firefox Nightly 4/Firefox Nightly.app
Then, after calling statfs on /Volumes/Firefox Nightly 4/Firefox Nightly.app:
f_mntfromname: /dev/disk8s3

Pushed by spohl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8d0f2c12cfd5
Find the mount point BSD name correctly even under App Translocation, by calling statfs a second time. r=spohl

I'm setting 92 to "affected" because this bug means that the telemetry from bug 1700795 (which is in 92) doesn't work. That's harmless. But we need to be aware of it when looking at the telemetry data, or maybe uplift this patch to 92.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
Blocks: 1728576

Comment on attachment 9238795 [details]
Bug 1728339 - Find the mount point BSD name correctly even under App Translocation, by calling statfs a second time. r=spohl

Beta/Release Uplift Approval Request

  • User impact if declined: Telemetry from bug 1700795 will be useless
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Very low risk patch to a code path which only runs when Firefox is launched from a read-only directory (which in >99% of cases will be from inside a mounted dmg).
  • String changes made/needed:
Attachment #9238795 - Flags: approval-mozilla-release?

Comment on attachment 9238795 [details]
Bug 1728339 - Find the mount point BSD name correctly even under App Translocation, by calling statfs a second time. r=spohl

Approved for 92.0rc2.

Attachment #9238795 - Flags: approval-mozilla-release? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: