clearSafariTPcache Failing


  • Whenever I quit Safari Technology Preview, a small spinning gear appears in my Menu Bar, which, if clicked on, shows two (usually?) items that are being cleared. However, this is the result (I believe it is always the result, but I'm not positive):

    Screen Shot 2020-06-24 at 15.42.52.png

    Am I doing something wrong? Please advise. Thank you.


  • Curiously, sometimes only a single instance of the "running" notification appears - but it still "fails":

    Screen Shot 2020-06-24 at 16.04.19.png

    And, sometimes, I see this:

    Screen Shot 2020-06-24 at 15.59.05.png

    Followed by this:

    Screen Shot 2020-06-24 at 15.59.54.png

    Note that running clearSafariTPcache.sh in Terminal seems to complete without an error getting thrown:

    Screen Shot 2020-06-24 at 16.02.47.png

    Not that I know what any of this means...


  • If you navigate to the folder the script is in, then run the following commands:

    chown :staff clearSafariTPCache.sh
    chown :staff clearSafariTPHistory.sh
    

  • Thank you for your reply.

    I did as requested:

    Screen Shot 2020-06-26 at 11.59.45.png

    But quitting SafariTP still results in this (screenmovie):

    https://app.box.com/s/z2v6dwu5z6t2e7x4jqk8y9zybsvm6i52



  • Again, thank you for your reply.

    I replaced both .sh files.

    I rebooted.

    I launched and quit SafariTP. No joy:

    https://app.box.com/s/sy60rn496fb85s4s5umhj7czhkuxft69

    I don't know if any of this matters, but I get a huge list of errors in Console while that little gear is spinning:

    Sandbox: find(1115) System Policy: deny(1) file-read-metadata /private/var/folders/8c/t4q625mn1sv94y7z9w5k8zzc0000gn/T/com.apple.WebKit.Networking.Sandbox

    unable to create CacheDeleteDaemonVolume for <private>

    Failed to open database at <private>. Error: Error Domain=com.apple.Safari.SQLite Code=14 "unable to open database file"


  • Rather than start a new thread I'll just point out that I'm having the same problem but with Safari cache. I get the same error as above but it's the Safard cache script that's failing/ I've not tried the tech preview scripts but that's probably duff as well.

    I've done a complete - or AFAICT full delete - of Cookie6, reinstalled via the App Store and downloaded the scripts in the link above for both Safari and SafariTP. These are placed in ~/library/application scripts/com.sweetpproductions.CookieApp (4 scripts in all)

    Since the problem may relate to Sandboxing, should the scripts be somewhere in ~/library/containers/com.sweetpproductions.CookieApp?

    Permissions on ~/library/application scripts/com.sweetpproductions.CookieApp are: user r/w everyone no access

    They are the same for ~/library/containers/com.sweetpproductions.CookieApp user r/w everyone no access

    Anyone any further ideas?


  • Is your macOS user account an admin account?


  • If you're asking me, yes, my account is an Admin account.


  • @SweetP Unfortunately I think I've confused this thread, but I run as user.

    The scripts folder is in ~/library/application scripts/com.sweetpproductions.CookieApp

    Folder permissions are:
    user (me): r/w
    everyone: read only

    Permissions on the Scripts are:
    User (me): R/w
    staff: read only
    everyone: read only


  • FWIW I tried stopping Cookie6 and installed a copy of Privatus 6.1.8 to see what happened.
    Again the same problem: following Safari -> quit the small gear wheel in the menu bar with clearSafariCache.sh failed.
    Since the problem has started fairly recently it suggests that an update to either MacOS or to Safari is behind the problem. I also have a laptop running the last version of Mojave and that is not showing the same problem.
    I should have added that permissions for Privatus are the same as those for Cookie6


  • Hmm. Made a mistake there.
    A more thorough check on the laptop running Mojave 10.14.6 and Safari 13.1.1 shows the same problem: spinning gear wheel in the menu bar which then shows 'failed' after quitting Safari and the clear cache script runs.


  • try the following command on the scripts:

    chmod +x clearSafariTPCache.sh
    chmod +x clearSafariTPHistory.sh
    

  • Did as requested.

    This is the directory listing BEFORE the +x commands:

    Screen Shot 2020-07-03 at 11.54.43.png

    And this is the +x commands and the "new" directory listing:

    Screen Shot 2020-07-03 at 11.54.55.png

    And this is the directory path in question:

    Screen Shot 2020-07-03 at 11.57.19.png

    A quit/relaunch/quit of SafariTP still results in this:

    Screen Shot 2020-07-03 at 12.01.32.png


  • Ive just uploaded a new beta, which I hope fixes the problem:
    https://sweetpproductions.com/products/cookieapp/beta_updates.htm

    If you can download the beta and try that, then let me know how it goes.
    You should be prompted to update the scripts when they are required.


  • Quit Cookie. Replaced the app with the new beta. Relaunched Cookie. Quit SafariTP. Got prompted to update one script, which seemed to be successful, as I got the "OK" dialog. However - and this is all part of this single instance of quitting SafariTP - I got this:

    Screen Shot 2020-07-09 at 11.23.32.png


  • After posting the above message, I quit SafariTP again at which point I saw this:

    Screen Shot 2020-07-09 at 11.26.38.png

    and then, after several minutes, this:

    Screen Shot 2020-07-09 at 11.27.39.png

    Please note, however, that my history is being deleted from SafariTP upon quit/relaunch:

    Screen Shot 2020-07-09 at 11.29.38.png

    I don't know how to check to see if my cache data is being removed or not...


  • Also note that I see tons of messages like this in Console after quitting SafariTP:

    Sandbox: find(31092) System Policy: deny(1) file-read-metadata /private/var/folders/8c/t4q625mn1sv94y7z9w5k8zzc0000gn/0/com.apple.Safari/SafariFamily
    

  • ok,
    Ive been doing some reading, it looks as though support for running these scripts has been deprecated in one of the Catalina updates...

    <edit>support is still there, but the cache removal script was trying to remove data from a protected folder - and this was causing the fail I think</edit>

    I'll try and find a way to implement them some other way, or even see if they are still necessary at all...


  • so it looks as though Cookie can now do its job without the cache removal script. 💃

    Ill look into a solution for fixing the history removal. and upload a new beta when I have a solution