iansinnott / alfred-maestro

An Alfred workflow to execute Keyboard Maestro macros.
MIT License
414 stars 23 forks source link

"Unable to get macros from Keyboard Maestro" #22

Closed ghost closed 5 years ago

ghost commented 5 years ago

How do I get rid of this error?

maltsev commented 5 years ago

Can you provide us with some additional info, which would help us find the bug?

ghost commented 5 years ago

I get command not found. It looks like its some sort of permission, because I remember being asked a question when typing "km"... but I just kept typing and the question went away.

maltsev commented 5 years ago

I just kept typing and the question went away

So now you see the macros?

ghost commented 5 years ago

No, still the same error.

tthkbw commented 5 years ago

I also have this problem. I have pasted the output of the terminal command after this message. That output shows all my Keyboard Maestro macros. However, even after doing this, Alfred still responds the same, with the message "Unable to get macros . . ."

I am using Alfred 3.8 and Keyboard Maestro 7.3.1.

Other suggestions?

11:17:21 ----------------- (AwGo/0.13.2) ----------------- { "variables": { "AW_SESSION_ID": "0YJ6LRCT01WCS03KH1M68OJ1" }, "items": [ { "title": "Custom HTML Prompt Example", "arg": "4AD03836-C696-4DE0-A61D-D915E371949A", "uid": "4AD03836-C696-4DE0-A61D-D915E371949A", "valid": true }, { "title": "Activate Application Launcher", "subtitle": "⌃⌘⇥", "arg": "12B1311E-B427-4D53-9933-F1CA69CFA3EE", "uid": "12B1311E-B427-4D53-9933-F1CA69CFA3EE", "valid": true }, { "title": "Activate Clipboard Copy Switcher", "subtitle": "⇧⌘C", "arg": "58870431-648B-4502-80A6-62E71BEB5E57", "uid": "58870431-648B-4502-80A6-62E71BEB5E57", "valid": true }, { "title": "Home Address Line 1", "arg": "7BA63C5F-FDC1-41FA-B865-72357742E343", "uid": "7BA63C5F-FDC1-41FA-B865-72357742E343", "valid": true }, { "title": "Colloquy Ebooks", "arg": "80607FBC-1C07-4DD4-863F-7EBE19ECB373", "uid": "80607FBC-1C07-4DD4-863F-7EBE19ECB373", "valid": true }, { "title": "Insert Date and Time", "arg": "1EA572BE-4281-44D2-BF29-53C5EB90B6E4", "uid": "1EA572BE-4281-44D2-BF29-53C5EB90B6E4", "valid": true }, { "title": "Safari Web Favorites", "arg": "32412F1F-8974-477E-BEEB-5CE23BEA58AF", "uid": "32412F1F-8974-477E-BEEB-5CE23BEA58AF", "valid": true }, { "title": "Quick Macro for ⌥F1 [Quick Macro]", "subtitle": "⌃⌥F", "arg": "191B56AC-2E2A-4735-B5EA-245E7462CA4E", "uid": "191B56AC-2E2A-4735-B5EA-245E7462CA4E", "valid": true }, { "title": "Gmail Address", "arg": "2A6017E8-8FEA-4520-B117-6FBC7074592B", "uid": "2A6017E8-8FEA-4520-B117-6FBC7074592B", "valid": true }, { "title": "Previous Application", "subtitle": "⌃⌥⇧⌘N", "arg": "8AE4F5F7-56C6-44D5-BDA1-CEA7688AB7EB", "uid": "8AE4F5F7-56C6-44D5-BDA1-CEA7688AB7EB", "valid": true }, { "title": "Search the Web", "subtitle": "⌃⇧G", "arg": "67DD06C7-7091-4346-8D8A-988E2CD68FEC", "uid": "67DD06C7-7091-4346-8D8A-988E2CD68FEC", "valid": true }, { "title": "Activate Clipboard History Switcher", "subtitle": "⌃⇧⌘V", "arg": "11338910-49E1-4310-943C-27D10E7FF2BB", "uid": "11338910-49E1-4310-943C-27D10E7FF2BB", "valid": true }, { "title": "Activate Clipboard Paste Switcher", "subtitle": "⇧⌘V", "arg": "0D24E5DD-FFE9-44A8-A237-D9C9D3345658", "uid": "0D24E5DD-FFE9-44A8-A237-D9C9D3345658", "valid": true }, { "title": "Switch Apps", "subtitle": "F1", "arg": "1DC49397-589D-486C-ABAD-ADC0DE4F3A48", "uid": "1DC49397-589D-486C-ABAD-ADC0DE4F3A48", "valid": true }, { "title": "Reset Macro stuff", "arg": "39D27F5E-BACA-4D42-9AB3-9FFA873CEFF2", "uid": "39D27F5E-BACA-4D42-9AB3-9FFA873CEFF2", "valid": true }, { "title": "Toggle Sound Output", "arg": "23DD323D-0A96-4DC6-9CE6-20259A7A5EB6", "uid": "23DD323D-0A96-4DC6-9CE6-20259A7A5EB6", "valid": true }, { "title": "Trigger Macro by Name", "subtitle": "⌃⌥⌘T", "arg": "478B5E58-3085-401D-AF42-B2853C817013", "uid": "478B5E58-3085-401D-AF42-B2853C817013", "valid": true }, { "title": "Quick Macro", "arg": "9B3B877D-9870-46E4-8E8C-2D016552EE54", "uid": "9B3B877D-9870-46E4-8E8C-2D016552EE54", "valid": true }, { "title": "Safari PDF Save", "arg": "A5C22DF7-7A9D-4328-B57E-CE32F89D9D60", "uid": "A5C22DF7-7A9D-4328-B57E-CE32F89D9D60", "valid": true }, { "title": "Address City State", "arg": "BCA77E1A-E77E-4040-9229-4D983484B16C", "uid": "BCA77E1A-E77E-4040-9229-4D983484B16C", "valid": true }, { "title": "Update Word Count", "arg": "C02360DC-55A0-4765-ADA6-FB54F2A1C9E9", "uid": "C02360DC-55A0-4765-ADA6-FB54F2A1C9E9", "valid": true }, { "title": "Improved Title Case", "arg": "DB28FD19-ECD0-4E01-9E59-2F5977D6F7BF", "uid": "DB28FD19-ECD0-4E01-9E59-2F5977D6F7BF", "valid": true }, { "title": "Macro Palette Toggle", "subtitle": "⌥⌘K", "arg": "3A710DFD-98E2-44D4-8FEA-C2D39D16DDF2", "uid": "3A710DFD-98E2-44D4-8FEA-C2D39D16DDF2", "valid": true }, { "title": "1Pass Login", "subtitle": "⌥⌘P", "arg": "9D191DB6-C9AB-4C12-B641-0CD22F8AB794", "uid": "9D191DB6-C9AB-4C12-B641-0CD22F8AB794", "valid": true }, { "title": "Get Book from Vim Highlight", "subtitle": "⌥⌘G", "arg": "10761C23-C5DB-4BF7-B49F-E7AC32240FBC", "uid": "10761C23-C5DB-4BF7-B49F-E7AC32240FBC", "valid": true }, { "title": "Paste Selection Into Last Application", "subtitle": "⌥⇧⌘C", "arg": "A6D5B23B-B596-4B1D-BCD9-CAC0F0EAD9E9", "uid": "A6D5B23B-B596-4B1D-BCD9-CAC0F0EAD9E9", "valid": true }, { "title": "Quick Macro for ⌥F1", "subtitle": "⌃F1", "arg": "E52486EC-A4E5-4560-B3A8-704ACB0E7539", "uid": "E52486EC-A4E5-4560-B3A8-704ACB0E7539", "valid": true }, { "title": "Activate Clipboard Cut Switcher", "subtitle": "⇧⌘X", "arg": "3A282640-F28B-491F-AB54-1C3E43865FE3", "uid": "3A282640-F28B-491F-AB54-1C3E43865FE3", "valid": true } ] }11:17:27 Sent 28 result(s) to Alfred 11:17:27 ---------------------- 5.8s ----------------------

maltsev commented 5 years ago

What macOS version do you use? Do you remember when this issue appeared first? Or was it always that way?

If you use macOS Mojave then it might be related to privacy settings. Can you check if Alfred has all needed access to your system?

Can you also check that Alfred could control Keyboard Maestro? It's in the Automation tab in the same window.

image

tthkbw commented 5 years ago

I am using macOS 10.14.3. I suspected this might be an access problem, but couldn't find it. Your suggestion to check the Automation tab solved the problem. Keyboard Maestro was listed under Alfred3.app, but was not enabled.

Now it works as advertised and is marvelous. Thank you for the help.

ghost commented 5 years ago

It worked maltsev, thank you! Mine was not enabled too and now everything is back to normal.

maltsev commented 5 years ago

I'm glad it helped. I added information on how to fix that issue also to README.md.

coleander commented 4 years ago

Hi everyone. I'm experiencing this exact problem. I've tried all suggestions, but I can't get Alfred to show up in the Automation tab in settings. I've tried reinstalling Alfred (And removing all preference files), removed the workflow multiple times with no luck. When I try _"Can you right-click on the Alfred Maestro workflow in Alfred, select Open in Terminal, run alfred_workflowbundleid="net.deanishe.awgo" ./alfred-maestro command, and paste the output here?" mentioned by @maltsev

This is what I get:

user.workflow.A1E262D1-FD97-495E-9E6F-27F23DA29A5E alfred_workflow_bundleid="net.deanishe.awgo" ./alfred-maestro
panic: Invalid Workflow environment: alfred_workflow_cache is not set, alfred_workflow_data is not set

goroutine 1 [running]:
github.com/deanishe/awgo.NewFromEnv(0x0, 0x0, 0x0, 0x0, 0x0, 0x1102016)
    /Users/maltsev/dev/go/src/github.com/deanishe/awgo/workflow.go:146 +0x979
github.com/deanishe/awgo.New(...)
    /Users/maltsev/dev/go/src/github.com/deanishe/awgo/workflow.go:135
main.init.0()
    /Users/maltsev/dev/go/src/github.com/iansinnott/alfred-maestro/main.go:71 +0x38
maltsev commented 4 years ago

When I try "Can you right-click on the Alfred Maestro workflow in Alfred, select Open in Terminal, run alfred_workflow_bundleid="net.deanishe.awgo" ./alfred-maestro command, and paste the output here?"

This instruction was for Alfred 3. I suppose you use Alfred 4? It requires two more variables:

You can read more about them in the awgo docs.

In my case they're:

alfred_workflow_bundleid="net.deanishe.awgo" alfred_workflow_cache="/Users/maltsev/Desktop/cache/" alfred_workflow_data="/Users/maltsev/Library/Application Support/Alfred/Workflow Data/iansinnott.keyboardmaestro" ./alfred-maestro

But your paths would be different.

taylornd commented 3 years ago

When I try "Can you right-click on the Alfred Maestro workflow in Alfred, select Open in Terminal, run alfred_workflow_bundleid="net.deanishe.awgo" ./alfred-maestro command, and paste the output here?"

This instruction was for Alfred 3. I suppose you use Alfred 4? It requires two more variables:

  • alfred_workflow_cache
  • alfred_workflow_data

You can read more about them in the awgo docs.

In my case they're:

alfred_workflow_bundleid="net.deanishe.awgo" alfred_workflow_cache="/Users/maltsev/Desktop/cache/" alfred_workflow_data="/Users/maltsev/Library/Application Support/Alfred/Workflow Data/iansinnott.keyboardmaestro" ./alfred-maestro

But your paths would be different.

When I paste that in terminal all I get is - it seems to hang there:

🍺 14:32:30 ----------------- (AwGo/0.17.0) -----------------

taylornd commented 3 years ago

Does Go need to be installed for the workflow to work? Or maybe an apple silicon M1 issue

nikitavoloboev commented 3 years ago

No, the binary is compiled already when you download the workflow.

You may need to do this: https://github.com/deanishe/awgo/wiki/Catalina

So you have permissions to run unsigned binary.

taylornd commented 3 years ago

Thanks. I’ve checked all those permissions and it seems to run but just get stuck and nothing happen I.e.

14:32:30 ----------------- (AwGo/0.17.0) -----------------

AH11111221 commented 2 years ago

It does not work in Alfred (4.63).. I can not find Keyboard Maestro (Version 10.0.2) in the automation setting.

Screen Shot 2022-03-02 at 10 18 56 PM

.

kurko commented 1 year ago

I second @AH11111221 . It's not working in Alfred. Debugging it, though, I see

Screenshot 2023-02-16 at 12 03 27

I ran chmod +x alfred-maestro, and now got the variable errors

Screenshot 2023-02-16 at 12 05 02
kurko commented 1 year ago

Actually adding the variables above worked, but now it's just complaining it doesn't know how to get maestro's config.

Screenshot 2023-02-16 at 12 09 37
iansinnott commented 1 year ago

@kurko can you walk through how you installed it? This is currently working for me on Alfred 4.8.

AnKingMed commented 11 months ago

I hate to bring this up so late in the game, but I'm having issues with Alfred 5 and the latest KM version. It's working on one of my computers, but I just got a new one and can't get it to work. When I go to the automation settings in Privacy and Security, Keyboard maestro is not listed under Alfred, but there's no way for me to add it. Any suggestions? Love the workflow!

image

Edit: here is the debugger

[13:06:31.900] Alfred Maestro[Script Filter] Queuing argument ''
[13:06:31.970] Alfred Maestro[Script Filter] Script with argv '' finished
[13:06:31.976] ERROR: Alfred Maestro[Script Filter] Code 126: /Users/nick/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/B98F8492-0956-4E1E-8732-87DE635B1358: line 1: ./alfred-maestro: Bad CPU type in executable
AnKingMed commented 2 weeks ago

I'm still not able to do this. It seems it may be related to the apple silicon chip?