sballin / alfred-search-notes-app

Use Alfred to quickly open notes in iCloud/Apple Notes.
https://www.alfredforum.com/topic/11716-search-appleicloud-notes/
MIT License
528 stars 24 forks source link

"Show Note Error -1743: Not authorized to send Apple events to Notes #83

Closed Jimmbo closed 6 months ago

Jimmbo commented 6 months ago

Downloaded v3.6.2 and installed (for use with Alfred v5.5 in MacOS 14.5).

I was not asked to authorize. I initiated this Alfred search: n aviadores

I got spinning cursor (but with good results). I canceled the operation, and was shown the system pop-up below:

SCR-20240526-kpuf

Manually checking authorizations, Alfred was ok for Full Disk Access and Accessibility. In Automation, Notes was toggled off for Alfred. I toggled it on, repeated my operation with Alfred Search Notes, and got the same error. Returned to the pref pane and found that Notes had toggled off! So I toggled it on again, claused/re-opened sys prefs, confirmed it was still toggled on, repeated my operation with Alfred Search Notes, got the same error, and discovered that Notes had once again toggled off.

sballin commented 6 months ago

Weird! Have you tried restarting your computer?

Jimmbo commented 6 months ago

Ha, yes.

sballin commented 6 months ago

hmm, I can't think of anything short of creating a new user and seeing if it goes away :/

Jimmbo commented 6 months ago

Can you please tell me how to do a thorough uninstall so I can try a reinstall?

sballin commented 6 months ago

Should be completely removed when you delete it from Alfred

Jimmbo commented 6 months ago

Just fwiw....I uninstalled, rebooted, checked and double checked toggle of Privacy & Security>Automation>Alfred 5>Notes, and it was toggled on. I installed the plug in, tried to search, and got the following pop-up (my toggling before installation seemed to eliminate the previous, simpler pop-up).

Returning to prefs, Alfred>Notes has untoggled.

Like last time, the plug-in is searching correctly; the only problem is when I try to open the Notes page

(update: I just tried another Notes search, and after getting and retiring the pop-up, the Alfred search box hung. Could not even edit the entered search term.

SCR-20240528-jxxu
sballin commented 6 months ago

do you have some anti-virus type apps running?

you could try testing the note showing function in Script Editor:

tell application "Notes"
    set noteid to id of third note in default account
    show note id noteid
end tell
Jimmbo commented 6 months ago

No anti-virus apps.

Testing your script:

  1. First trial with Privacy&Security>Automation>Alfred>Notes toggled off. Result showed a Notes panel without content
  2. Second trial, with the pref toggled on. It worked correctly, and the pref did not automatically toggle off. I did however get this in Script Editor: note id "x-coredata://99CD7EA2-EFBF-4ED5-800E-F05DB72E13BB/ICNote/p75926" of application "Notes"

Should I create a new user account and try again?

sballin commented 6 months ago

You could try changing the third line to show note id noteid in default account, does that make it work?

Do you have a very large number of notes? Are you using iCloud/local notes or do you have something like Gmail notes as well?

Jimmbo commented 6 months ago

It worked (but so did previous), and reported the following in Script Editor:

note id "x-coredata://99CD7EA2-EFBF-4ED5-800E-F05DB72E13BB/ICNote/p75926" of application "Notes"

Do you have a very large number of notes?

Nope

Are you using iCloud/local notes or do you have something like Gmail notes as well?

iCloud/local, yes. Gmail, no. Nothing else weird with Notes that I can think of.

sballin commented 6 months ago

Hmm ok, I'm out of ideas other than trying it with a new account

Jimmbo commented 6 months ago

Add to the annals of "try unplugging it and plugging it in again": I created new user, the plugin tested fine. Logged back in as my normal user, and now it's working here, as well.

I got a pop-up asking for permission, which I don't remember seeing previously. But now I can use plug-in without getting that pop-up (or error pop-ups).

If only cold fusion could be this easy....

sballin commented 6 months ago

ha, works every time! Funny that it fixed it on the normal user too.