call_or_sms_contact icon indicating copy to clipboard operation
call_or_sms_contact copied to clipboard

Nothing works in macOS Mojave 10.14.6 (18G3020)

Open billyromano opened this issue 4 years ago • 5 comments

It just opens the app FaceTime or Messages and doesn't do anything after that...

billyromano avatar Jul 02 '20 17:07 billyromano

When a workflow isn't working, there's almost always an error message in Alfred's debugger that tells you what's going wrong. Please post the error, and if there isn't one, use the debugger to check that Alfred is passing the expected values around.

It's almost impossible to fix an issue based on a description like "doesn't do anything".

deanishe avatar Jul 09 '20 13:07 deanishe

If you look up in the debugger, you will find the error message

NSAppleScriptErrorBriefMessage = "The file /Applications/Contacts.app does not exist.";

This is because Catalina (10.15) moved the location of Contacts.app (or in your case Mojave). You only need to change the script of the "call [contact]" command from

	do shell script "open -j /Applications/Contacts.app"

to

	do shell script "open -j /System/Applications/Contacts.app"

You'll be all set.

Jinczhg avatar Nov 01 '20 20:11 Jinczhg

Ah yes, should have thought about the debugger. My bad.

Here's the output of the error. I'm now running Catalina (10.15) and still have the same error:

[00:35:30.791] Logging Started...
[00:35:35.434] Call or SMS contact[File Filter] Processing complete
[00:35:35.438] Call or SMS contact[File Filter] Passing output '/Users/user/Library/Application Support/AddressBook/Sources/45DA9F40-1C72-428E-A01E-E912ADBB2CEA/Metadata/FBB5FAF6-90A5-460D-ABD5-A545A2E9CEDC:ABPerson.abcdp' to Arg and Vars
[00:35:35.438] Call or SMS contact[Arg and Vars] Processing complete
[00:35:35.439] Call or SMS contact[Arg and Vars] Passing output '/Users/user/Library/Application Support/AddressBook/Sources/45DA9F40-1C72-428E-A01E-E912ADBB2CEA/Metadata/FBB5FAF6-90A5-460D-ABD5-A545A2E9CEDC:ABPerson.abcdp' to Run NSAppleScript
[00:35:35.569] ERROR: Call or SMS contact[Run NSAppleScript] {
    NSAppleScriptErrorAppName = Contacts;
    NSAppleScriptErrorBriefMessage = "Can\U2019t get person id \"FBB5FAF6-90A5-460D-ABD5-A545A2E9CEDC:ABPerson\".";
    NSAppleScriptErrorMessage = "Contacts got an error: Can\U2019t get person id \"FBB5FAF6-90A5-460D-ABD5-A545A2E9CEDC:ABPerson\".";
    NSAppleScriptErrorNumber = "-1728";
    NSAppleScriptErrorRange = "NSRange: {573, 5}";
}
[00:35:35.574] Call or SMS contact[Run NSAppleScript] Processing complete
[00:35:35.578] Call or SMS contact[Run NSAppleScript] Passing output '' to Replace
[00:35:35.578] Call or SMS contact[Replace] Processing complete
[00:35:35.579] Call or SMS contact[Replace] Passing output '' to Run Script
[00:35:35.717] Call or SMS contact[Run Script] Processing complete
[00:35:35.729] Call or SMS contact[Run Script] Passing output '' to Filter

billyromano avatar Nov 06 '20 05:11 billyromano

So obviously now it is able to locate the "Contact" app with the correct directory path. The problem here is it cannot find the person you input.

NSAppleScriptErrorBriefMessage = "Can\U2019t get person id "FBB5FAF6-90A5-460D-ABD5-A545A2E9CEDC:ABPerson".";

The possible reason is either you don't have this name that you type in in your contact, or you choose the wrong option when Alfred pops up "view contact in Alfred". For the latter one, for example, in your contact the person you want to call is saved as "Sam Smith", but when you just type in "Sam" in Alfred floating window, it will still give you two options, one is "view Sam in Alfred" and the other is "view Sam Smith in Alfred". You have to go with the latter one since "Sam" doesn't exist in your contact and the command won't work with Sam (it will just open Facetime in this case).

Jinczhg avatar Nov 08 '20 15:11 Jinczhg

When I use Alfred to find the contact, the contact exists in contacts. When I hit command + enter to make a call or send a message, it opens either the FaceTime app or Messages app, however, it doesn't do anything after that. It 'should' call or message the contact I selected which it does find in the Alfred results window. If a contact doesn't exist, then Alfred wouldn't show anything for the name I type, thus making your claim invalid. Also, I don't select view contact in Alfred, this is verified by me mentioning the FaceTime or messages app opens after I take action.

Any other ideas why it's not translating the action into either app?

billyromano avatar Nov 19 '20 17:11 billyromano