vitorgalvao / alfred-workflows

Collection of Alfred workflows
BSD 3-Clause "New" or "Revised" License
2.44k stars 167 forks source link

DenteAzul can not work after update #85

Closed ChloroplastYu closed 5 years ago

ChloroplastYu commented 5 years ago

Setup info

Description of issue

After update to v1.2.0, when i input "btd" in Alfred, the Alfred can not show paired bluetooth devices, just like the picture: btd-1 btd-2

Debugger output

[18:23:03.054] Logging Started...
[18:23:28.520] DenteAzul[Script Filter] Queuing argument '(null)'
[18:23:28.702] DenteAzul[Script Filter] Script with argv '(null)' finished
[18:23:28.705] ERROR: DenteAzul[Script Filter] Code 1: blueutil: unrecognized option `--format'
blueutil v2.4.0

Usage:
  blueutil [options]

Without options outputs current state

    -p, --power               output power state as 1 or 0
    -p, --power STATE         set power state
    -d, --discoverable        output discoverable state as 1 or 0
    -d, --discoverable STATE  set discoverable state

        --favourites          list favourite devices
        --inquiry [T]         inquiry devices in range, 10 seconds duration by default excluding time for name updates
        --paired              list paired devices
        --recent [N]          list recently used devices, 10 by default

        --info ID             show information about device
        --is-connected ID     connected state of device as 1 or 0
        --connect ID          create a connection to device
        --disconnect ID       close the connection to device
        --pair ID [PIN]       pair with device, optional PIN of up to 16 characters will be used instead of interactive input if requested in specific pair mode

    -h, --help                this help
    -v, --version             show version

STATE can be one of: 1, on, 0, off, toggle
ID can be either address in form xxxxxxxxxxxx, xx-xx-xx-xx-xx-xx or xx:xx:xx:xx:xx:xx, or name of device to search in used devices
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `new'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `parse'
    from /Users/chloroplast/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/C32E0EDE-9811-497F-AADE-20B6AC767E0D:6:in `<main>'
vitorgalvao commented 5 years ago

rm "${HOME}/Library/Application Support/Alfred/Workflow Data/com.vitorgalvao.alfred._sharedresources/bin/blueutil" should fix it, so it auto-updates blueutil to the new version.

ChloroplastYu commented 5 years ago

It work! Thank u so much!