Closed Bug 1574139 Opened 1 year ago Closed 4 months ago

Firefox bounces in Dock once and won't open

Categories

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

68 Branch
Unspecified
macOS
defect

Tracking

()

VERIFIED FIXED
mozilla77
Tracking Status
firefox-esr68 --- verified
firefox75 --- wontfix
firefox76 --- verified
firefox77 --- verified

People

(Reporter: yoitserniet, Assigned: spohl)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15

Steps to reproduce:

Have tried uninstalling and reinstalling, deleting all related folders in Application Support, tried changing profiles/deleting profiles, nothing works. No crash report dialogue shows up, nothing.

Actual results:

When I try to start Firefox it bounces in the Dock once, and then closes. Safe mode starts won't work either. It's as if it's trying to start but something is preventing it. This problem started like a week ago.

Expected results:

I expected Firefox to start and run normally.

Hi Ernest,

Thank you for your report.

I tried reproducing it by installing the latest Firefox Release version 68.0.2, and the latest Nightly version 70.0a1 (2019-08-20) using Mac OSX 10.14 but I was unable to see the behavior reported.

Can you please give us more information about this issue? We'd need the exact firefox version you are installing (if it's release, beta, devedition, nightly?), and any other configuration you consider relevant for our investigation. It will also help a lot if you can attach a screen recording of the issue to this ticket.

Also, please download the latest Nightly version and confirm if you are able to install and run it correctly. You can download Nightly from here: nightly.mozilla.org

In the meantime, I'll add a product and component so the corresponding team can take a look at this.

Regards,

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core
Flags: needinfo?(yoitserniet)

Hey Virgina,

Thanks for getting back to me! So, I actually just installed the current Nightly (69.0b15) and it works perfectly! I had been using 68.0.1 release and that was experiencing the issue. I'll keep using the Nightly and see how things go. Here's as much info as I can give of the problem, in the hopes that it's helpful:

Whenever I launched Firefox, it would bounce in the dock once, and then close. No window would open or anything. Couldn't open safe mode or anything.

I had previously installed the Myki password manager extension, deleted the Mac app a week or two later, but left the Firefox extension installed. I'm not sure, but there may have been a connection there? I believe the issue I was experiencing did start sometime after I deleted the Mac app.

If the issue comes up again I'll be sure to attach a screen recording, but everything seems to be working and I can't duplicate the issue.

Thanks for your help!
Ernest

Flags: needinfo?(yoitserniet)

Hey Ernest,

Thanks for your feedback and I'm glad issue was solved!

If this issue is no longer reproducible in Nightly 69, when Release version reaches the Nightly version (69) this issue will be fixed. Firefox Release version is expected to ship on 2019-09-03, as per the release calendar: https://wiki.mozilla.org/Release_Management/Calendar.

It would be a possibility that the password extension had something to do with the start of the Firefox app, or it could have been another issue. I'll mark this ticket as resolved, but if you see this issue happening again, please try to document all the steps, configurations and if possible send us a screen recording as well, so we can better investigate.

Cheers!

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

Hey!

So, after three days of Firefox working very well, it has started showing this issue again. It will not open normally or in safe mode. Again the current version is 69.0b15, and got three days of normal use out of it, and now the problem has resurfaced. I managed to get a screen recording so you can see what actually happens. This same behavior is shown if even if I go to my Applications folder and double-click. I had been using Firefox just last night with no issue whatsoever, and between then and now I haven't installed any new software or changed any configurations or settings on my computer.

I've attached the screen recording to the ticket here. Again I'm using macOS Mojave 10.14.4 on a MacBook Pro 15-inch from late 2015, with 2.5ghz Core i7 and 16GB of RAM with an SSD. Please let me know if you need anything else!

Attached video Bug.mov
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---

Hey, I marked this bug as open again because I'm now having it happen again. Bug.mov shows what I'm going through. The above message has more info. Thanks!

Hi team,

I'm unable to reproduce this issue on my end using Mac OSX10.14 - Nightly 70.0a1 and Release 68.0.2

Can you please review this on your end?

Thanks!

OS: Unspecified → macOS

Hey all,

I'm the reporter of the bug. Had an issue with the original account I posted the bug in.

Anyway, still happening at this point. The only other thing I can think of is I had the Myki extension installed a while back. I stopped using Myki, but didn't uninstall the extension. I uninstalled the Mac app, but l left the extension. Could that have caused the issue? Perhaps there's something there, maybe not. Thought I'd add it to the mix though.

Thanks!

I'll also add that since this is obviously happening with multiple versions, does it perhaps point to a related file issue that isn't in the actual Firefox application? Like a support file?

It sounds like Firefox is crashing on startup. Usually you'd see the Firefox crash reporter open when that happens, though. I'm not sure why the crash reporter doesn't open for you.

Joe, could you download a more recent Firefox Nightly from https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly and test again, please? (What you were using before was not a nightly, it was a Beta build, as evidenced by the "b" in "69.0b15". The two are different channels.)
If the problem still happens, could you try to do the following?

  1. Open Terminal.app.
  2. Start Firefox Nightly from the command line with the environment variable MOZ_CRASHREPORTER_DISABLE=1 set, by entering the following:
    MOZ_CRASHREPORTER_DISABLE=1 /Applications/Firefox\ Nightly.app/Contents/MacOS/firefox (including the backslash before the space in Firefox\ Nightly. Press Enter.
  3. If this brings up the Apple crash reporter, great! It may allow you to save a crash report to a text file. Please attach that text file to this bug.
    If this does not bring up the Apple crash reporter, we'll need to think of another way to make progress.

Hey Markus,

Thanks for getting back! So I downloaded the current nightly as of yesterday afternoon (71.0a1) and it got up and running fine. (I haven't had any Firefox installed on my computer for a week or so, in case that matters.)

I installed the LastPass extension, and browsed a few pages yesterday. now this morning, I was able to open Firefox, but noticed the LastPass extension was nowhere to be found. I tried to download it again, but couldn't, as Firefox thought it was still installed. However, it wasn't showing on the right side of the browser where it has in the past, nor was it offering to autofill passwords. So I closed Firefox thinking I'd try reopening it, but at that point it wouldn't reopen anymore. Just did the bouncing behavior I included in the video a while back.

So, I opened Terminal and copied your command from above verbatim, and it wouldn't work. I get an error saying:
"The patch directory path is not valid for this application (/Users/joe./Library/Caches/Mozilla/updates/Applications/Firefox Nightly/updates/0)"

Very strange. I'm not sure if when the behavior first started if I had the LastPass extension installed or not, but there obviously seemed to be an issue there right before Firefox started crashing. I can't explain why the Terminal command isn't working, however.

(In reply to Joe from comment #12)

So, I opened Terminal and copied your command from above verbatim, and it wouldn't work. I get an error saying:
"The patch directory path is not valid for this application (/Users/joe./Library/Caches/Mozilla/updates/Applications/Firefox Nightly/updates/0)"

Could you confirm what your username is? And is there a folder with a path that matches the one given above, or is it slightly different? I'm suspicious of the dot at the end of your username, but that might be a wrong lead.

Flags: needinfo?(santiso.joe)

Sure thing. My username on my computer is actually "joe." Hasn't been an issue in the past, however.

Flags: needinfo?(santiso.joe)

Also, there is a folder at the end of that chain there called "0".

Okay, and what is the install location of Firefox?

Flags: needinfo?(santiso.joe)

It's just in my Applications folder. Whatever the default is.

Flags: needinfo?(santiso.joe)

And you aren't running Firefox out of the .dmg package? There is "Firefox Nightly.app" in /Applications?

Flags: needinfo?(santiso.joe)

Yep, that's correct. It's Firefox Nightly.app!

Flags: needinfo?(santiso.joe)
Priority: -- → P2

This issue was there for at least a year or so. I suspect it has to do with installing different versions of Firefox on the same machine. Ever since I have installed Firefox Developer Edition a year ago, my Firefox stopped launching/updating. The error is:

The patch directory path is not valid for this application (/Users/<username>/Library/Caches/Mozilla/updates/Applications/Firefox/updates/0)

Removing Caches folder will make it possible to launch Firefox once:

rm -rf /Users/<username>/Library/Caches/Mozilla

But it won't help with updating the browser (within the browser it downloads the update, but clicking Restart Firefox won't do anything, after a manual restart it won't launch). If you want to update you need to download the update manually every time.

Really painful bug and I cannot seem to find a solution for this.

Niko, this worked!

Firefox opened once, but now it's back to doing it again.

Based on your message, it seems I'm going to have to delete the cache each time I want to open Firefox?

Can one of you list the directory where Firefox is installed (including the name of the Firefox app bundle) and then also submit the error with the path that isn't a valid patch directory?

Flags: needinfo?(santiso.joe)
Flags: needinfo?(nikoTM)

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

Hey Stephen,

I know I just have Firefox installed at the default directory.

I don't get an error saying the path isn't valid.

I've basically noticed that when Firefox downloads an update, it causes Firefox not to open anymore. Disabling automatic updates did the trick. It has something to do with automatic updates, and this folder on MacOS - /Users/<username>/Library/Caches/Mozilla

Not sure if there's more there. I'm able to use Firefox again, but I just manually download and install updates.

Flags: needinfo?(santiso.joe)

Thanks for your feedback. Is there anything unusual about your username? For example spaces, or special characters? Same question for the installation directory: Can you confirm that Firefox is at /Applications/Firefox.app? Or is the path different, possibly including spaces or other special characters?

Flags: needinfo?(santiso.joe)

Stephen, there is a . (dot) in my username. Firefox is at /Applications/Firefox.app

Flags: needinfo?(nikoTM)

(In reply to nikoTM from comment #26)

Stephen, there is a . (dot) in my username. Firefox is at /Applications/Firefox.app

Without necessarily revealing your own username, would you be able to post a username that matches yours when it comes to the location of the dot? For example, two characters before and three after the dot: aa.bbb? Is the dot at the beginning, middle or end of the username?

Flags: needinfo?(nikoTM)

(In reply to Stephen A Pohl [:spohl] from comment #27)

(In reply to nikoTM from comment #26)

Stephen, there is a . (dot) in my username. Firefox is at /Applications/Firefox.app

Without necessarily revealing your own username, would you be able to post a username that matches yours when it comes to the location of the dot? For example, two characters before and three after the dot: aa.bbb? Is the dot at the beginning, middle or end of the username?

username. so the dot is at the end

Flags: needinfo?(nikoTM)

Whoa. I have a dot in mine as well. "username."

Flags: needinfo?(santiso.joe)

Thank you! That's the info we needed. I'm working on a fix.

Assignee: nobody → spohl.mozilla.bugs
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: P2 → P1
Regressed by: CVE-2017-7766
Pushed by spohl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6bd0143bcec9
Fix an issue that prevented updates from completing if usernames contained a dot at the end of the username and general hardening of our file path verification. r=mhowell
Status: NEW → RESOLVED
Closed: 1 year ago4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77

Comment on attachment 9141779 [details]
Bug 1574139: Fix an issue that prevented updates from completing if usernames contained a dot at the end of the username and general hardening of our file path verification. r=mhowell

Beta/Release Uplift Approval Request

  • User impact if declined: Users with specific usernames, such as a dot at the end of their username, will be unable to update Firefox and Firefox will be unable to start without manual removal of a hard-to-find upgrade directory.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Since this addresses an issue when updating Firefox, at least two subsequent builds with this patch are required before verification of this fix is possible.
  1. Create a username with a dot at the end of it, such as testuser., and switch to it.
  2. Install a first build that has this fix.
  3. Open the about dialog to download an update and apply it.
  4. Verify that the new version starts.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a well-understood fix to address the way we verify valid file paths.
  • String changes made/needed: none

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Risk of update orphaning and possible drop in user numbers (although the number of affected users is believed to be small)
  • User impact if declined: Users with specific usernames, such as a dot at the end of their username, will be unable to update Firefox and Firefox will be unable to start without manual removal of a hard-to-find upgrade directory.
  • Fix Landed on Version: 77
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a well-understood fix to address the way we verify valid file paths.
  • String or UUID changes made by this patch: none
Attachment #9141779 - Flags: approval-mozilla-esr68?
Attachment #9141779 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Blocks: 1631586

Comment on attachment 9141779 [details]
Bug 1574139: Fix an issue that prevented updates from completing if usernames contained a dot at the end of the username and general hardening of our file path verification. r=mhowell

Fixes a situation which can leave macOS users unable to install updates. Approved for 76.0b8. Will revisit the ESR request after this has been verified on 76/77.

Attachment #9141779 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

I have succeeded in reproducing this issue on a Mac OS 10.12 on a freshly created Mac user with Nightly v77.0a1 from 2020-04-19. The issue appears to be that the update is stuck and is not being made. The fix appears to be valid because I have reinstalled a Nightly v77.0a1 from 2020-04-21 and the update was correctly made.

Considering that an update is is required in order to verify this fix, the next beta is needed in order to verify it. So the fix will be in v76.0b8 and it will be verified properly when the next beta is released.
Leaving NI to me to verify it when it's possible.

Flags: needinfo?(daniel.bodea)

This issue is also verified for the beta channel, by updating from Beta v76.0b8 to RC v76.0 on Mac 10.12.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Flags: needinfo?(daniel.bodea)

Comment on attachment 9141779 [details]
Bug 1574139: Fix an issue that prevented updates from completing if usernames contained a dot at the end of the username and general hardening of our file path verification. r=mhowell

Thanks for the verification. Approved for 68.8esr RC2.

Attachment #9141779 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+

This will only be verifiable when the next live version after the fixed one is also released. It is verified by updating it. Steps to verify are in the uplift request from comment 34. NI to myself to verify when possible.

Flags: needinfo?(daniel.bodea)

I have also verified this fix on with an update from ESR v68.8.0esr to ESR v68.9.0esr on a Mac OS 10.12 with a user profile named "testuser.".

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