Nightly couldn't update automatically on security update
Categories
(Toolkit :: Application Update, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox101 | --- | verified |
People
(Reporter: pdahiya, Assigned: spohl)
References
Details
Attachments
(12 files)
|
414.32 KB,
image/png
|
Details | |
|
643.56 KB,
image/png
|
Details | |
|
264.40 KB,
image/png
|
Details | |
|
775 bytes,
application/octet-stream
|
Details | |
|
5.65 KB,
application/octet-stream
|
Details | |
|
459 bytes,
application/octet-stream
|
Details | |
|
459 bytes,
application/octet-stream
|
Details | |
|
150.05 KB,
image/png
|
Details | |
|
10.96 KB,
text/plain
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
2.08 KB,
text/plain
|
chutten
:
data-review+
|
Details |
Security update prompt causes Nightly update flow to fail
a) after multiple iteration of asking user to enter password to get administrative privileges to install security update fails to install Firefox update and
b) in end prompts user in door hangar with message 'Nightly couldn't update automatically , download Nightly to update', with Download CTA in door hangar taking user to https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly
See attached screenshots
This is seen on latest Nightly (97.0a1 2021-12-07) on MacOS Bug Sur version 11.4
| Reporter | ||
Comment 1•4 years ago
|
||
| Reporter | ||
Comment 2•4 years ago
|
||
| Reporter | ||
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Comment 4•4 years ago
|
||
(In reply to Punam Dahiya [:pdahiya] from comment #0)
multiple iteration of asking user to enter password to get administrative privileges to install security update
Maybe a silly question, but I have to ask: Are you giving it the (correct) password so that it can update?
Could you please attach update logs to this bug? This is how you can find them:
- Navigate to
about:support - Find the "Update Folder" entry and click "Open Folder".
- Open the
updatesdirectory. - Inside, you should find files named
last-update.logandbackup-update.log. Attach both of these files to this bug.
| Reporter | ||
Comment 5•4 years ago
|
||
Attaching current update logs , not sure how relevant these are as issue was encountered few days back and since than I have downloaded latest dmg and installed. Having said that I encounter this issue on security and release updates, will leave NI for myself to attach update logs when issue is seen. Thanks
| Reporter | ||
Comment 6•4 years ago
|
||
| Reporter | ||
Comment 7•4 years ago
|
||
(In reply to Kirk Steuber (he/him) [:bytesized] from comment #4)
(In reply to Punam Dahiya [:pdahiya] from comment #0)
multiple iteration of asking user to enter password to get administrative privileges to install security update
Maybe a silly question, but I have to ask: Are you giving it the (correct) password so that it can update?
yes, password entered was correct
| Reporter | ||
Updated•4 years ago
|
Comment 8•4 years ago
|
||
not sure how relevant these are as issue was encountered few days back and since than I have downloaded latest dmg and installed.
Hmm. These logs show a successful update. Have you been able to update successfully since you downloaded the latest dmg? You can check via the "Update History" button in the "Update" section of about:preferences.
Typically, permission issues like this only happen in multi-user setups. Are you using multiple macOS users on this computer? If so, could you tell me about any differences in the update process between different users? Are you, for example, only able to update from one user? Or only as Administrator users? Or something like that?
Having said that I encounter this issue on security and release updates
Could you elaborate on what you mean by this? How are you determining what updates are security updates? What do you mean by "release updates"?
Do you often have to enter your password to update? This is supposed to only happen once, after which it should change the permissions to allow it to update without needing a password.
Could you check the owner/group and permissions of installation for me? You can do this by opening the "Terminal" app and running ls -ld on the installation directory. For example:
> ls -ld /Applications/Firefox.app
username admin drwxrwx--- Firefox.app
| Reporter | ||
Comment 9•4 years ago
|
||
(In reply to Kirk Steuber (he/him) [:bytesized] from comment #8)
not sure how relevant these are as issue was encountered few days back and since than I have downloaded latest dmg and installed.
Hmm. These logs show a successful update. Have you been able to update successfully since you downloaded the latest dmg? You can check via the "Update History" button in the "Update" section of
about:preferences.
Yes. Any subsequent updates that doesn't require credentials are successful
Typically, permission issues like this only happen in multi-user setups. Are you using multiple macOS users on this computer? If so, could you tell me about any differences in the update process between different users? Are you, for example, only able to update from one user? Or only as Administrator users? Or something like that?
Yes there are multiple accounts but those are rarely used and haven't tried updates there. This issue is seen with Administrator user.
Having said that I encounter this issue on security and release updates
Could you elaborate on what you mean by this? How are you determining what updates are security updates? What do you mean by "release updates"?
By security updates I mean one that needs credentials (please see attached dialog in #comment 2 - A security and stability update has been downloaded for Nightly...). Not sure if its just messaging but issue is seen in flow that prompts this dialog.
By Release updates I was alluding to Firefox release upgrades which can be a coincidence if 'security and stability update' are rolled out with new Firefox version
Do you often have to enter your password to update? This is supposed to only happen once, after which it should change the permissions to allow it to update without needing a password.
Yes, prompt to get administrative privileges is shown every time after dialog in #comment 2
Could you check the owner/group and permissions of installation for me? You can do this by opening the "Terminal" app and running
ls -ldon the installation directory. For example:> ls -ld /Applications/Firefox.app username admin drwxrwx--- Firefox.app
I have Nightyl, beta and Release version in Application folder, attaching result of running ls -ld on all
drwxrwxr-x 3 punamdahiya admin 96 Dec 8 11:00 /Applications/Firefox.app
drwxrwxr-x@ 3 punamdahiya admin 96 Jan 4 11:09 /Applications/Firefox-beta.app
drwxrwxr-x@ 3 punamdahiya admin 96 Jan 4 16:03 /Applications/Firefox Nightly.app
Comment 10•4 years ago
•
|
||
(In reply to Punam Dahiya [:pdahiya] from comment #9)
Yes there are multiple accounts but those are rarely used and haven't tried updates there. This issue is seen with Administrator user.
Is the issue ever seen by the user that installed Firefox? Or by different Admin users?
By security updates I mean one that needs credentials (please see attached dialog in #comment 2 - A security and stability update has been downloaded for Nightly...). Not sure if its just messaging but issue is seen in flow that prompts this dialog.
Yeah, this is just a messaging thing. I believe that dialog (with that text) will be shown any time we cannot update Firefox with the current permissions and, thus, need to ask for a password in order to update.
Do you often have to enter your password to update? This is supposed to only happen once, after which it should change the permissions to allow it to update without needing a password.
Yes, prompt to get administrative privileges is shown every time after dialog in #comment 2
How often does that happen? This should really only happen once per installation. Installing usually sets the permissions such that we cannot update. When we encounter this problem, we change them so that future updates are successful. If it's happening more often, that sounds like a separate bug that I would like to get to the bottom of.
drwxrwxr-x 3 punamdahiya admin 96 Dec 8 11:00 /Applications/Firefox.app
drwxrwxr-x@ 3 punamdahiya admin 96 Jan 4 11:09 /Applications/Firefox-beta.app
drwxrwxr-x@ 3 punamdahiya admin 96 Jan 4 16:03 /Applications/Firefox Nightly.app
These permissions look correct to me.
I'm still not sure why updates would be failing if you are giving the right password to update. Hopefully the next time this happens, the update logs will give us more information about this.
| Reporter | ||
Comment 11•4 years ago
•
|
||
(In reply to Kirk Steuber (he/him) [:bytesized] from comment #10)
(In reply to Punam Dahiya [:pdahiya] from comment #9)
Yes there are multiple accounts but those are rarely used and haven't tried updates there. This issue is seen with Administrator user.
Is the issue ever seen by the user that installed Firefox? Or by different Admin users?
Just have one admin user and that's the Administrator user that installed Firefox
By security updates I mean one that needs credentials (please see attached dialog in #comment 2 - A security and stability update has been downloaded for Nightly...). Not sure if its just messaging but issue is seen in flow that prompts this dialog.
Yeah, this is just a messaging thing. I believe that dialog (with that text) will be shown any time we cannot update Firefox with the current permissions and, thus, need to ask for a password in order to update.
Do you often have to enter your password to update? This is supposed to only happen once, after which it should change the permissions to allow it to update without needing a password.
Yes, prompt to get administrative privileges is shown every time after dialog in #comment 2
How often does that happen? This should really only happen once per installation. Installing usually sets the permissions such that we cannot update. When we encounter this problem, we change them so that future updates are successful. If it's happening more often, that sounds like a separate bug that I would like to get to the bottom of.
I noted multiple iteration in original description of bug. It's definitely more than once and ends with door hangar prompt with message 'Nightly couldn't update automatically , download Nightly to update', with Download CTA in door hangar taking user to https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly
drwxrwxr-x 3 punamdahiya admin 96 Dec 8 11:00 /Applications/Firefox.app
drwxrwxr-x@ 3 punamdahiya admin 96 Jan 4 11:09 /Applications/Firefox-beta.app
drwxrwxr-x@ 3 punamdahiya admin 96 Jan 4 16:03 /Applications/Firefox Nightly.appThese permissions look correct to me.
I'm still not sure why updates would be failing if you are giving the right password to update. Hopefully the next time this happens, the update logs will give us more information about this.
WIll keep an eye on this issue and attach update logs next time it happens. Thanks
Comment 12•4 years ago
|
||
(In reply to Punam Dahiya [:pdahiya] from comment #11)
Just have one admin user and that's the Administrator user that installed Firefox
Oh. That is very unexpected. You really shouldn't ever get the UI that you screencapped in Comment 2 and Comment 3 from the user that installed Firefox. I'm very curious how that could have happened. That potentially points to something a bit different being wrong. When this does happen again, in addition to the update logs, I would like it if you could get me the permissions of the install directory, the same way you did before with the ls -ld command.
Also, there is some other information that would be helpful to collect at that point. When the problem happens, could you do two things? First, open about:config and set devtools.chrome.enabled and app.update.log both to true. Then, open Firefox's Browser Console (Hamburger Menu -> More Tools -> Browser Console) and run this:
Cc["@mozilla.org/updates/update-service;1"].getService(Ci.nsIApplicationUpdateService).elevationRequired
This should return true or false (presumably true, in your situation), and it should produce some log messages that start with *** AUS:SVC. It might help to figure out what's wrong to know what it returns and what log messages it produces.
Comment 13•4 years ago
|
||
Hi Kirk,
I mentioned to Punam that I was experiencing this issue too, and she pointed me here! Hopefully I have some useful logs for you. (This is currently happening with the update to 96.0.2 from 96.0.1. It's happened once or twice before, and I've fixed it by manually downloading & installing the new build, and then moving my profile over. I've held off on doing that this time so hopefully we get some good data!)
I have only a single user on my machine (which is the Administrator) and one release copy of Firefox. My permissions look like this:
drwxrwxr-x@ 3 emcminn admin 96 14 Jan 15:47 /Applications/Firefox.app
The logs returned from running the elevationRequired command above look like this:
AUS:SVC getElevationRequired - recursively testing write access on /var/folders/1d/bqbj7_vd3k9crjw2t3f2vjpc0000gn/T/AppTranslocation/A71C7890-7EEB-4F2A-B442-D6917ABE6510/d/Firefox.app
AUS:SVC getElevationRequired - unable to write to application bundle, elevation required. Exception: [Exception... "Component returned failure code: 0x80520013 (NS_ERROR_FILE_READ_ONLY) [nsIFile.isWritable]" nsresult: "0x80520013 (NS_ERROR_FILE_READ_ONLY)" location: "JS frame :: resource://gre/modules/UpdateService.jsm :: getElevationRequired :: line 684" data: no]
true
I've also attached my update logs; let me know if I can do anything else to help!
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
| Reporter | ||
Comment 16•4 years ago
|
||
@bytesized I tried nightly update today but I straight away got the prompt 'Nightly couldn't update automatically , download Nightly to update' and had to manually download and install. Attaching screenshot , gist with browser console logs when download manually doorhanger was shown, result of elevation required (which is false) and ls-ld result .
Cc["@mozilla.org/updates/update-service;1"].getService(Ci.nsIApplicationUpdateService).elevationRequired
AUS:SVC getElevationRequired - recursively testing write access on /Applications/Firefox Nightly.app
AUS:SVC getElevationRequired - able to write to application bundle, elevation not required
false
https://gist.github.com/punamdahiya/0150046e9aaeca9191fee8646207a8b1
ls -ld '/Applications/Firefox Nightly.app'
drwxr-xr-x@ 3 punamdahiya admin 96 Jan 24 03:24 /Applications/Firefox Nightly.app
| Reporter | ||
Comment 17•4 years ago
|
||
Comment 18•4 years ago
|
||
(In reply to Emily McMinn :emcminn from comment #13)
Hi Kirk,
I mentioned to Punam that I was experiencing this issue too, and she pointed me here! Hopefully I have some useful logs for you. (This is currently happening with the update to 96.0.2 from 96.0.1. It's happened once or twice before, and I've fixed it by manually downloading & installing the new build, and then moving my profile over. I've held off on doing that this time so hopefully we get some good data!)
I have only a single user on my machine (which is the Administrator) and one release copy of Firefox. My permissions look like this:
drwxrwxr-x@ 3 emcminn admin 96 14 Jan 15:47 /Applications/Firefox.app
The logs returned from running the
elevationRequiredcommand above look like this:AUS:SVC getElevationRequired - recursively testing write access on /var/folders/1d/bqbj7_vd3k9crjw2t3f2vjpc0000gn/T/AppTranslocation/A71C7890-7EEB-4F2A-B442-D6917ABE6510/d/Firefox.app AUS:SVC getElevationRequired - unable to write to application bundle, elevation required. Exception: [Exception... "Component returned failure code: 0x80520013 (NS_ERROR_FILE_READ_ONLY) [nsIFile.isWritable]" nsresult: "0x80520013 (NS_ERROR_FILE_READ_ONLY)" location: "JS frame :: resource://gre/modules/UpdateService.jsm :: getElevationRequired :: line 684" data: no] true
What in the freaking world? I assume that you are running Firefox from /Applications/Firefox.app, since that is where you checked the permissions. But the updater seems to be instead checking the permissions of /var/folders/1d/bqbj7_vd3k9crjw2t3f2vjpc0000gn/T/AppTranslocation/A71C7890-7EEB-4F2A-B442-D6917ABE6510/d/Firefox.app? I have no idea what is going on there. Maybe that's what the path looks like if you run Firefox directly out of the DMG installer? I really couldn't say.
@emcminn - Could you tell me about how you normally launch Firefox? From the dock? From the "Applications" directory? From Spotlight Search? From somewhere else? You aren't running Firefox from within the installer, are you? (ex: Open the installer so it shows a window with an arrow pointing from the Firefox icon to the "Applications" directory, and launching Firefox from that icon rather than from the installed version in "Applications")
@spohl - I don't suppose you can shed any light on that weird path? I certainly don't get that on my local machine when I run that command (Comment 12).
Comment 19•4 years ago
|
||
(In reply to Punam Dahiya [:pdahiya] from comment #16)
@bytesized I tried nightly update today but I straight away got the prompt 'Nightly couldn't update automatically , download Nightly to update' and had to manually download and install.
This is a separate problem. I don't want to start trying to figure out two different problems in the same bug, especially since someone else is now reporting it too. Could you please file a new bug for this? When you do that, could you please include a browser console log? This is how to collect one:
- Navigate to
about:config. - Set
app.update.logtotrue. - Open the Browser Console either with the hotkey Control+Shift+J (Command+Shift+J on macOS), or via Hamburger Menu->More Tools->Browser Console
- In the Filter textbox at the top, enter
AUS:SVCto filter out everything except the update messages. - Navigate to the "Update" section of
about:preferences. It should automatically check for an update. - Once the update check has completed, copy the messages out of the Browser Console and attach them to the bug.
Comment 20•4 years ago
•
|
||
@bytesized, I usually open Firefox from my dock, and as far as I can see that shortcut is correctly leading to the applications folder (i.e when I use "show in Finder"). The Program in the applications folder has the path that I would expect: Macintosh HD > Applications > Firefox.app
Running Firefox directly from applications opens a new window (instead of switching to my already-open one, which is maybe a bit weird?) but checking about:profiles the profile is the correct one and running elevationRequired again gets me the same result.
I've also now got this error in my browser console:
BackgroundUpdate: _reasonsToNotScheduleUpdates: Failed to check for Maintenance Service Registry Key: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIUpdateProcessor.getServiceRegKeyExists]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: resource://gre/modules/BackgroundUpdate.jsm :: _reasonsToNotScheduleUpdates :: line 243" data: no]
out of curiosity, I tried running the update again with the console open and logging enabled, and I got:
AUS:SVC RestartOnLastWindowClosed.#maybeEnableOrDisable - Enabling
AUS:SVC RestartOnLastWindowClosed.#onLastWindowClose - Last window closed. Starting restart timer
AUS:SVC Creating UpdateService
AUS:SVC Logging current UpdateService status:
AUS:SVC UpdateService.canUsuallyCheckForUpdates - able to check for updates
AUS:SVC UpdateService.canCheckForUpdates - able to check for updates
DEPRECATION WARNING: Calling FileUtils.getDir(..., ..., true) causes main thread I/O and should be avoided especially during startup/shutdown
You may find more details about this deprecation at: https://bugzilla.mozilla.org/show_bug.cgi?id=921157
resource://gre/modules/FileUtils.jsm 70 FileUtils_getDir
resource://gre/modules/UpdateService.jsm 1025 getUpdateDirCreate
resource://gre/modules/UpdateService.jsm 1064 getUpdateFile
resource://gre/modules/UpdateService.jsm 739 getCanApplyUpdates
resource://gre/modules/UpdateService.jsm 3815 get canUsuallyApplyUpdates
resource://gre/modules/UpdateService.jsm 3823 get canApplyUpdates
resource://gre/modules/UpdateService.jsm 4043 AUS__logStatus
resource://gre/modules/UpdateService.jsm 2572 UpdateService
resource://gre/modules/UpdateServiceStub.jsm 104 UpdateServiceStub
Deprecated.jsm:86
AUS:SVC getCanApplyUpdates - testing write access /Users/emcminn/Library/Caches/Mozilla/updates/var/folders/1d/bqbj7_vd3k9crjw2t3f2vjpc0000gn/T/AppTranslocation/A71C7890-7EEB-4F2A-B442-D6917ABE6510/d/Firefox/update.test
AUS:SVC getCanApplyUpdates - bypass the write since elevation can be used on Mac OS X
AUS:SVC getElevationRequired - recursively testing write access on /var/folders/1d/bqbj7_vd3k9crjw2t3f2vjpc0000gn/T/AppTranslocation/A71C7890-7EEB-4F2A-B442-D6917ABE6510/d/Firefox.app
AUS:SVC getElevationRequired - unable to write to application bundle, elevation required. Exception: [Exception... "Component returned failure code: 0x80520013 (NS_ERROR_FILE_READ_ONLY) [nsIFile.isWritable]" nsresult: "0x80520013 (NS_ERROR_FILE_READ_ONLY)" location: "JS frame :: resource://gre/modules/UpdateService.jsm :: getElevationRequired :: line 684" data: no]
AUS:SVC gCanStageUpdatesSession - unable to stage updates because elevation is required.
AUS:SVC getElevationRequired - recursively testing write access on /var/folders/1d/bqbj7_vd3k9crjw2t3f2vjpc0000gn/T/AppTranslocation/A71C7890-7EEB-4F2A-B442-D6917ABE6510/d/Firefox.app
AUS:SVC getElevationRequired - unable to write to application bundle, elevation required. Exception: [Exception... "Component returned failure code: 0x80520013 (NS_ERROR_FILE_READ_ONLY) [nsIFile.isWritable]" nsresult: "0x80520013 (NS_ERROR_FILE_READ_ONLY)" location: "JS frame :: resource://gre/modules/UpdateService.jsm :: getElevationRequired :: line 684" data: no]
AUS:SVC Elevation required: true
AUS:SVC Other instance of the application currently running: false
AUS:SVC Downloading: false
AUS:SVC End of UpdateService status
I'm seeing that weird path in there a lot, so maybe you're on to something there!
EDIT:
I looked up AppTranslocation on a hunch, and it turns out it's a security feature introduced in MacOS Sierra. Long story short, if you install an application directly to the applications folder and then never move it, MacOS helpfully randomizes the path every time you open the application. Which breaks auto-updating (on purpose?!?). See here: https://wiki.keyboardmaestro.com/assistance/Translocation_Problem
I'm going to try the fix steps and report back. IT WORKED. Had to log back in to sync & re-enable my profile after moving the application, but the update ran correctly with no permissions needed.
| Assignee | ||
Comment 21•4 years ago
|
||
(In reply to Emily McMinn :emcminn from comment #20)
@bytesized, I usually open Firefox from my dock, and as far as I can see that shortcut is correctly leading to the applications folder (i.e when I use "show in Finder"). The Program in the applications folder has the path that I would expect: Macintosh HD > Applications > Firefox.app
Running Firefox directly from applications opens a new window (instead of switching to my already-open one, which is maybe a bit weird?) but checking about:profiles the profile is the correct one and running elevationRequired again gets me the same result.
It is likely that in this case, Firefox was dragged from the .dmg directly into the Dock, rather than into the Applications directory. When that's the case, the shortcut in the Dock will actually mount the .dmg and run Firefox from inside the .dmg.
[...}
EDIT:
I looked up AppTranslocation on a hunch, and it turns out it's a security feature introduced in MacOS Sierra. Long story short, if you install an application directly to the applications folder and then never move it, MacOS helpfully randomizes the path every time you open the application. Which breaks auto-updating (on purpose?!?). See here: https://wiki.keyboardmaestro.com/assistance/Translocation_Problem
I'm going to try the fix steps and report back.IT WORKED. Had to log back in to sync & re-enable my profile after moving the application, but the update ran correctly with no permissions needed.
This is another indication that this is probably what happened here: Dragging Firefox from the .dmg to the Dock will only create a shortcut to the app inside the .dmg, not actually move the application. By dragging Firefox to the /Applications directory, you actually perform the "move" operation that is required to do away with AppTranslocation.
If you ever encounter this again, when Firefox is running, launch Activity Monitor, highlight Firefox and select the (i) button ("Inspect selected process"). Under "Open Files and Ports", one of the first entries in the list should read "/Applications/Firefox.app/Contents/MacOS/firefox". If it points to a subdirectory of /var/folders/, check if you have a .dmg for Firefox mounted. Unmounting it will probably not work while Firefox is running. And closing Firefox, unmounting the .dmg and then running Firefox again by clicking on the icon in the Dock will most likely re-mount the .dmg.
We have added an option to properly install Firefox for users who encounter this issue in bug 1732969, but not everyone may have updated to this version yet (and not everyone might choose to properly install Firefox).
Comment 22•4 years ago
|
||
Hi @spohl;
Thanks! As a heads up, I'm almost 100% sure that I would have dragged the .dmg to the applications folder and not the dock during install, since I was aware of (some of) the issues around running straight from the .dmg (mostly with profiles.) I would normally drag the .dmg to applications when prompted, and then pin Firefox to the dock through settings. It's possible that I goofed, but I wanted to flag that just in case :)
Comment 23•4 years ago
|
||
@pdahiya You should probably try the instructions from Comment 21 to see if this might be the cause of your problem too.
| Reporter | ||
Comment 24•4 years ago
|
||
@bytesized on my machine, Firefox Nightly in activity montior points to /Applications/Firefox Nightly.app and not seem to be loaded from .dmg. I will keep an eye and update bug with findings next time I get recursive permission prompt on update. Thanks
Comment 25•4 years ago
|
||
Has this problem happened again? Were you able to get the update logs and check where activity monitor says that Firefox is located?
| Reporter | ||
Comment 26•4 years ago
|
||
hi @bytesized this problem hasn't happened since, I have tried updates periodically but haven't seen permission prompt asking to enter password for any of those updates. Its on my radar and attach logs next time it happens. Thanks
Comment 27•4 years ago
|
||
I'm going to close this for now. We'll reopen it if the problem happens again.
| Reporter | ||
Comment 28•4 years ago
|
||
@bytesized reopening this issue as I was able to encounter this issue while trying to update for 100.0a1. Attaching to bug browser console logs that were captured with app.update.log as true
- Running below script in browser console
Cc["@mozilla.org/updates/update-service;1"].getService(Ci.nsIApplicationUpdateService).elevationRequired
AUS:SVC getElevationRequired - recursively testing write access on /var/folders/38/m3k221j519sd9d57387ck35m0000gn/T/AppTranslocation/38A581AD-1BF1-4466-906D-12358B22C8A0/d/Firefox Nightly.app
AUS:SVC getElevationRequired - unable to write to application bundle, elevation required. Exception: [Exception... "Component returned failure code: 0x80520013 (NS_ERROR_FILE_READ_ONLY) [nsIFile.isWritable]" nsresult: "0x80520013 (NS_ERROR_FILE_READ_ONLY)" location: "JS frame :: resource://gre/modules/UpdateService.jsm :: getElevationRequired :: line 677" data: no]
true
Annother error seen in browser console:
BackgroundUpdate: _reasonsToNotScheduleUpdates: Failed to check for Maintenance Service Registry Key: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIUpdateProcessor.getServiceRegKeyExists]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: resource://gre/modules/BackgroundUpdate.jsm :: _reasonsToNotScheduleUpdates :: line 241" data: no] BackgroundUpdate.jsm:243
1647025608893 addons.productaddons WARN Unexpected invalid content signature found during validation
UTM:SVC TimerManager:registerTimer - timerID: telemetry_modules_ping interval: 604800 skipFirst: true
Activity monitor shows Firefox Nightly as
/private/var/folders/38/m3k221j519sd9d57387ck35m0000gn/T/AppTranslocation/38A581AD-1BF1-4466-906D-12358B22C8A0/d/Firefox Nightly.app/Contents/MacOS/firefox
ls -ld '/Applications/Firefox Nightly.app'
drwxrwxr-x@ 3 punamdahiya admin 96 Mar 9 16:52 /Applications/Firefox Nightly.app
ls -ld '/private/var/folders/38/m3k221j519sd9d57387ck35m0000gn/T/AppTranslocation/38A581AD-1BF1-4466-906D-12358B22C8A0/d/Firefox Nightly.app'
drwxrwxr-x@ 3 punamdahiya admin 96 Mar 9 16:52 /private/var/folders/38/m3k221j519sd9d57387ck35m0000gn/T/AppTranslocation/38A581AD-1BF1-4466-906D-12358B22C8A0/d/Firefox Nightly.app
about:support -> last-update.log
PATCH DIRECTORY /Users/punamdahiya/Library/Caches/Mozilla/updates/var/folders/38/m3k221j519sd9d57387ck35m0000gn/T/AppTranslocation/38A581AD-1BF1-4466-906D-12358B22C8A0/d/Firefox Nightly/updates/0
INSTALLATION DIRECTORY /var/folders/38/m3k221j519sd9d57387ck35m0000gn/T/AppTranslocation/38A581AD-1BF1-4466-906D-12358B22C8A0/d/Firefox Nightly.app
WORKING DIRECTORY /var/folders/38/m3k221j519sd9d57387ck35m0000gn/T/AppTranslocation/38A581AD-1BF1-4466-906D-12358B22C8A0/d/Firefox Nightly.app
It seems very much like the issue faced by @emcminn around AppTranslocation but I don't see Firefox dmg file mounted. Happy to zoom and screen share if that helps. Thanks!
| Reporter | ||
Comment 29•4 years ago
|
||
| Reporter | ||
Updated•4 years ago
|
| Reporter | ||
Updated•4 years ago
|
Comment 30•4 years ago
•
|
||
I'm also seeing the app translocation issue come up again, updating release from 97 to 98. Trying to update puts the installer in a loop of asking for a password, restarting Firefox, and then asking for the password again. Looking at processes in activity monitor shows the translocated path (definitely running from Firefox.app in applications, not the .dmg).
EDIT: I've solved this (temporarily) by moving Firefox out of applications onto my desktop; the path is no longer translocated and the installer runs without issue. It kinda seems like the initial move from Downloads ~> Applications during install is no longer enough to stop app translocation from happening?
Comment 31•4 years ago
|
||
(In reply to Punam Dahiya [:pdahiya] from comment #28)
Activity monitor shows Firefox Nightly as
/private/var/folders/38/m3k221j519sd9d57387ck35m0000gn/T/AppTranslocation/38A581AD-1BF1-4466-906D-12358B22C8A0/d/Firefox Nightly.app/Contents/MacOS/firefox
...
I don't see Firefox dmg file mounted
Well it looks to me like this is not due to some "improper installation" problem.
Some monkeying around and I was able to reproduce this. This is what I did:
- Download the DMG for Firefox 96.0.
- Open the DMG so that it mounts.
- In the Terminal, run
cp -r /Volumes/Firefox/Firefox.app /Applications/(This must be done in the Terminal. Apparently doing it in the Finder handles things differently, for some reason). - Unmount the DMG.
- Run Firefox out of
/Applications. - Verify in Activity Monitor that I am running out of the
AppTranslocationdirectory. - Attempt to update. Experience the problems described in this bug.
So, a couple of questions:
- @pdahiya @emcminn - Is Firefox installed to the Applications directory? If not, where did you install it to? Do you remember how you installed?
- @spohl - It looks to me like we are getting bitten by "Gatekeeper Path Randomization". Do you know anything about it? It seems like we should do something about this, but I don't really know what. Any ideas?
| Reporter | ||
Comment 32•4 years ago
|
||
- @pdahiya @emcminn - Is Firefox installed to the Applications directory? If not, where did you install it to? Do you remember how you installed?
Glad to see you are able to replicate, yes Firefox is installed to the Applications directory on my local
Comment 33•4 years ago
|
||
(In reply to Punam Dahiya [:pdahiya] from comment #32)
- @pdahiya @emcminn - Is Firefox installed to the Applications directory? If not, where did you install it to? Do you remember how you installed?
Glad to see you are able to replicate, yes Firefox is installed to the Applications directory on my local
Same for me; Firefox is installed to Applications through the regular installer (not the terminal).
Comment 34•4 years ago
|
||
I found this, which might be related:
You can bypass path randomization by code signing your disk image before you distribute it. When launching an app from a code-signed disk image, Gatekeeper disables path randomization because all the contents of the disk image are covered by a code signature.
(source)
The use of the phrase "When launching an app from a code-signed disk image" makes me think that this may not be related problems when the app is installed properly. I'm not really sure.
| Assignee | ||
Comment 35•4 years ago
|
||
I may have a possible approach here, but will need to explore this locally first. Thanks for providing the steps to reproduce in comment 31. Leaving n-i set for now.
| Assignee | ||
Comment 36•4 years ago
|
||
Updated•4 years ago
|
| Assignee | ||
Comment 37•4 years ago
|
||
If you still have Firefox installed the way you had before when you ran into this issue, could you please run the following command in a Terminal window and post the output here? Thanks!
xattr -l '/Applications/Firefox Nightly.app'
Comment 38•4 years ago
•
|
||
@spohl here you go!
emcminn@MacBook-Pro ~ % xattr -l '/Applications/Firefox.app'
com.apple.quarantine: 01c1;00000000;Firefox;150FA0FA-7E7A-4839-BC66-BA499D24B802
I should note that this is the same installation that I was able to update by moving it out of Applications onto the desktop; I had to move it back to Applications later and it looks like doing so put it back into app translocation/quarantine mode.
| Assignee | ||
Comment 39•4 years ago
•
|
||
Thank you! A few more questions:
- Is this with a standard or admin user account?
- Are you able to remove the quarantine bit with the following command, or does it print out an error?
xattr -d com.apple.quarantine '/Applications/Firefox.app' - After the step above, what does
xattr -l '/Applications/Firefox.app'print out now? - How did you move the app to your desktop, and later back to /Applications? Was that simply by dragging and dropping the app, or did you move it via Terminal for example?
Comment 40•4 years ago
•
|
||
Hi @spohl,
This is with an admin account; I tried running the -d command and got no errors and running xattr -l '/Applications/Firefox.app' now gives no output. Checking processes in activity monitor shows a non-translocated filename for Firefox, so that may have done the trick! :)
When moving the app from Applications to desktop (and then back) I used cmd& drag and drop; according to some docs I've read using the terminal won't remove the translocation; so I never tried that.
| Assignee | ||
Comment 41•4 years ago
|
||
Okay, thank you for confirming. This does prove that we are dealing with a quarantine bit that is set on the .app bundle. My patch fixes this. The only thing we haven't been able to figure out is how this quarantine bit was set in the first place, or why it persists when it shouldn't. Hopefully, anyone running a newer build will have this situation fixed by the proposed patch and these edge-cases will disappear over time.
| Assignee | ||
Comment 42•4 years ago
|
||
| Assignee | ||
Comment 43•4 years ago
|
||
The telemetry patch also renews the Telemetry::ScalarID::STARTUP_IS_RUN_FROM_DMG probe until Firefox 108. This must have been accidentally missed in the renewal of these probes in bug 1755049. Please let me know if I need to submit a separate data review or renewal request for that probe.
Comment 44•4 years ago
|
||
Comment on attachment 9269475 [details]
data-review.txt
DATA COLLECTION REVIEW RESPONSE:
Is there or will there be documentation that describes the schema for the ultimate data set available publicly, complete and accurate?
Yes.
Is there a control mechanism that allows the user to turn the data collection on and off?
Yes. This collection is Telemetry so can be controlled through Firefox's Preferences.
If the request is for permanent data collection, is there someone who will monitor the data over time?
No. This collection will expire in Firefox 108.
Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?
Category 1, Technical.
Is the data collection request for default-on or default-off?
Default on for all channels.
Does the instrumentation include the addition of any new identifiers?
No.
Is the data collection covered by the existing Firefox privacy notice?
Yes.
Does the data collection use a third-party collection tool?
No.
Result: datareview+
Comment 45•4 years ago
|
||
Comment 46•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/dc56791020ce
https://hg.mozilla.org/mozilla-central/rev/ddc39679d0cd
Updated•4 years ago
|
| Assignee | ||
Comment 47•4 years ago
|
||
A SQL query for whether or not Firefox is running from an app translocated location shows virtually no users in this situation. It appears that our mitigations are working as intended:
https://sql.telemetry.mozilla.org/queries/85922/source#212749
| Reporter | ||
Comment 48•4 years ago
|
||
(In reply to Stephen A Pohl [:spohl] from comment #47)
A SQL query for whether or not Firefox is running from an app translocated location shows virtually no users in this situation. It appears that our mitigations are working as intended:
https://sql.telemetry.mozilla.org/queries/85922/source#212749
That's great! Thank you all for helping address and followup monitoring of this issue.
I managed to reproduce the issue using the STR from comment 31 on macOS 11 on Firefox 96.0(20220106144528). Verified as fixed on Firefox 101.0b1 - updated to 101.0b7 - and Nightly 102.0a1 -updated from 101.0a1, a 2022-05-01 build- on macOS 11, Win10 64-bits and Ubuntu 20.04. Updates work accordingly.
Description
•