Apport cannot start firefox: "Firefox is already running...."

Bug #198195 reported by Dennis Heinson
12
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Invalid
Medium
Unassigned
firefox-3.0 (Ubuntu)
Triaged
Medium
Mozilla Bugs

Bug Description

Binary package hint: apport

In apport reporting a bug of displayconfig-gtk results in the following error message:

(Window Title:) CLOSE
Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.

There is no crash, so I cannot submit a crash report.

This also happens, when firefox gets started from a non-existent directory:

TESTCASE:
1. firefox
2. mkdir /tmp/foo
3. cd /tmp/foo
4. rmdir /tmp/foo
5. firefox

Revision history for this message
James Westby (james-w) wrote :

Hi,

Can you please provide the output of the following commands:

  gconftool --get /desktop/gnome/url-handlers/http/command

  firefox -new-window http://ubuntu.com

  gnome-open http://ubuntu.com

Also, was firefox unresponsive when you received that
message? Was it open?

Has reporting a bug using that method ever worked for you?

Thanks,

James

Revision history for this message
Dennis Heinson (dheinson) wrote :

1. (Console:)
dennis@Computer:~$ gconftool --get /desktop/gnome/url-handlers/http/command
firefox %s
2. Works, opens new firefox with ubuntu website
3. Works, opens a new tab in existing firefox with ubuntu website.

To the other questions: Yes, firefox was open. It neither was nor became unresponsive when I received the message. Yes, bug reporting has worked for me before. I use FF 3 Beta 3 under latest Hardy, by the way.

I tried to reproduce the bug that ran apport, but the whole displayconfig-gtk seems to be missing at this point. Maybe it didn't compile last night. I will add a comment as soon as I get the chance to test it again.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 198195] Re: Cannot submit Bug Report: "Firefox is already running...."

On Tue, 2008-03-04 at 18:55 +0000, Dennis Heinson wrote:
> 1. (Console:)
> dennis@Computer:~$ gconftool --get /desktop/gnome/url-handlers/http/command
> firefox %s
> 2. Works, opens new firefox with ubuntu website
> 3. Works, opens a new tab in existing firefox with ubuntu website.
>
> To the other questions: Yes, firefox was open. It neither was nor became
> unresponsive when I received the message. Yes, bug reporting has worked
> for me before. I use FF 3 Beta 3 under latest Hardy, by the way.
>
> I tried to reproduce the bug that ran apport, but the whole
> displayconfig-gtk seems to be missing at this point. Maybe it didn't
> compile last night. I will add a comment as soon as I get the chance to
> test it again.
>

Thanks for the information.

It would be great if you can test again.

The other time that I have seen this message was when I
was rushing firefox, e.g. opening too many things too quickly,
or opening something just after it had started. It sounds like
neither of these will have affected you though.

Thanks,

James

Revision history for this message
Dennis Heinson (dheinson) wrote : Re: Cannot submit Bug Report: "Firefox is already running...."

Hi James,

I can reproduce now. The problem does not appear if Apport has to open Firefox. When Firefox is already running, it does not work and gives said error message. Please tell me how to proceed :)

Revision history for this message
Daniel Hahler (blueyed) wrote :

You might want to poke around in /usr/lib/python2.5/site-packages/apport/ui.py to see which code path gets hit:
Search for "gconftool" and add "print foo1"-like lines around to see if e.g. "firefox -new-window" gets called at all.

Can you call "firefox -new-window" if Firefox is already running?
Are you by any chance logged into another session?

Revision history for this message
Dennis Heinson (dheinson) wrote :

Yes, I can call "firefox --new-window" when it's running.
No, no other session. I hope the other instructions help resolve the issues. Unofrtunately, I know nothing about Python coding otherwise I would be more than willing to try "poking" :)

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 198195] Re: Cannot submit Bug Report: "Firefox is already running...."

On Wed, 2008-03-05 at 05:05 +0000, Dennis Heinson wrote:
> Hi James,
>
> I can reproduce now. The problem does not appear if Apport has to open
> Firefox. When Firefox is already running, it does not work and gives
> said error message. Please tell me how to proceed :)
>

Hi,

I'm afraid that I'm not sure how to proceed from here.

Thanks,

James

Revision history for this message
Daniel Hahler (blueyed) wrote : Re: Cannot submit Bug Report: "Firefox is already running...."

Can you run /usr/share/apport/apport-gtk from the command line and see if there's any output in the console?

Changed in apport:
assignee: nobody → blueyed
status: New → Incomplete
Revision history for this message
Dennis Heinson (dheinson) wrote :

Done. No output at all. When I produce a bug, the tray icon appears, however.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Sorry for being unclear.
You should start /usr/share/apport/apport-gtk from the command line, instead of clicking the tray icon, if there's a bug to report. apport-gtk will just exit silently, if there's nothing to report.
You can trigger a new bug by touching an existing crash report in /var/crash (owned by your user), e.g. "touch /var/crash/_usr_bin_inkscape.1000.crash" or similar.
Then, starting apport-gtk should take this report.

Changed in apport:
importance: Undecided → Medium
Revision history for this message
Dennis Heinson (dheinson) wrote :

Sorry on my side too, I could have figured that :)

root@Computer:~# /usr/share/apport/apport-gtk
root@Computer:~#

---> Same behavior. :(

Revision history for this message
Daniel Hahler (blueyed) wrote :

Have you touched any .crash file before doing so?
If you get crashes regularly, you can also wait until the tray icon appears: then do not click the tray icon, but run /usr/share/apport/apport-gtk

This should be the same as when clicking the tray icon (i.e. it asks you to send the report), but hopefully there's more info on the console then.

Revision history for this message
Dennis Heinson (dheinson) wrote :

Yes, I did exactly that. Not click tray icon, run from shell instead. No extra output on the console, only the error in Firefox.

Daniel Hahler (blueyed)
Changed in apport:
assignee: blueyed → nobody
status: Incomplete → Triaged
Revision history for this message
Aaron C. de Bruyn (darkpixel2k) wrote :

I don't believe this is an issue with apport.
I have initially noticed this bug while having the same apport issue, but it is not limited to apport.

I use mutt as my email client which opens URLs via /usr/bin/sensible-browser which in turn calls firefox.

I have done a bunch of testing and received the same message with each of the following tests:
/usr/bin/sensible-browser http://www.google.com
/usr/bin/firefox http://www.google.com
/usr/bin/firefox-3.0 http://www.google.com
/usr/bin/firefox --new-window http://www.google.com

This is with firefox up and running without issues. (No hangs, UI is responsive, etc...)

After I file this, I'll kill my 100 open tabs and try running the commands with firefox closed.

Revision history for this message
Aaron C. de Bruyn (darkpixel2k) wrote :

This solved the issue.
I noticed firefox in the process list was not started as just '/usr/lib/firefox-3.0b4/firefox'. It had details on the end from apport.

Apparently if firefoxs gets launched initially by apport there is an issue with opening additional URLs, but I am unable to track down the exact reason.

The workaround is to close firefox and re-open it via the icon or Application menu.

Revision history for this message
Theresa (theresa) wrote :

I get the same error message, when i close Firefox 3.0 and QUICKLY (within seconds) open it again because i accidentally closed it.
when trying to re-open firefox 3.0

i get this message:
Firefox-3.0 is already running, but is not responding. To open a new window, you must first close the existing Firefox-3.0 process, or restart your system.

UNTIL
I kill the process, then I can open Firefox 3.0 again....that's weird.

Doesn't happen with Firefox 2 though.

Revision history for this message
Daniel Hahler (blueyed) wrote :

I don't think it's a bug with apport, because this just happened to me when using submittodebian/reportbug and choosing "More details (launch browser)".
From looking at reportbug's source, it uses:
 def launch_browser(url):
     if not os.system('command -v sensible-browser &> /dev/null'):
         cmd = 'sensible-browser' + commands.mkarg(url)
         os.system(cmd)
         return
..and I can see in "ps aux":
 sh -c sensible-browser 'http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467223&archived=False&mbox=no'

However, I cannot reproduce it from an ipython shell, using the same code and using sensible-browser itself from the command line works, too..!

Any ideas?

Changed in apport:
status: Triaged → Invalid
Changed in firefox-3.0:
status: New → Triaged
Revision history for this message
Daniel Hahler (blueyed) wrote : Re: Firefox fails to start from non-existent directory: "Firefox is already running...."

Found a cause and way to reproduce this.. (see updated description)

description: updated
Revision history for this message
John Vivirito (gnomefreak) wrote :

Please check to see what browser you have set to default if it is firefox 3 than please change it to another gui browser and see if this issue goes away.

Changed in firefox-3.0:
assignee: nobody → mozilla-bugs
status: Triaged → Incomplete
Revision history for this message
Daniel Hahler (blueyed) wrote :

John, the particular problem with apport may go away probably, when working around this bug in firefox. That's not a real option though.
The testcase I've added does not involve anything that uses the default browser, but plain firefox itself.

Confirmed with firefox 3.0b5 btw, too.

Maybe apport calls the browser (Firefox) from a non-existent directory, triggering this bug?!

Changed in firefox-3.0:
importance: Undecided → Medium
status: Incomplete → Triaged
Daniel Hahler (blueyed)
description: updated
Revision history for this message
John Vivirito (gnomefreak) wrote :

>Binary package hint: apport

>In apport reporting a bug of displayconfig-gtk results in the following error message:

>(Window Title:) CLOSE
>Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox >process, or restart your system.

One process of firefox can be open at a time if you try to open a second without using
--new-window its going to fail to open. Is it possible to have apport check for open browser(default browser) since that is what apport uses when it opens it. and see if you cant add something to start it with --new-window if there is one open already?
Now this might beablet o be handled in firefox or each browser this is seen on but if its possible to only fix one package rather than 3+ it seems a bit easier.

Revision history for this message
Jordan (jordanu) wrote :

Sorry, I don't know how to check in launchpad, has this been forwarded upstream to mozilla? It is clearly a bug in Firefox.

Revision history for this message
Joncohen (electrawise) wrote :

If firefox freezes, usually during changing web pages while watching video in the current tab, and I force quit. When I try to re open fire fox I get the message that it is already open.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Re-opening the apport task. I just have the same problem on a live CD (with some daemon startup problem (hal?)).

The problem appears to be when running apport (e.g. "sudo ubuntu-bug -p hello") "root", when there's a firefox session for the user already.
"ubuntu-bug -p hello" (as user) opens a new firefox tab.

Changed in apport:
status: Invalid → New
description: updated
Revision history for this message
Brett Alton (brett-alton-deactivatedaccount) wrote :

I get this same error. I was just about to file a report and saw this bug.

I have Firefox open, a kernel upgrade failed, then apport failed to send the bug report because I already had Firefox open!

Revision history for this message
Brett Alton (brett-alton-deactivatedaccount) wrote :

As per the test above:

$gconftool --get /desktop/gnome/url-handlers/http/command
firefox -new-tab "%s"

$firefox -new-window http://ubuntu.com
[it opens http://ubuntu.com in a new window]

$gnome-open http://ubuntu.com
[ it open http://ubuntu.com in a new tab]

Revision history for this message
ground-pilot (briearos) wrote :

FIXED MINE:

~$ locate firefox | grep bin

/usr/bin/firefox
/usr/bin/firefox-3.0
/usr/lib/firefox/firefox-bin

user@laptop:~$ /usr/bin/firefox-3.0 -safe-mode [FAILED - Already running but not responding....]

user@laptop:~$ /usr/bin/firefox-3.0 -ProfileManager

    *) Delete DEFAULT profile
    *) Create New Profile
    *) Launch Firefox 3

[WORKED]

Exited and retried from KDE > Internet > Firefox 3.0 [WORKED although complained I had a crashed session?]

Exited and retried again. [WORKED LIKE A CHAMP]

Dunno why it stopped after my original install MONTHS ago? But this seems to have fixed my issue.

Revision history for this message
Martin Pitt (pitti) wrote :

This doesn't happen with any other browser; apport itself just calls "firefox -new-window URL", I don't see anything wrong with that. Thus I close the apport task and leave the firefox task.

Changed in apport:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.