• Register
    • Login
    • Search
    • Categories
    • Recent

    ClearSafariCache.sh Stuck

    Cookie 5
    7
    24
    5594
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pumpkin last edited by

      Purchase directly from you april 30, 2016. Order #27069. Current rev 5.2.1.

      1 Reply Last reply Reply Quote 0
      • SweetP
        SweetP last edited by

        have you tried a computer restart?
        that can sometimes fix strange issues like this

        ~
        Russell
        SweetPProductions.com

        1 Reply Last reply Reply Quote 0
        • P
          pumpkin last edited by

          Not wanting to jinx anything but I did a reboot and so far all is well!

          1 Reply Last reply Reply Quote 0
          • R
            ralf.papenkordt last edited by SweetP

            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.

            1 Reply Last reply Reply Quote 0
            • SweetP
              SweetP last edited by

              Thanks ralf!

              I'll update the script to your solution.
              🙂

              ~
              Russell
              SweetPProductions.com

              1 Reply Last reply Reply Quote 0
              • A
                alohart last edited by

                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?

                1 Reply Last reply Reply Quote 0
                • SweetP
                  SweetP last edited by

                  I have this fixed in Cookie v6.0.17

                  ~
                  Russell
                  SweetPProductions.com

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    alohart @SweetP last edited by

                    @SweetP If your Cookie v6.0.17 fix works in Cookie 5.12, what would that fix be?

                    1 Reply Last reply Reply Quote 0
                    • SweetP
                      SweetP last edited by

                      Cookie 6 doesn’t use the script anymore as it’s not necessary on Mojave+

                      ~
                      Russell
                      SweetPProductions.com

                      1 Reply Last reply Reply Quote 0
                      • S
                        swip last edited by

                        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 like com.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.)

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post