Calendar permission is not requested on MacOS (Ventura)

Same problem, would like more detailed instructions because I’m not sure how to do this. Thanks!

1 Like

Hi @pvillega @Cat,

Here are my steps (but do it with caution, back up your files):

  1. Save the XML in my previous reply in a file (say, ~/Downloads/entitlements-ob.xml).
  2. You need to use codegen to resign the Obsidian app using the xml. If you don’t have a signing certificate, you can follow this post to generate a code signing certificate with a certificate name (say, “My code signing cert”). You may need a CA if you don’t already have one, and the steps to create one are similar.
  3. Run in shell:
$ cd /Applications
$ codesign --entitlements ~/Downloads/entitlements-ob.xml -f -s "My code signing cert" Obsidian.app/

Re-launch the app, and it should now request Calendar permission when icalbuddy is first run.

HTH.

2 Likes

Ran into the same issue running icalBuddy in Keyboard Maestro. Just created my trusted CA cert and about to patch the obsidian app. How do you run icalBuddy in Templater? Thanks!

Hi, Thanks for your efforts. I have tried patching Obsidian and get the following error when executing codesign:

/Users/username/Downloads/entitlements-ob.xml: unrecognized blob type (accepting blindly)
/Users/username/Downloads/entitlements-ob.xml: invalid length in entitlement blob

Can you help?

entitlements-ob.xml.zip (833 Bytes)
You can try the xml I attached here.

I mostly followed this blog: How I Import My Meetings Into My Obsidian Daily Note | by Ben Newton | Medium

An earlier thread in Obsidian forum: Outlook agenda in Obsidian - #35 by Kataboy

I used the latest icalbuddy build from: Releases · dkaluta/icalBuddy64 · GitHub

Thanks for your help! I tried the steps and now could successfully patch with the xml file. However, the console in Obsidian still shows No Calendars as error and it also doesn’t work in Terminal. What can I do to make it work?

Can you post your Terminal output when you execute icalbuddy? If it doesn’t work in Terminal, it won’t work in Obsidian. Please make sure you’re running one of the latest versions of icalbuddy from Releases · dkaluta/icalBuddy64 · GitHub.

Attached the output, incl the version of iCalBuddy I am running.

@skylin3 I observed the same behavior as you, but was able to get it to work when ran the homebrew version of iCalBuddy:

/opt/homebrew/bin/icalBuddy -npn -nc -ps "/: /" -iep "datetime,title" -po "datetime, title" -b "\n\n### " -tf "%I:%M %p" -eed  eventsToday

Thanks, @lielu, for providing this workaround!

Hi thombehrens and lielu, The installation via homebrew worked and permission for calendars was asked for terminal. Same for Obsidian. So the solution with homebrew worked for me on macOS Ventura (13.0) and Apple M1. Thanks again for your help!

I’m in struggle street a little bit here.

I’ve tried installing the latest package from the repo above and get the below when trying to install

CleanShot 2022-12-01 at 13.31.06

Obviously there’s an issue here, not that I know more than that. When I create a new note I see the following error

CleanShot 2022-12-01 at 13.32.33

For Reference I’m running Ventura on a 2021 M1 Air

@gregb the install command uses python 2. This is no longer automatically installed with MacOS. Install Python2 from the Python website and you’ll be able to execute that script.

I have the same problem, but the easiest way to do the job is the following:

  • Make a bash script (ical.sh) containing your command icalBuddy and saving the output in a text file (ical.txt)
  • Run this script every minute/hour/… in order to keep update your calendar state
  • In Templater simply replace your icalBuddy command by /bin/cat ical.txt

That’s it! :slight_smile:

Precisions: the shell command crontab -e enables to run stuffs every minute/hour/etc. But if cron is not allowed to use calendar it will also raise an error: no calendar. In my settings Automator is allowed to use it, therefore I wrote a process in Automator running the shell script involving icalbuddy command, then saved it as an App (ical.app) and used cron to schedule the execution. In crontab -e I have inserted this line: * * * * * open /path/ical.app

To solve the problem for cron follow these links: macOS Catalina : No Calendars Error - Launchd · Issue #28 · ali-rantakari/icalBuddy · GitHub

I’ve verified the entitlement has been added to Obsidian v1.1.9 and the issue has been resolved.

This is still broken for me
Works fine in terminal but still get the ‘No calendars’ error in console when running through templater
Already updated to v1.1.9

Just a quick note for those who are still having this issue - I updated to the v1.1.9 installer, and it prompted me for calendar access when I used my script(s) to run icalBuddy. So if you haven’t updated your installer (look at Options->About) it is worth trying.

Hmm I’m still having this error as well. I’m on Obsidian v1.1.13, icalBuddy v1.10.1 installed via homebrew. Looks like this version doesn’t request the calendar entitlement (see below). @lielu, am I missing something here?

codesign -d --entitlements :- /Applications/Obsidian.app
Executable=/Applications/Obsidian.app/Contents/MacOS/Obsidian
Warning: Specifying ':' in the path is deprecated and will not work in a future release
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
    <key>com.apple.security.cs.disable-library-validation</key>
    <true/><key>com.apple.security.device.audio-input</key>
    <true/>
  </dict>
</plist>