Jump to content

nikivi

Member
  • Posts

    985
  • Joined

  • Last visited

  • Days Won

    21

Posts posted by nikivi

  1. 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.

  2. 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.

  3. 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.

     

    image.png.c89ea38a7ab57efe9cb5d3d735cc75ac.png


    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.

  4. 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. ♥️ 

  5. 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.

     

    image.thumb.png.1ac6bf13a5f421609e67322fdf65e198.png

     

    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.

     

    image.png.bad910f21b69850aa046f2934f27b26d.png

     

    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.

     

  6. 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:

     

    image.thumb.png.63c620fc3bcd4494fc1bc68e86acf807.png

     

    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.

  7. Came across this discussion on Go repo around code signing and Go apps.

    tl;dr is that one could use codesign command after building the binary and publishing it. If signed, binaries will run without any errors on other computers, no warning prompts or anything. Perhaps in future Go will be able to do the signing itself similar to clang and xcode. 

     

    I do wonder though why @deanishedidn't do this already. I personally didn't know about this but if I did, it would simplify the installs of workflows (no need to add extra instructions for how to avoid the unsgined binary warning). Going to look into adding codesign as a publishing step as a mage command.


    I left the comment on the issue as I am not sure how the process works. Someone has to validate the signature and whether you need to pay Apple to do it.

     

    Okay, from my Telegram macOS/iOS group, found the answer I was looking for:

    image.thumb.png.5613fb3ce08c71198e349d5c921adc46.png

  8. 10 minutes ago, vitor said:

    without scary warnings

     

    From my understanding, there is no longer even a warning now. The thing won't run on the new macs.

     

    Thanks for the nice article and answer. I suppose the answer is that if I want to build stuff for my own use, I don't need to pay anyone. But if I or anyone wants to share some compiled code with anyone, they'd need to either compile it themselves or pay Apple 100$ fee and sign the binary before shipping it. Otherwise the user simply won't be able to use it where even instructions like: https://github.com/deanishe/awgo/wiki/Catalina won't help.

     

    I am probably going to get the M2 16" macbook when that comes out, just trying to evaluate how much software I'd probably lose in the process. Specifically I don't mind recompiling Dean's or someone else's Go/Rust workflows but if say an update gets released to workflow, I'd need to go clone the repo, compile the thing, move the binary to the workflow (so workflow updates for compiled alfred workflows are broken unless author pays fee to sign things). Not sure if I've missed something perhaps.

  9. 1. Version of macOS: 11.0.1 Beta

    2. Didn't set it

     

    image.thumb.png.82e0591af7c2b5ca8260295a77a590d6.png

     

    3. Actually it appears my Spotlight is broken fully, whatever I search, returns only this:

     

    image.thumb.png.a69eb9bcd41ead4543cf3071695d9140.png

    4. Tried that, no change, the contact still doesn't show.

     

    I assume since the answer to question 2 is that I selected for Alfred to not use the Spotlight for searching contacts, there is not going to be any point in rebuilding spotlight index? I am going to try it anyway I suppose. It could also be that Alfred method of getting current contact on latest macOS Big Sur beta version is no longer working correctly.

     

    Thank you for any help.

  10. 7 hours ago, dfay said:

    have you tried rebuilding launch services so markdown files get the correct uti assigned?


    Last time I tried to look into it, I got stuck and didn't want to ask further questions. Will try again.

  11. The workflow is manage notes in here for reference. Perhaps I should run a reindexer but it's weird that `'` search returns results but the scoped things has buggy behavior. I assume that since the file is found through the all file search, the spotlight index is fine and something is off with Alfred?

    The workflow worked flawlessly before this recent Big Sur beta build. 

  12. I am running latest macOS Big Sur and I believe with recent build this issue started occuring. I have a workflow to search markdown files in a folder. Looks like this:

     

    image.png.3e49597f290ab748795954c990fc9763.png

     

    image.png.eec7af2feacf38004c5c48e3345f095e.png

     

    image.png.3cd02b978e48c87b13ad07e72aee8ff4.png

     

    There are some files that it should return but doesn't. For example this file:

     

    image.png.2fa5c44b0649a60da1aabeed3959d63c.png

     

    Is not returned:

     

    image.thumb.png.8cf33634441dd4d5cdccca4e8eab87c2.png

     

    Some other files are. Sometimes they do come back, sometimes they are no longer there. 

     

     

×
×
  • Create New...