Skip to content

MacVim can't communicate via AppleEvents due to missing security declaration in manifest #821

@shayneholmes

Description

@shayneholmes

Noticed an issue editing nvALT notes in MacVim (commented on ttscoff/nv#496), but the root cause seems to MacVim's declared security permissions.

This issue should affect other interprocess communication via AppleEvents, but I don't know of any others to test it with.

Preconditions:

  • Using MacOS Mojave
  • nvALT installed
  • nvALT has MacVim set as its external editor
  • nvALT is storing notes in a single database

Steps:

  1. Edit a note with external editor. (MacVim opens with the note's content.)
  2. Change the note and save.

Expected:

The note updates in nvALT.

Actual:

No update. Console shows these logs:

error	11:25:39.605395 -0800	tccd	Refusing TCCAccessRequestIndirect for service kTCCServiceAppleEvents and client /Applications/MacVim.app[0] without NSAppleEventsUsageDescription key
default	11:25:39.605565 -0800	nvALT	TCCAccessRequestIndirect_block_invoke: access request result was 0, timeout was 0
error	11:25:39.605914 -0800	nvALT	Since sending application [sess=xxx pid=xxx uid:x,x,x g:20,20 pV:xxx] is not permitted to send this AppleEvent to this process, returning an errAEEventNotPermitted reply.

Causes:

The error log mentions NSAppleEventsUsageDescription, and running through the steps above after placing that key in Info.plist results in a new dialog being shown:

image

After the user clicks "OK", the note updates as it should.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions