nikivi Posted November 21, 2020 Share Posted November 21, 2020 I took a look at changelog: `Create new URL Helper to parse raw / non-encoded (RFC 3986) URL strings, paving the way to overhauling Alfred's URL handling` And have a feeling this is what broke all my external triggers. If I have a trigger like: I activate those from Karabiner by calling osascript: https://github.com/nikitavoloboev/dotfiles/blob/master/karabiner/karabiner.edn#L7 `"osascript -e 'tell application \"Alfred 4\" to run trigger \"%s\" in workflow \"%s\" with argument \"%s\"'"` I am not sure what changed exactly but 4.2.1 update was working correctly and now nothing works. The external triggers don't get called and nothing gets logged in the console. Thank you for any help. Hopefully I don't need to downgrade and there is a fix for this. Link to comment
nikivi Posted November 21, 2020 Author Share Posted November 21, 2020 (edited) Okay found I guess I need to URL encode all spaces inside those strings. ~/.config/karabiner ❯ osascript -e 'tell application "Keyboard Maestro Engine" to do script "open: Safari"' ~/.config/karabiner ❯ osascript -e 'tell application "Alfred 4" to run trigger "search wiki" in workflow "nikivi.mind" with argument ""' 31:99: execution error: Not authorized to send Apple events to Alfred 4. (-1743) Strange it didn't even ask me for authorisation. KM call asked for authorization but then worked perfectly. Not sure which of these I should give Alfred for those external triggers to start working again. Okay I went in 'General' section in app and checked, I indeed gave all permissions to Alfred. Even Automation ones as I think that's the relevant bit. Specifically System Events has permission. No idea why it fails. Reading through this as I think that's my issue as I get no prompt showing up. Okay I am not sure, I downgraded to 4.2.1 and turned pre releases off. Perhaps there is a bug with macOS. Edited November 21, 2020 by nikivi Link to comment
deanishe Posted November 21, 2020 Share Posted November 21, 2020 33 minutes ago, nikivi said: I guess I need to URL encode all spaces inside those strings. You're not using URLs, though, are you? Link to comment
nikivi Posted November 21, 2020 Author Share Posted November 21, 2020 (edited) 3 minutes ago, deanishe said: You're not using URLs, though, are you? I am not, that's why I am confused. Don't know why it's failing. Apologize again for a wall of text, just my entire workflow relies on this stuff working so I went to a little panic mode (all my workflows are ran off external triggers, turns out using mac without Alfred is very painful). I downgraded and things work. Maybe someone knows an answer can reply. Would be very happy to hear it. ♥️ Edited November 21, 2020 by nikivi Link to comment
deanishe Posted November 21, 2020 Share Posted November 21, 2020 8 minutes ago, nikivi said: all my workflows are ran off external triggers What makes you think the problem is between Alfred and KM, not Karabiner and Alfred? Link to comment
nikivi Posted November 21, 2020 Author Share Posted November 21, 2020 (edited) 2 minutes ago, deanishe said: What makes you think the problem is between Alfred and KM, not Karabiner and Alfred? I think it's because all the KM macros are still working and are called in the same way. Using osascript. Karabiner just calls osascript shell command. Makes me think that perhaps I need to add some new permission to Karabiner Elements. I think that karabiner user server implies that permission was granted. Although console implies logging, not calling into shell commands. Very confusing. Also I don't think its karabiner <> alfred interaction because its Alfred that starts breaking after updating to new version. Karabiner version is the same. And the only thing in the changelog that implies breaking change is the URL thing. Edited November 21, 2020 by nikivi Link to comment
deanishe Posted November 21, 2020 Share Posted November 21, 2020 So the commands still work when run from the shell, but not when run from Karabiner? Link to comment
nikivi Posted November 21, 2020 Author Share Posted November 21, 2020 (edited) No, I get this when I run same commands in shell: ``` ~/.config/karabiner ❯ osascript -e 'tell application "Keyboard Maestro Engine" to do script "open: Safari"' ~/.config/karabiner ❯ osascript -e 'tell application "Alfred 4" to run trigger "search wiki" in workflow "nikivi.mind" with argument ""' 31:99: execution error: Not authorized to send Apple events to Alfred 4. (-1743) ``` With this 4.4.1 version I run `osascript -e 'tell application "Alfred 4" to run trigger "search wiki" in workflow "nikivi.mind" with argument ""'` and I did get a prompt to authorize. Something is off with permissions. Edited November 21, 2020 by nikivi Link to comment
nikivi Posted November 21, 2020 Author Share Posted November 21, 2020 (edited) Okay I hate computers. So I ran `osascript -e 'tell application "Alfred 4" to run trigger "search wiki" in workflow "nikivi.mind" with argument ""'` with Alfred version 4.2.1 and I finally got a prompt to authorize it. I did. Then I installed latest 4.2.2 pre release and things magically work. If someone comes across this, it's apparently useful to downgrade and try the same thing again then upgrade again. [Admin note: Downgrading and upgrading Alfred again does not resolve macOS permissions issues. There's no correlation between downgrading and fixing this issue so we do not recommend this as a solution.] What was annoying me most is that I never could get the authorization prompt to show and the answers in Stack Overflow weren't that helpful. Edited November 21, 2020 by Vero Admin note added Link to comment
deanishe Posted November 21, 2020 Share Posted November 21, 2020 (edited) 3 minutes ago, nikivi said: Something is off with permissions. Which is almost certainly a macOS issue, not an Alfred one. Try logging out and back in or rebooting. Edited November 21, 2020 by deanishe nikivi 1 Link to comment
nikivi Posted November 21, 2020 Author Share Posted November 21, 2020 Very appreciate that you still interact with me and try to help @deanishe. ♥️ Link to comment
Andrew Posted November 21, 2020 Share Posted November 21, 2020 1 hour ago, nikivi said: Create new URL Helper to parse raw / non-encoded (RFC 3986) URL strings, paving the way to overhauling Alfred's URL handling This won't have anything to do with the External Triggers, and currently is only internally being used for the URL handing from Alfred's Contacts Viewer (e.g. tel:). It will eventually replace all URL handling within Alfred though. nikivi 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now