ClearSafariCache.sh Stuck
-
I deleted Cookie and all associated files and scripts, reinstalled and still experienced the clearSafariCache.sh endless process. I then searched the forum and found your "chown " workaround which did the trick. Hopefully this is a temporary fix to be corrected in some future release, yes?
-
The clearSafariCache.sh endless process has returned despite changing permissions as you described previously. Permissions are:
-rwxr-xr-x@ 1 cj staff 47 Nov 18 08:04 clearCookies.sh -rwxr-xr-x@ 1 cj staff 119 Nov 18 08:04 clearSafariCache.sh -rwxr-xr-x@ 1 cj staff 159 Nov 18 08:04 clearSafariHistory.sh
Even with Safari quit if I run Cookie and then quit Cookie the endless process returns. I have removed Cookie from StartUp Items for the time being in the hope you can find a permanent solution to this problem.
-
I have got the same problem and found a solution: Change the script clearSafariCache.sh from
find /private/var/folders \! -name "*SafariTechnologyPreview*" -name "*com.apple.Safari*" -exec rm -r {} \;
to
find /private/var/folders \! -name "*SafariTechnologyPreview*" -name "*com.apple.Safari*" -exec rm -r {} \; 2>/dev/null
Because the original script throws "Permission denied" errors and therefore opens the file descriptor stderr, it seems that the parent process (com.apple.foundation.UserScriptService) can't close it as long as a file is open.
-
This seems to be occurring with the App Store Cookie 5.12 under macOS 10.15.6 as well as earlier macOS versions. I see a gear icon appear in the menu bar. When I click on the gear icon, I see "clearSafariCache.sh Running" followed by "clearSafariCache.sh Failed". I've checked all the "fixes" in this thread and found that none apply to my situation. Any ideas?
-
The clearSafariCache.sh script takes a very long time (almost three minutes) on my machines, too, so I went ahead and optimized the
find
expression a bit so it won't unnecessarily descend into huge directories likecom.apple.metadata.mdworker
.Just replace the line
find /private/var/folders \! -name "*SafariTechnologyPreview*" -name "*com.apple.Safari*" -exec rm -r {} \; 2>/dev/null
with
exec 2>/dev/null find /private/var/folders -name "*SafariTechnologyPreview*" -prune -o -name "com.apple.Safari*" -print0 -o -name "com.apple.*" -prune | xargs -0 rm -r
Now the script finishes in less than a second.
(I know that Cookie 6 and later do no longer use this script at all, but people who are still on older systems and cling to Cookie 5 might benefit.)