Folder Action Dispatcher

Folder Actions Dispatcher sits in memory, and grows and grows until it consumes over 2 GB. It will typically ask for as much as 50% of the CPU as well. Then it usually crashes, but not before consuming the RAM that should be available for other applications.


I did some sleuthing, and found a com.apple.FolderActions.folders.plist file in the ~Library/Launch Agents folder. Something is changing it very frequently.

Inside, the file contains the following script:


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>Label</key>

<string>com.apple.FolderActions.folders</string>

<key>Program</key>

<string>/usr/bin/osascript</string>

<key>ProgramArguments</key>

<array>

<string>osascript</string>

<string>-e</string>

<string>tell application "Folder Actions Dispatcher" to tick</string>

</array>

<key>WatchPaths</key>

<array>

<string>/Applications</string>

</array>

</dict>

</plist>


I conclude that some application somewhere is causing AppleScript to watch /Applications for changes, for some reason. I don't knowwhy this would cause Folder Actions Dispatcher to grow and grow as it does.


Questions:

  • is there a way to find the "author" or "owner" (a program) of the script and stop it?
  • I cannot delete the file -- are there innocuous changes to it that might cause it to stop behaving this way?

thank you

Mac Pro

Posted on Jul 26, 2014 9:00 AM

Reply
52 replies

Feb 10, 2015 12:44 PM in response to DragonDave

DragonDave:


Thanks for your response.


Yeah, seems our experience was a bit different...


I think I observed that FAS did not refresh its preference file, which I had trashed. But I could be mistaken. At this point I'm content to say, "I may have seen an exception to the apparent rule that trashed pref files get refreshed when the associated app is launched" and leave it at that. Next time I'll be a bit more careful about watching.


At this point, in 10.10.2, on two Macs, FAS is fully stable for me, but I'm not doing anything with it. If I had a compelling reason to try to use it .... but I don't.


For the record, my one single experiment with FAS a year or two ago: would it trigger a system notification when a file was added to the local folder of a cloud service (Google Drive) by a remote person with whom the folder is shared? Seemingly: "no". I found an inexpensive add-on (Insync) that does this very well --and in nested folders-- so I dropped the idea of using FAS.

Feb 10, 2015 1:11 PM in response to xairbusdriver

xairbusdriver:


Yeah, let's hope we can forgive and forget... because --as is the usual case-- this stuff "just works".


Just a brief word about aliases: I use them a lot to organize my Mac, usually Finder aliases, but sometimes the underlying (?) link mechanism. Finder aliases work so well it is easy to forget that they have limitations -- especially in a world complicated by such mechanism as Cloud sharing. My current puzzle, for example: I have a folder 'XYZZY' on my hard disk. I make an alias of it, and drop that alias in my local Google Drive folder. Something non-trivial gets shared through the Cloud, but it whatever it is, it isn't the content of folder 'XYZZY'. Back in the direction of our topic: I wonder what happens if you try to unleash Folder Actions on an alias, maybe once or twice removed... Makes my head spin!


Folder Actions seems to have a lot of potential. Anyone know of a collections of Cool Uses of this mechanism? If so... I might be tempted to test fate by trying my newly-fixed Folder Actions subsystem.

Feb 27, 2015 5:42 AM in response to Brendon2424

Hi Brendon,


I had a similar problem and I could not simply stop using Folder Action Scripts (FAS). From within a OS 9 emulator (SheepShaver), I used FAS to print files that were added to a specific folder on the OS X side. While this is not a solution for every case, it can give some clues to workarounds.


Since using FAS in my personnal user account ignited the Folder Action Dispatcher (FAD) like you all described, I tried it in another user. My tests proved that the problem was only in my personal user account. FAS worked perfectly in any brand new and fresh user. I was left to try to point out the conflicting process or processes.


At first, my search brought me near Dropbox and some other cloud backup service. It made sense since these services did, like my FAS, watch folders to see if any items were added or modified. I installed Dropbox in an existing user where FAS was not a problem .... and the FAD problem began. Good ! I uninstalled Dropbox in that same account and the FAD problem was gone. Very good ! I really thought that I had found the culprit. I then uninstalled Dropbox in my personal user account ... and it did not fix the FAD problem. I then created a brand new and empty user. I installed Dropbox .... and the FAS was working without a glitch. I tried that in a few new users, and I can conclude the same thing: on my computer, FAS works perfectly in any new and fresh user account. So Dropbox is not the problem but could be involved. Gosh ... my problem was not solved.

Time was missing. My work was halted for 3 days. I had to find a way. Since my case involved a process (print) that could be executed from another user in the background, I thought about creating a FAS from a user account that did not have the FAD problem and to use the Shared folder that is accessible from any user to print. I have a Guest user account, that t is always logged in ... and it doesn't have the FAD problem. From that account, I created a FAS folder in the Shared folder.

So, from my personal user account, I am able to add a file to a folder in the Shared folder ... and then, the FAS executes from the Guest user account were there is no FAD problem. And it works ... and it has been working for a while now. It should probably be working until a conflicting process is installed in the Guest user account. I will not try to reinstall Dropbox in that account to see what will appen. It works and I will keep it this way ... until a permanent fix comes from Apple.


Hope this can help somebody else.




Robert Lespérance

Mar 1, 2015 5:50 AM in response to Rjkjr

So this morning, I simply unchecked Dropbox 's Finder integration preference and FAS came back to normal. I then reselected the pref and FAS was still working. Time will tell if that fixes completely the problem.


I also found a Dropbox article talking about problems related to that pref ... but not mentionning anything about FAS though. Here is the article:


https://www.dropbox.com/help/7183


I'll keep you posted, if that can be of some interest.

Mar 11, 2015 9:59 AM in response to Robert Lesperance

Hi,

I have the problem too and like others, only on some machines, not others. And I've tried most of the solutions described here with no success.

But the reason is that is crashes. So it launches, consumes a lot of CPU at startup, fails and is relaunched.


You can check if yours crashes too by launching the console and checking messages like this one:

11/03/2015 17:57:15,701 ReportCrash[4146]: Saved crash report for Folder Actions Dispatcher[4147] version 1.0.4 (1.0.4) to /Users/pascal/Library/Logs/DiagnosticReports/Folder Actions Dispatcher_2015-03-11-175715_MacProBoulot.crash


Another solution is to launch it from the terminal with:

/System/Library/CoreServices/Folder\ Actions\ Dispatcher.app/Contents/MacOS/Folder\ Actions\ Dispatcher


I get a Segmentation fault: 11. I've looked under a debugger but was not able to find an obvious reason.

Mar 11, 2015 5:17 PM in response to pascal_meheut

Hi Pascal,


I have tried to understand the Folder Actions Script (FAS) problem for at least 6 days ... The problem is experienced by many users but the context seems to vary so much. I have been having this problem while using a OS 9 emulator called SheepShaver. After posting threads in this forum, in MacScripter and in Emulation the only possible conclusion that I came to is that there is not a Apple way of fixing the problem.


Depending on the activity, FAS generates a problem with the Folder Action Dispatcher (FAD) that begins to use increasing amout of memory until the process crashes or that you can avoid by force quitting the process in Activity Monitor. Avoiding the crash does not fix the problem. I have tried to stabilize FAD and to relaunch FAS so many times .. to conclude that there is no solution to this problem. Having also read many different threads, I can tell you that the only consensus is to forget FAS completely. It's behaviour is to flaky and unpredictable. Forget FAS ...


But there is a solution ... for launchd pros. I am not a pro, so I needed something else. I found a definitive solution that fixed completely my problem. It's called Hazel. Click here. When using Hazel, deactivate FAS. It does exactly the same thing has FAS without the FAD problem. It has a simple UI and the learning curve is short and not steep. I created an Automator workflow instead of a script. So easy.

Give it a try ... You have 14 days of free trial. You will see if that helps.

Good luck !

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Folder Action Dispatcher

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.