Jump to content
mikedvzo

Python and icalBuddy Calendar Workflow stopped working in Alfred 4?

Recommended Posts

Posted (edited)

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post
Posted (edited)

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

Share this post


Link to post
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.  

Share this post


Link to post
Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post

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! :) 

Share this post


Link to post
Posted (edited)

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

Share this post


Link to post

FYI - This was fixed by Andrew in another Post that I opened.  Turns out it was Alfred not requesting permissions properly.  

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...