Can't open Firefox because a copy of Firefox is already open
Here is what I did to fix the issue:
In OS X Terminal, find your currently used Firefox profile directory (something like):
$ cd ~/Library/Application\ Support/Firefox/Profiles/ $ ls -l
if you have multiple profiles, list the one with the most recent date
$ cd rAnd0m.default $ ls -la
remove the hidden parentlock file
$ rm -v .parentlock
try to start Firefox again
(If the problem was not related to the parentlock file, you will see:
rm: .parentlock: No such file or directory
)
If you prefer to use the Finder, just make hidden dot-files visible first, so you can check for the existence of .parentlock and delete it.
When I got this message I only had to kill the stray process, no lock was involved for me.
% ps -wwax | grep -i firefo
81106 ?? 711:45.58 /Applications/Firefox.app/Contents/MacOS/firefox -foreground
28986 ttys000 0:00.00 grep -i firefo
% kill 81106
Despite the process still being "secretly" alive, there was no Firefox visibile in the cmd-tab
task switcher, nor under the cmd-opt-esc
Force Quit dialog. Firefox was in this state after a crash/restart.
emma24xia's answer is for Windows and not applicable on a Mac. On a Mac you would do it this way.
Open up Applications/Utilities and launch Activity Monitor.
Look for Firefox in that list. Select it and click the stop-sign icon to force quit that process.