Why does the Mac OS X firewall dialog recurringly pop-up and disappear by itself (without letting me respond) under Snow Leopard?

From time to time, I'll be on my Macbook using a program that accesses the network – whether Firefox, or Sony's Reader Library – really, it seems like it could happen with any program that accesses the network – and for no reason that I can discern so far (that is, it happens intermittently) the OS X firewall dialog pops up to ask me the question:

OS X firewall dialog: Do you want the application "Reader Library.app" to accept incoming network connections?  Clicking Deny may limit the application's behavior. This setting can be changed in the Firewall pane of Security preferences.  Deny Allow

[OS X firewall dialog] Do you want the application "Reader Library.app" to accept incoming network connections? Clicking Deny may limit the application's behavior. This setting can be changed in the Firewall pane of Security preferences. [Deny] [Allow]

Except it doesn't actually let me click anything before it disappears! That is:

  • the dialog pops up, ...
  • then goes away by itself a second later,
  • then pops up again, ...
  • then goes away by itself a second later,
  • etc.

It happens a few times before stopping. It wouldn't be so maddening to be interrupted if I could just be allowed to click "Allow" and make the darn thing go away for good.

In Security preferences I have the firewall turned "On", and I would like to keep it that way.

Has anybody seen this problem, found the source, and figured out a solution or workaround?


UPDATE: I had found these message threads confirming the issue: MacRumors.com - Firewall application exceptions: dialog disappears strangely, and Apple - Support - Discussions - Annoying Firewall Allow / Deny Dialog. As of March 27th, 2010, there's still no solution reported at either of those links.


Solution 1:

I had this with using ruby installed via rvm.

This was invaluable and is the correct way I think.

https://web.archive.org/web/20160313182146/http://forums.macnn.com/79/developer-center/355720/how-re-sign-apples-applications-once

I re-signed my rvm/ruby binary and all's well.

Relevant bits:

You can examine the signature information by doing the following:

codesign -dvvvv /path/to/application

Then create a self-signed certificate via the Keychains application that is for Code Signing (see link for details). Then:

Re-signing the application is quite simple.

  1. Open Terminal.
  2. Type "codesign -f -s (name of certificate) /path/to/application

Solution 2:

Several people have hit around the solution, but haven't stated it clearly, so here it is:

Every app in OS X should be signed by the developer. This signature ensures that the contents of the application haven't been changed. The firewall verifies this signature as part of its process. When the signature verification process fails, you will receive this Allow/Deny error message every time you use the program, even if you click Allow on the dialog box.

Why is the signature verification failing? This can happen for several reasons, but primarily it is because somewhere along the line you've changed the contents of the /Applications/YourProblemApplication.app container. For example, if you use Monolingual or a similar app to remove other language files to save disk space, you've modified the contents of the app. If you've used a program like CandyBar or IconDubber to change the icon (.icns) file, you've also changed the contents of the app.

The easiest way to fix this problem is to delete the .app that is generating this error (be sure to empty the recycle bin). Reinstall the .app and this time, don't modify the contents.

BTW, the whole signature process can lead to plenty of errors in other applications, especially security conscious apps like VPNs. For example, my Cisco Unified Personal Communicator stopped working after running Monolingual (but would only generate deny errors in the Console log).