14

I cannot start Firefox on my Mac. It just says "A copy of Firefox is already open. Only one copy of Firefox can be open at a time." I have tried restarting the computer. Any fixes?


You have suggested deleting the lock files in my profile, but, I don't have a profile. I was trying to fix the problem in question Firefox on Mac: Slow, slow, slow by deleting my profile, so I deleted it, and this came up. So I cannot delete the lock files because they don't exist.

1
  • 1
    This question got enough answers but I think this good to know too. On Mac, sometimes Firefox comes up with a red stripe that says something like "Your history and bookmarks will not be available because some other application is using them." When this happens you can't go backward/forward in your browser and it's really annoying. The solution is removing the file "places.sqlite.lock" in your Firefox profile directory. If you don't know how to locate your profile, read this: kb.mozillazine.org/Profile_folder#Where_is_my_profile_folder.3F
    – Saeed
    Aug 14, 2011 at 19:34

12 Answers 12

8

To remove .parentlock files you can run the following command in the Terminal:

rm -f ~/Library/Application\ Support/Firefox/.parentlock

(It's not in your profile)

However as said before, removing a .parentlock file won't help fix a stuck Firefox process.

6
  • 2
    This doesn't work, I think the file is in the profile (am I wrong?) Jul 20, 2009 at 17:02
  • On Mac OS X by default for Firefox it's not in the profile but in Firefox's Application Support folder.
    – Chealion
    Jul 20, 2009 at 18:41
  • I ended up deleting the whole Application Support/Firefox folder. There was no .parentlock file in it (I do have hidden files on), but still, deleting it made it come back up. Thanks, Jul 21, 2009 at 2:55
  • 2
    I just had to kill of FF and saw that the .parentlock file was located (for my system and profile) in the directory "~/Library/Application\ Support/Firefox/Profiles/8vaea85u.default/"
    – Peter M
    Jan 21, 2010 at 20:16
  • This has worked for me but after deleting file Firefox browser is hanging for 5 minutes, whenever I am accessing a new URL... So what could be the possible solution for that
    – Learner
    Jan 18, 2013 at 11:44
6

This kills all Firefox processes on Linux:

pgrep firefox | xargs kill -9
5

Firefox writes two lockfiles, if they are not deleted during shutdown you have to remove them manually. They are called lock and .parentlock and located in the profile folder.

MozillaZine has an article on how to do that on the Mac.

EDIT: On OS X only .parentlock exists, so it should be enough if you delete that file. The file will have 0 KB size, so you can delete it with no worry.

3
  • Where are these lockfiles located? Jul 20, 2009 at 5:55
  • Aha! I don't recollect such behavior on Unix/Windows.. Is this specific to OSX? If so, that will explain persistence across reboot.
    – nik
    Jul 20, 2009 at 5:56
  • @Isaac Waller: Updated the answer with a reference to an article that describes how to find the files on different platforms.
    – user1863
    Jul 22, 2009 at 16:16
3

Somehow the Firefox process is still running even after you close the program.

First, right click on the Firefox icon and try clicking Force Quit.

If that option is not there, press Option + Apple + Esc. This will bring up a list of running programs. Select Firefox and press Force Quit

If all else fails, type killall -9 firefox into the terminal. This should force the process to close, allowing you to start Firefox again.

1
  • I tried this all before posting the question - Firefox is not running. Jul 20, 2009 at 5:56
2

I had this issue on OS X v10.7 (Lion). Nothing showed with ps ax | grep firefox and deleting the lock files did nothing for me either. What did work however was launching Firefox via terminal with the profile manager and selecting a suitable profile:

/Applications/Firefox.app/Contents/MacOS/firefox -ProfileManager

It seems as if my default profile which Firefox was trying to open had been deleted. After selecting a different profile via the profile manager menu I was back up and running.

2

I solved the problem quickly by doing the following:

  1. Open the Activity Monitor App
  2. Then enter "Firefox" into the search field.
  3. Although Firefox was closed, it appeared in the Activity Monitor
  4. Select Firefox and force quit by clicking the cross symbol in the upper left corner.

After that I was abled to open Firefox again, without doing anything else.

1

I always label an old Firefox application as, say FireFox 3.6.17 in the applications folder prior to installing the newer version of Firefox. After that, I install the newer version and rename that application as, say FireFox 12.0.1.

That way, when you see the dialog box saying that another instance of Firefox is already open, pull up the Mac Dock at the bottom of your screen, and you'll see a second Firefox icon in the dock where there wasn't one before. Right-click on the older icon (if you hover the mouse over the icon, you'll see either "Firefox 3.6.17" or the newer one) and go through Options and deselect "Open at Login." Then force-quit the older application, and that icon will go away. Gone. Somehow, when you "threw" or removed the older icon from the dock after upgrading, it didn't change the login status of that icon and kept trying to run both versions of Firefox at login. Problem solved.

When you upgrade and label accordingly, ALWAYS turn off the Login status of the older icon before removing that icon and replacing it with the new one.

1

There is a command that combines the pgrep with kill, it's pkill. So:

pkill firefox
0

On OS X, if deleting the .parentlock or killing the process does not work, you may need to edit/delete the profiles.ini file. I encountered the problem while making multiple Firefox profiles and resolved the issue be deleting all but the default profile from the profiles.ini (not the profile dir). I think the cause in my case was the use_last_profile setting was enabled and the last used profile no longer existed (profile dir deleted).

0

If Firefox sees an active instance of itself when it starts, it skips creating another instance of itself with this error.

What do you mean by the statement, "I tried restarting"? Did you reboot and this still persists?

I am not familiar with OS X enough to comment further on its behavior.

0

The accepted answer will not work on current versions.

To be able to start Firefox remove the .parentlock files by running the following commands in the Terminal:

killall -9 firefox
find ~/Library/Application\ Support/Firefox -name ".parentlock" -exec rm {} \;

This will remove the .parentlock files from all Firefox profiles including the current one. Sometimes Firefox is still running in the background, therefore first kill the process, just in case.

-1

The lazy way to delete these lock files:

find ~/Library/Application\ Support/Firefox -name "*lock*" -exec rm {} \;

This will find and delete any file with "lock" in the name. See the man page for find for more information.

2
  • 4
    Don't do this at home, or try without -exec rm {} \; first, assuming you don't want to remove "adblockplus" and other useful files with "lock" in their names.
    – user124400
    Mar 23, 2012 at 9:54
  • The above command will likely delete many other unrelated files. Therefore just use the following: find ~/Library/Application\ Support/Firefox -name ".parentlock" -exec rm {} \;
    – ChrisW
    Aug 3, 2023 at 13:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .