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

May 16, 2010 - 23 Comments

close firefox already open
“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.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Manish Patel in Firefox, Troubleshooting

23 Comments

» Comments RSS Feed

  1. Testie says:

    Thank you ;) now I can run the beta vers of ff twice with Firefox ;).

  2. Ileaning says:

    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…

  3. RICKY1998 says:

    THANK YOU YOU’RE MY HERO!!!!

  4. gina says:

    thanks! it worked.

  5. nancy says:

    this was SOOOOOO helpful thank you! i suddenly feel very smart!

  6. Marcus Lisle says:

    Thank you very much, lleaning!

    You saved me much time and aggravation. The Activity Monitor app was an easy way to fix the problem.

  7. Haziq says:

    You deserve a cookie.

    I am so happy that Im crying.

    :DDDDDDDDD((((((((((((((

  8. Phil says:

    EXCELLENT, this worked. THanks

  9. Jörg says:

    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

  10. Jon says:

    BRilliant, worked first time – many thanks

  11. Adi says:

    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….

  12. Pricey says:

    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.

  13. schaulinsan says:

    nice solution description, worked perfectly and saved me a restart :). tnx!

  14. Foggy says:

    I just deleted the Firefox App support folder. 10.7.4
    Worked fine for me.

  15. hallelujah says:

    Great fix after a 7 hour nightmare…brilliant solution for 10.7.5

  16. Brett says:

    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.

  17. Jana says:

    Thanks for this one!

  18. Stephen King says:

    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!!!

  19. Luis Franco says:

    Thanks a lot, this fix solved my problem :)

  20. dg says:

    Thanks for this, FF was missing from activity monitor; this fixed the problem

  21. Jerry says:

    Thank you :D…

  22. Sujoy says:

    There could be more than one .default name generated. For me there were two. The first one did not work the second one was *.default 123456 (some number like that at the end). I used that and it worked.

    Did not understand the head or tail of it though, but glad it worked. Apple terminal is a pain in the neck. Thanks a lot anyway.

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates