Jump to content

Python and icalBuddy Calendar Workflow stopped working in Alfred 4?


Recommended Posts

I have a workflow that stopped working in Alfred 4 upgrade.  It use icalBuddy and now that seems to not be able to parse Calendars in Alfred.  

 

The workflow was written by someone in Python for Alfred 3 to query the Exchange Calendar and list the meeting invites and allow you to select one and join a WebEx meeting.  It is broken since upgrading to Alfred 4.  I tried doing some testing since it relies on iCalBuddy and when I try a simple BASH script in Alfred to output the Calendar entries in Alfred it fails.  However all other generic arguments to iCalBuddy seem to work.  I am wondering if it is some kind of permission issue that Alfred 4 does not have.  I have checked everything in Privacy Settings and see nothing.

 

The 1st  command in BASH shell script in Alfred outputs the version but the second fails to output the calendar entries.   Both work fine in Terminal

 

/usr/local/bin/icalBuddy -V
/usr/local/bin/icalBuddy calendars

Edited by mikedvzo
Link to comment
  • Andrew changed the title to Python 3 Exchange Calendar Workflow not working in Alfred 4?

I wanted to see if anyone else has run into issues with Alfred 3 workflows not functioning in Alfred 4.  So far I only have the 1 broken and it appears as if Alfred does not like the iCalBuddy program.  I tested and called the program from a BASH script in Alfred and it fails.  It works fine in Alfred 3 so I suspect it has something to do with Alfred 4 burping at the fact the program throws errors when it runs even though it still works.  

 

The 1st  command in BASH shell script in Alfred outputs the version but the second fails to output the calendar entries.   Both work fine in Terminal

 

/usr/local/bin/icalBuddy -V
/usr/local/bin/icalBuddy calendars

Link to comment

That was my initial thinking and I checked all the Privacy permissions and most seem to coincide with Alfred 3.  The only one that was granted for Alfred 3 and not for Alfred 4 was under Automation "Script Editor" and there is no way to grant it unless it is requested that I know of.  Alfred 4 is granted access to Calendar and also to Full Disk but still does not work.

 

I tried testing and ran a simple BASH Script workflow that printed the output and it runs the command:  /usr/local/bin/icalBuddy -V fine

When I try to print out the list of Calendars in Alfred with a BASH script it outputs nothing:  /usr/local/bin/icalBuddy calendars

 

 

So yes it does look like it cannot even access the list of Calendars from Alfred or it does not like the fact that the iCalBuddy programs spits file access errors when running but eta was not an issue with Alfred 3.  Here are the errors:

 

 

[DIVINCEM-mac] ~ > more test.sh

/usr/local/bin/icalBuddy -ic 32ED81EC-A838-452B-9ECC-34EB7161267C eventsNow 2> /dev/null | grep -m 1 "https" | sed 's/.*https\(.*\)/https\1/' | sed 's/\(.*\)[ |>].*/\1/' | cut -d ' ' -f 1

 

[DIVINCEM-mac] ~ > /usr/local/bin/icalBuddy calendars

2019-05-31 13:18:34.250 icalBuddy[7977:2367870] Error loading /System/Library/PrivateFrameworks/CalendarFoundation.framework/CalendarFoundation:  dlopen(/System/Library/PrivateFrameworks/CalendarFoundation.framework/CalendarFoundation, 265): no suitable image found.  Did find:

/System/Library/PrivateFrameworks/CalendarFoundation.framework/CalendarFoundation: mach-o, but wrong architecture

/System/Library/PrivateFrameworks/CalendarFoundation.framework/Versions/A/CalendarFoundation: mach-o, but wrong architecture

• Birthdays

  type: Birthday

  UID: B85D65E7-1609-4A4C-A15D-6C31C29CEE98

• Found in Natural Language

  type: Local

  UID: C0781289-C29D-48EE-80CB-FBF462BBC002

• Found in Apps

 

 

 

I did try suppressing the errors like this but still no good:  /usr/local/bin/icalBuddy calendars 2> /dev/null

Link to comment

That was my feeling from the start but I never denied Alfred any privileges.  Not sure where to go from here.  Went to Request permissions and the one thing Alfred 4 has that Alfred 3 does not is in the image but there is no way to change this.  819567676_ScreenShot2019-05-31at4_00_41PM.thumb.png.0a245386829469b18d19f86ce22bd041.png

Screen Shot 2019-05-31 at 4.00.34 PM.png

Edited by mikedvzo
Link to comment
8 minutes ago, deanishe said:

It works perfectly for me. It sounds like you might have denied Alfred 4 the necessary access permissions.

Just to be clear did you get a list of the Calendars or just the version number.  

Link to comment

Just finished an install of Alfred on another machine which the preferences are synced but that should not affect Permissions and I have the same result.  No calendar entries show just the version number.

Edited by mikedvzo
Link to comment
8 hours ago, mikedvzo said:

Just to be clear did you get a list of the Calendars or just the version number.  

 

Both. When I said it’s working for me, I meant it’s working ;)

 

But I was asked to grant Alfred permission to access my Reminders, which I did.

 

FWIW, I ran it in a High Sierra box, not Mojave.

 

The fact that it works in Terminal but not Alfred points to a permissions issue.

Link to comment

I thought so but wanted to make sure after my second machine has the same issue.  I am running Mojave and security has been tightened again so perhaps it is related.  I would like to see someone else test the workflow on Mojave.  

 

I checked and neither Alfred 3 or 4 has access to my reminders so not sure if that would be it but the iCalbuddy does list all the Calendars and the Reminders.  

 

Still baffled and thanks for all your help! :) 

Link to comment

So I looked at my console logs and I believe it is as we expected a permissions issue but since it is happening on 2 machines I believe it is an Alfred 4 with Mojave issue specifically.  I will post a new message in the bug forum since I have now duplicated the issue on more than one machine.  I receive the following log message every time I run the script from Alfred but I am never prompted to allow reminder access from Alfred.  In addition, neither Alfred 4 or Alfred 3 has permissions to Reminders in Privacy settings however Alfred 3 works fine.  That is why I believe it is a bug or compatialbity issue with how Mojave is handling things different than previous versions of Mac OS.  

 

default    12:09:16.911791 -0400    tccd    Prompting for access to kTCCServiceReminders from /Applications/Alfred 4.app/Contents/MacOS/Alfred on behalf of /usr/local/Cellar/ical-buddy/1.8.10/bin/icalBuddy
 

Edited by mikedvzo
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...