Fix for “Close Firefox: A copy of Firefox is already open.” error

“Close Firefox – A copy of Firefox is already open. Only one copy of Firefox can be open at a time.”
You may have gotten this message if Firefox has recently crashed or you killed the process. The reason this error is appearing is likely because there is a lock file on your Firefox profile.
The easiest fix to resolve this “Close Firefox” error message is to remove the lock file from your profile, here is how to do this:
* Open the Terminal, you will need to navigate to your FireFox profile directory:
cd ~/Library/Application\ Support/Firefox/Profiles/
Now there will be a randomly generated name in here attached with a .default extension, like aioruajc.default or groeakc.default, once you’re in the Firefox Profiles directory you can find out what the randomly generated name is by typing:
ls
then type the cd command with whatever the random .default directory name is:
cd alaklrac.default
Once inside the .default Profiles directory, you can remove the lock file:
rm -rf .parentlock
You should now be able to relaunch Firefox without the error message.
Note: an alternate method to get to the proper Firefox Profiles directory is to type the following command:
cd ~/Library/Application\ Support/Firefox/Profiles/*.default
The * is a wildcard and will enter whatever directory ends with .default, this only works if you are using a single Firefox profile though. You can then remove the .parentlock file and relaunch Firefox as usual.

Thank you
now I can run the beta vers of ff twice with Firefox
.
Ok tried this…I’m a total newbie on commands, so bear with me.
I’ve typed exactly as I see it, spaces, etc. but get “no such file’
I’m in Terminal, tried ” new command” or just inputting…
hmm, somewhere else someone suggested going to “Activity Monitor” application and quitting Firefox from there. and YES that worked!!!
fyi…
thanks phew
THANK YOU YOU’RE MY HERO!!!!
thanks! it worked.
this was SOOOOOO helpful thank you! i suddenly feel very smart!
Thank you very much, lleaning!
You saved me much time and aggravation. The Activity Monitor app was an easy way to fix the problem.
You deserve a cookie.
I am so happy that Im crying.
EXCELLENT, this worked. THanks
Thanks. For my installation the
~/Library/Application\ Support/Firefox/Profiles/*.default
location is
~/Library/Application\ Support/Firefox/*.default
Here my suggestion for a one line command
rm -i ~/Library/Application\ Support/Firefox/*.default/.parentlock
BRilliant, worked first time – many thanks
xec rm {} \;
brandw10:~ ajain2$ cd ~/Library/Application\ Support/Firefox/Profiles/
brandw10:Profiles ajain2$ ls
brandw10:Profiles ajain2$ cd alaklrac.default
-bash: cd: alaklrac.default: No such file or directory
NOT working.. what would i do …plzzz help.. tried everything….
If you read the description then you will find that ‘alaklrac.default’ is his own random file name, by the looks of things then ‘ajain2$.default’ is your random file name.
So in which case you would use the following commands :-
cd ~/Library/Application\ Support/Firefox/Profiles/
ls
cd ajain2$.default
rm -rf .parentlock
cd ~/Library/Application\ Support/Firefox/Profiles/*.default
and to those who used the Activity monitor to stop firefox, then wouldn’t a simple reboot stop the error appearing anyway?
After using this command I have found that no Mac (I work in a school) has had the same problem again.
nice solution description, worked perfectly and saved me a restart
. tnx!
I just deleted the Firefox App support folder. 10.7.4
Worked fine for me.
Great fix after a 7 hour nightmare…brilliant solution for 10.7.5
I love you!
Now if only I hadn’t already deleted FF and downloaded a newer version, I wouldn’t have to be making sure all my add-ons still work etc.
Thanks for this one!
See … this is why I love the internet. 1 minute from having the error, I found your instructions, corrected the issue and am running Firefox again.
THANKS!!!
Thanks a lot, this fix solved my problem
Thanks for this, FF was missing from activity monitor; this fixed the problem