Closed littke closed 3 years ago
Hi @littke, thanks for this info! Are you still using Alfred 3 or Alfred 4 already? Someone also mentioned this issue here with a little more info, funnily also regarding this workflow.
Some notes:
Maybe I need to find a replacement for lxml? Unfortunately it's quite difficult for me to reproduce it as I am still using Mojave and don't plan on using Catalina Beta anytime soon.
As a workaround, can you try installing lxml globally (STATIC_DEPS=true sudo pip install lxml
) and remove the lxml folder from the workflow?
Alfred 4. It indeed seems to work with my home computer, using Alfred 3.
I'll look into your request once I'm at work to see if it fixes it, that's where I have Alfred 4.
And your home computer is also using MacOS Catalina? That would be interesting 🤔
Yep. That worked.
Ok thanks, I will try to test the workflow in Alfred 4 in the coming days, maybe that makes a difference.
That worked, however:
And oh, when I resolve that (via homebrew — look at me pretending to be a programmer! woo), I get this error:
etc etc. I think I give up on this now :)
Thanks for testing, you made some progress. ;) Seems like all binaries distributed with my workflow cannot be opened. :(
I tried to reprocude this (on Mojave):
blueutil
and etree.so (lxml)
are workingterminal-notifier.app
could not be opened as my security settings did not allow to open files downloaded from the internetI was able to do the following:
Can you double-check if you have such a option after the error message comes up?
Regarding MacOS Catalina / Gatekeeper. I mostly think the direction Apple is taking here is noble, as they try to minimize the risk of running insecure applications. But, my gut feeling right now is that a huge amount of software must be notarized in retrospect and many applications won't work for a long time. As far as I understand, to notarize your app you must have a valid developer ID certificate, requiring you to pay $100 yearly. This won't happen for a lot of software out there. You can always disable Gatekepper, but I suppose many users won't do that.
Some articles on that:
I found some further issues where also quite popular apps suddenly stopped working in Catalina due to this:
What I don't fully understand yet: Would it be enough to notarize my workflow bundle? Or is it required that each packaged binary from other developers must have been notarized too?
Agree on all of the above.
What I don't fully understand yet: Would it be enough to notarize my workflow bundle? Or is it required that each packaged binary from other developers must have been notarized too?
Yeah, tricky question. Expensive to find out, too!
Hopefully some solution will emerge, irregardless of this plugin. Seems many others are fighting the same fight, so, something should emerge from it. Perhaps just lie low for now?
Yes, I will lie low for now, as I cannot really investigate this further. Once Catalina is out I can give it another try. For now, if you want to get the workflow working again (you are almost there):
brew install blueutil
And then update all ../blueutil
commands in the shellscripts to blueutil
. Same for terminal-notifier
:
brew install terminal-notifier
And change all occurrences of ../terminal-notifier.app/Contents/MacOS/terminal-notifier
to terminal-notifier
in the notify.sh
script. I haven't tested it, but in theory this should work then.
Any updates on this? Btw, even install blueutil
and changing all bash scripts in a workflow, still calling etree.so.
UPDATE
I've noticed, this works with an old version of workflow, but with latest one, like 0.5.0 gives etree.so error.
Hi @webcoderkz, let me start of by saying that I don't installed Catalina yet (and I am not sure when I will do), so it's difficult to reproduce and find a valid fix. This has a high priority though, as I can see that it's quite annoying if the workflow is not working.
A couple of questions:
etree.so
? Or did you also see errors regarding blueutil and terminal-notifier like @littke did?etree.so
was added in the first release already and did not change since.Appreciate any ideas!
I just updated to 0.6.0 via blt workflow:update
, now my airpods notification error is gone. But why this works only if i use an older version of this workflow, then update it?
You were too fast, see comment above. :)
@tilmanginzel
etree.so
error. When i type blt
in alfred 4, i immediately getting this error.sudo spctl --master-disable
, error still present.blt workflow:update
to the 0.6.0 and everything is working now.Here's the link to an old version of this workflow: https://yadi.sk/d/85ZhICC91MmGRg that works for me.
Thanks for the info. I would have thought that using sudo spctl --master-disable
would at least do the job (temporarily). Anyway, that would not be long term solution.
I will try to find a substitute or different approach to lxml as mentioned by Deanishe. Hopefully I can find time this week.
By the way, you can find all old releases here: releases
I saw releases page, but i downloaded this workflow, like 1 year ago if i not mistaken, so i wasn't sure, which version do i actually have. Basically, your workflow is built on top of blueutil
library, what does etree.so do?
etree.so (part of lxml) is used to parse the output of system_profiler SPBluetoothDataType -xml
. The native xml libraries in python had limited XPath support, so it was much easier to use lxml. blueutil was only introduced in a later workflow version.
system_profiler SPBluetoothDataType -xml
has a bit more information than blueutil (battery percentage). Maybe I should drop the battery percentage feature in favor of using only blueutil.
@webcoderkz Can you please check the following version: Bluetooth Connector.alfredworkflow.zip
LXML dependency was removed completely. Only blueutil is used to get device information.
I just downloaded that file myself, unzipped the workflow and unfortunately blueutil and terminal-notifier both have the quarantine flag set.
$ xattr blueutil
com.apple.quarantine
$ xattr terminal-notifier.app
com.apple.quarantine
So Gatekeeper will likely still complain :(
As a workaround for now, see: https://github.com/deanishe/alfred-sublime-text/issues/20#issuecomment-539578934
@tilmanginzel well, it works with an old version, that's why i gave you a link in a previous posts. But for the new users, it would be a problem on Catalina, because neither of the new versions would work without a hemorrage.
I know, that's why I am looking for a solution. ;) The old version does not have the notification feature which I really like.
I will look into correctly notarizing the workflow and the distributed binaries. Maybe I can find some time for this on the weekend or the coming week.
Wait, what notification features you're talking about? I have them. I have the latest 0.6.0 version of your workflow (but, as i mentioned before, i first installed an old version of workflow, then updated to an actual version with all bells and whistles).
Yes I am talking about that notification feature. I don't know why it is working when you download an old version first, and then upgrade. Basically we have these two options on Catalina:
So I will look into a proper solution for this. Will be easier when I have installed Catalina and get a Apple Developer ID Certificate.
I'm curious either, why it does work with an old version. Maybe you need to put a note in your readme with an old version, so Catalina users could use this workflow.
Basically we have these two options on Catalina
As a third option, you could perhaps use the notifier API in Alfred-Workflow: it uses AppleScript, so isn't subject to the same restrictions. Of course, there's no possibility to execute a command from the notification, though, and it would suck for Catalina users to lose that feature…
@deanishe do you have an idea, on why an old version of this workflow does work on Catalina?
As a third option, you could perhaps use the notifier API in Alfred-Workflow: it uses AppleScript, so isn't subject to the same restrictions. Of course, there's no possibility to execute a command from the notification, though, and it would suck for Catalina users to lose that feature…
Yup, I don't like to cut down on features because of this. :(
Maybe you need to put a note in your readme with an old version, so Catalina users could use this workflow.
Good point, done.
do you have an idea, on why an old version of this workflow does work on Catalina?
Not really. I'm still on High Sierra. Are the contents of the old version meaningfully different?
Is it possible that Catalina "remembers" that the old version is OK because you previously allowed in under Mavericks?
Dunno, i'll give it a try in a VM, to see if it's indeed remembered the old version in Mojave.
OSX 10.15.2 + Alfred 3 + release 0.8.0, just followed steps here. Simply put, you need to authorize both workflow and "blueutil" via "Security and Privacy" and restart alfred twice.
For those who failed to start the workflow (for me, I migrated Alfred from mac to mac):
blueutil
, cancel (do not move to trash). start Security & Privacy settings, general tab to allow execution of blueutil.After installing via brew install blueutil
I had to run which blueutil
and then update the workflow scripts to use the full path before the workflow would work for me. This is on OSX Catalina 10.15.3 with Alfred 4.0.8
Edit: This must have been using v0.4.0 of the workflow. I just updated to the latest and it works fine without any changes
I have two options:
blueutil
to runblueutil
and select "Open". The warning will pop up again, but now you have the option of allowing it.blueutil
will print some stuff. You can ignore it and close the terminal.blueutil
Similar to https://github.com/tilmanginzel/alfred-bluetooth-workflow/issues/9#issuecomment-518027027, except instead of editing each workflow script (tedious, especially if there are updates) we replace the workflow's blueutil
with a soft link to /usr/local/bin/bluetooth
brew install blueutil
ln -sf /usr/local/bin/blueutil
Similar can be done with Terminal Notifier if necessary, but I didn't have any security issues with that.
A potential improvement for @tilmanginzel to consider is to have a separate wrapper script that tries to use the Homebrew version if available and fall back to the included binary.
At some point this stopped working for me again with a permission denied error in alfred. @thirteen37's suggestion above to Right-click on blueutil and select "Open".
and then dismissing the encoding warning caused it to start working again.
Hello again! About a year later I am back with a new macOS Beta and this time I've got good news.
Installing this on Big Sur:
OK
Always allow
Allow
Works! ✨
Thanks for keeping everyone in the loop! 👍
Just installed on Catalina 10.15.6 and works similar to @littke's response https://github.com/tilmanginzel/alfred-bluetooth-workflow/issues/9#issuecomment-691705659! You can follow the same steps and install without any problems. Note that the error you get doesn't say to go to Security & Privacy like I believe it does for some applications, but not sure on that.
I am going to close this issue as the workflow is in use on Catalina (and Big Sur) for a while now. There's nothing to be done in the workflow itself, except for pointing users to the above workarounds (which is referenced in the readme).