Jump to content

Remove Quarantine — Delete the quarantine attribute from app bundles and files


vitor

Recommended Posts

When reporting issues, please include your exact installed versions of:

  • The Workflow.
  • Alfred.
  • macOS.

In addition to:

  • The debugger output. Perform the failing action, click “Copy” on the top right and paste it here.
  • Details on what you did, what happened, and what you expected to happen. A short video of the steps with the debugger open may help to find the problem faster.

Thank you. Accurate and thorough information is crucial for a proper diagnosis which allows me to help you better.

Link to comment
  • 4 months later...
  • 6 months later...

Hi Vitor, I can't get the V21.2 version of this working with the File Action. For example I select an app, bring up Actions, then select remove quarantine and I end up with the path of the app in the Alfred window:

image.png.8a515557f5dc9ea434843edc8771fb94.png

I select that actions and I get this:

image.png.fe3152c8088e19d237137d2e771cb00c.png

 

In the debug pane, showing all information I see this:

 

[13:25:24.672] Logging Started...
[13:25:34.175] RemoveQuarantine[Script Filter] Queuing argument '(null)'
[13:25:34.540] RemoveQuarantine[Script Filter] Script with argv '(null)' finished
[13:25:34.543] RemoveQuarantine[Script Filter] <?xml version='1.0'?><items>

 

The script was sent 'null' which is bizarre as I definitely action the application and it does end up in the Alfred window...

Link to comment
  • vitor changed the title to Remove Quarantine — Delete the quarantine attribute from app bundles and files
  • 1 month later...
  • 2 months later...

Re: Plea to community & @vitor

 

I registered here to ask this question. This workflow has been absolutely invaluable to me, but I want to plea/request for 1 addition. 

When someone uses the keyword "rq", can you (pretty) please add an option for "Remove Quarantine from All" option at the top?  It's not terrible removing quarantine one app at a time, but it would really be useful to have a bulk function.


Thank you!

 

Link to comment
  • 2 weeks later...

Updated to 2023.2.

  • When using rq, query apps from the Spotlight database to show apps in more locations.
  • Show apps without .app suffix.
  • Show subtitle with full app path.
  • New configuration option to ignore signed and notarised apps when searching.
  • Updated to use /bin/zsh --no-rcs
  • Use JSON instead of XML.
  • General code improvements.

Link to comment
  • 2 months later...

Since 2023.2 this is really slow to list results for me (~6 seconds every time).

 

It used to be pretty much instant.

 

It also now lists results that aren't really Mac apps.

 

Can I limit it to /Applications folder (and its subfolders)?

 

edit: I spent some time removing quarantine from all search results. now it's quicker, but i'd still like to limit to /Applications

Screen shot 2023-10-15 at 18.46.15.png

Edited by gingerbeardman
Link to comment

2023.2 has a broader search, as it includes apps everywhere and not just /Applications. But it uses Spotlight’s indexing so that part should be fairly fast. Another change is that it now checks for signing and notarisation if Ignore Notarised is off, which also affects speed.

 

But limiting to /Applications is perfectly reasonable and a good addition. It is now in 2023.3.

Link to comment
  • 3 months later...

I just upgraded to Sonoma and this is no longer working for me.

 

I have it set to only look in /Applications

 

But it just sits at "Finding qunarantined apps..."

Log says:

 

[21:53:18.717] Logging Started...
[21:53:19.702] Remove Quarantine[Script Filter] Queuing argument '(null)'
 

Any ideas?

Link to comment

Because it’s not returning anything, I’d bet it’s still running. Only show apps in /Applications shouldn’t really affect speed, but Ignore signed and notarised apps will. Do you have that on or off? Also, removing quarantine from apps where it doesn’t matter (they are signed and notarised) will also make it run faster (because it skips the check).


This version writes a verifying_apps.txt file to your Desktop as it’s checking them, so you can tail -f ~/Desktop/verifying_apps.txt in a Terminal to see it as it happens. It may provide a clue.

Link to comment
  • 1 month later...

Sorry I totally missed the notification for this reply. No idea how.

 

I think the above download has expired.

 

I have both "only /Applications" (since you added it for me) and "Ignore signed/notarised" on (since the workflow stopped working).

 

I think maybe it stopped working when I upgraded from Monterey to Sonoma. I skipped Ventura.

 

Nothing showing in debug log of Alfred for the existing version.

Edited by gingerbeardman
Link to comment
2 hours ago, gingerbeardman said:

"Ignore signed/notarised" on

 

That affects speed by a good amount. Please turn it off and recheck.

 

2 hours ago, gingerbeardman said:

(since the workflow stopped working)

 

What do you mean?

Link to comment

I mean that I only turned on "ignore" after things stopped working, no results shown, to see if it helped.

 

So I turned it off and there are still no results showing.

 

I know for certain I have some apps that should be found.

Screen shot 2024-03-10 at 16.32.41.png

Edited by gingerbeardman
Link to comment

Try this. It’s the version from before.

 

On 1/26/2024 at 12:08 PM, vitor said:

writes a verifying_apps.txt file to your Desktop as it’s checking them, so you can tail -f ~/Desktop/verifying_apps.txt in a Terminal to see it as it happens. It may provide a clue.

 

Link to comment

That works, it took 27 seconds to find 57 of 986 apps. I'm not sure I ever gave the old version that long, as it used to take only a few seconds at most before something changed.

 

Logging grows by ~40 lines per second on my machine, which feels slow. Nothing untoward in there, apps listed are as expected.

 

I notice that when you close the alfred window the mds command keeps running. So if I invoke rq multiple times (for example when I think it's not working, oops) then there will be multiple scans happening at once. Can that be avoided?

 

The mdfind is aspect is pretty much instant, as confirmed on the command line. So the slow bit is the checking? Which is surprising. Maybe the use of osascript for the app_as_json function is slow?

 

[10:56:48.804] Logging Started...
[10:56:49.913] Remove Quarantine[Script Filter] Queuing argument '(null)'
[10:56:50.440] Remove Quarantine[Script Filter] Queuing argument '(null)'
[10:57:15.225] Remove Quarantine[Script Filter] Script with argv '(null)' finished
[10:57:15.232] Remove Quarantine[Script Filter] { "items": [{"title":"prima","subtitle":"/Applications/...

 

 

Edited by gingerbeardman
Link to comment
On 3/18/2024 at 11:04 AM, gingerbeardman said:

I notice that when you close the alfred window the mds command keeps running.

 

The mds command? Not sure what you mean.

 

On 3/18/2024 at 11:04 AM, gingerbeardman said:

So the slow bit is the checking?

 

Yes, that’s why it’s an option.

 

On 3/18/2024 at 11:04 AM, gingerbeardman said:

Which is surprising.

 

Verifying signatures and notarisation are expensive operations. Apple’s server may need to be contacted especially for the latter.

 

On 3/18/2024 at 11:04 AM, gingerbeardman said:

Maybe the use of osascript for the app_as_json function is slow?

 

AppleScript is slow, but not that slow. It’s fast enough for that number of results, and it’s done efficiently. I have workflows which handle more results than that without breaking a sweat.

 

Another thing you can try is to remove quarantine even from the signed and notarised apps. That is because apps without the quarantine bit are skipped, so removing it from those will skip the check, and be faster.

 

By the way, congratulations on the gaming awards! I don’t own a Playdate, but if I ever get to try one I know whose games I’ll want to try first.

Link to comment

Thanks so much!

 

I think there are some crossed wires in this, so let me summarise:

  • workflow used to be very fast almost instant
  • at some point it has become slow (Sonoma? I came straight from Monterey)
  • I'm using only the option "Only show apps in /Applications"
  • the mdfind part is instant (I mistakenly said mds earlier, sorry) ~1000 apps reported in a fraction of a second
  • the slow part is the xattr call which is taking 0.023 seconds per app on my machine, which for 1000 apps is the ~23 seconds

So I'm going to look into parallel-ising the xattr loop.

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...