Closed tilmanginzel closed 4 years ago
@trietsch @tbrek This bug was introcuded via https://github.com/tilmanginzel/alfred-bluetooth-workflow/commit/985ddd815042718f8a4818e21e31a7d65f507513 to fix https://github.com/tilmanginzel/alfred-bluetooth-workflow/issues/10. I can reproduce the issue it but interestingly it does not appear for all (unavailable) devices.
I don't entirely understand why it occurs though. If I use blueutil
directly on the command line, the exit code is always correct and states whether the device was connected or not. When executed in my script though, the exit code is sometimes incorrect.
The only viable solution I can think of is to use the blueutil --is-connected
command again, with a sleep 1
right before executing it. blueutil --is-connected
also sometimes returns an incorrect result, even though the device was connected successfully. So while the sleep 1
feels like a bad solution, I don't have any other for now. Will provide a version to test soon.
@tbrek Can you please test if the following version fixes the issue? :) Bluetooth Connector.alfredworkflow.zip
@tbrek New version 0.7.0 was just published which should mitigate the issue.
I did update via Alfred and I'm getting this now:
Also I'm not getting any notifications.
I've sorted notifications. Had to right-click run terminal-notifier and blueutil. I'm still getting those weird null
though.
Had to right-click run terminal-notifier and blueutil. I'm still getting those weird null though.
Is my assumption correct that you are on Catalina?
I'm still getting those weird null though.
Hm. We could probably just filter those values. Can you paste the content of the following command to check the output?
./blueutil --paired --format=JSON
I assume name
is null, but maybe the other values also look odd?
@tbrek Feel free to check if the version I posted here fixes it.
I am gonna close this issue for now as the incorrect notification problem is fixed. Let's continue with the null issue in #15 :)
Copied from @tbrek at https://github.com/trietsch/alfred-bluetooth-connector/issues/5
Steps to reproduce: