13

I have multiple users on my MacBook (OS X 10.9.5). One of them has parential restrictions, but is allowed to use Firefox. Now, despite that, she is unable to run Firefox: whenever she tries, an error box pops up with the message

Close Firefox
A copy of Firefox is already open. Only one copy of Firefox can be open at a time.

(needless to say that Firefox was not open, neither by her nor by any other user, and that none of the other users has that problem).

It appears this occured after a recent update of Firefox (to version 39.0).

What could be the cause of this? How can I sort this out?

26

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.

4
  • I think making hidden (dot) files visible within Finder is not trivial ... – Walter Nov 30 '16 at 19:36
  • 2
    I found that I also had a 'ghost process' running - @joshua's answer (using ps -wwax | grep firefo) was needed to find and kill it. btw, the process didn't appear in OSX's 'force quit' list. – drevicko Jul 31 '17 at 10:05
  • Thanks. The error dialog should really have an option to do that automatically! – Matt Oct 7 '18 at 16:46
  • this worked for me after apple.stackexchange.com/questions/196771/… I had planned to "Restore Previous Session" (support.mozilla.org/en-US/kb/…) and unfortunately when I launched and found a "security" error that meant that bookmarks and history would be inaccessible. once i killed the "ghost process" and restarted firefox, I was in good shape with respect to the error, but now my "previous" session was worthless. – Michael Sep 5 '19 at 1:13
12

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.

3
  • 2
    This solved my problem, the answers above this one did not. Thank you! – Lea Verou Dec 12 '16 at 19:43
  • I had several running - the one that solved the problem was a plugin container (recognisable by the path). – drevicko Jul 31 '17 at 10:08
  • funny stuff about linux / unix. one has to be hacker to make simple things working – luky Sep 23 '19 at 13:02
2

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.

2
  • 1
    Sorry, but this was not the solution: there is no other running Firefox process running. The only one shown by the activity monitor is the one that displays the error box. – Walter Jul 25 '15 at 8:43
  • that worked for me – tkt986 Mar 29 '17 at 13:09
0

I find a solution online here, you can check it. https://support.mozilla.org/en-US/kb/firefox-already-running-not-responding

3
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – grg Jul 21 '15 at 9:31
  • Your link provided the correct solution: remove the .parentlock file. – Walter Jul 25 '15 at 8:41
  • Glad that helps you guys. – emma24xia Jul 27 '15 at 6:33
0

After killing the background processes as shown, Firefox was able to start:

$ ps -wwax | grep firefox
 1305 ??        59:06.29 /Applications/Firefox.app/Contents/MacOS/firefox -foreground
 2809 ttys006    0:00.00 grep firefox

$kill -9 1305

$ ps -wwax | grep firefox
 2815 ttys006    0:00.00 grep firefox
0

Killing running processes and restarting the application worked like a charm for me.

# Kill running processes
ps -ef|grep 'Firefox'|awk -F' ' '{print $2}'|xargs kill -9

# open firefox
open -a /Applications/Firefox.app
New contributor
Shashwat Shekhar Shukla is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
-1

The only solution I could find so far was to open an unsaved file in some kind of editor and do a "Log Out ".

If you are lucky, the stuck process will disappear from the dock before editor complains about unsaved file so you can click "Cancel", and most of your workspace will stay there.

-1

My solution was

  1. List all running process lsof -i and find Firefox enter image description here
  2. Kill Firefox by its PID (process ID) kill -9 [PID]

According to IBM docs

The lsof (list open files) command returns the user processes that are actively using a file system.

According to this Linux blog post How to Kill a Process from the Command Line you can kill a proces by running kill SIGNAL PID

Where SIGNAL is the signal to be sent and PID is the Process ID to be killed.

4
  • @mmmmmm its just how i solved the issue, also added references for lsof -i returning user process, answer should be easier to understand now. – ricks May 5 at 19:39
  • There seems to be a step missing between 1 and 2. Also, why use lsof instead of ps? – nohillside May 5 at 19:48
  • @nohillside just personal preference, i find it easier to type lsof -i and find Firefox under COMMAND once it pops up, no steps missing, PID will be next to the command ill add a picture for reference – ricks May 5 at 19:51
  • 1
    Maybe your screen is bigger than mine, but scrolling through 170 entries (just checked) to find the right one seems to be hassle (especially if ps aux | grep -i firefox just returns one entry and is significantly faster). But good to know there are alternatives. – nohillside May 5 at 20:02

You must log in to answer this question.

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