Jump to content

valrus

Member
  • Posts

    4
  • Joined

  • Last visited

Posts posted by valrus

  1. I'm having an issue where Alfred is completely unresponsive on a second user account (I have a "main" account for personal use and a "work" account for when I work from home, and it's the latter under which Alfred doesn't work). It works fine under the main account. This is a couple weeks after my updating to Mojave, but it didn't happen immediately.

     

    Symptoms / related notes: I can launch Alfred Preferences. Alfred 3 shows up in Activity Monitor but the hotkey doesn't bring it up and the menubar icon doesn't appear (though I've enabled it in the Preferences); sometimes it becomes "(Not Responding)" in Activity Monitor after a short while, but inconsistently.

     

    Here are the console messages (filtered by term "alfred") that I see after trying to launch Alfred:

    Quote

    default    09:09:35.840734 -0700    Alfred Preferences    27366555: RECEIVED OUT-OF-SEQUENCE NOTIFICATION: 0 vs 249, 513, <private>
    default    09:10:03.884249 -0700    loginwindow    -[ApplicationManager checkInAppContext:refCon:eventData:] |      checked in app : Alfred 3
    default    09:10:03.929579 -0700    launchservicesd    CHECKIN:0x0-0x2f02f0 53278 com.runningwithcrayons.Alfred-3
    default    09:10:03.931461 -0700    loginwindow    -[ApplicationManager checkInAppContext:refCon:eventData:] |      checked in app : Alfred 3
    default    09:10:03.944311 -0700    tccd    -[TCCDAccessIdentity staticCode]: static code for: identifier com.runningwithcrayons.Alfred-3, type: 0: 0x7f8c63f1dbf0 at /Applications/Alfred 3.app
    default    09:10:03.966071 -0700    Alfred 3    Current system appearance, (HLTB: 1), (SLS: 0)
    default    09:10:03.968968 -0700    Alfred 3    Post-registration system appearance: (HLTB: 1)
    error    09:10:03.969592 -0700    Alfred 3    Unable to load Info.plist exceptions (eGPUOverrides)
    default    09:10:03.978098 -0700    Alfred 3    NSApp cache appearance:
    -NSRequiresAquaSystemAppearance: 1
    -appearance: (null)
    -effectiveAppearance: <NSCompositeAppearance: 0x600002cc0a50
     (
        "<NSAquaAppearance: 0x600001ac6c80>",
        "<NSSystemAppearance: 0x600001ac6d80>"
    )>
    default    09:10:04.033379 -0700    tccd    -[TCCDAccessIdentity staticCode]: static code for: identifier com.runningwithcrayons.Alfred-3, type: 0: 0x7f8c63f432a0 at /Applications/Alfred 3.app
    default    09:10:04.042040 -0700    Alfred 3    UNIX error exception: 17
    default    09:10:04.045071 -0700    Alfred 3    UNIX error exception: 17
    default    09:10:04.047810 -0700    Alfred 3    UNIX error exception: 17
    default    09:10:04.049927 -0700    Alfred 3    UNIX error exception: 17
    default    09:10:04.053776 -0700    Alfred 3    UNIX error exception: 17
    default    09:10:04.221917 -0700    tccd    -[TCCDAccessIdentity staticCode]: static code for: identifier com.runningwithcrayons.Alfred-3, type: 0: 0x7faa38d29510 at /Applications/Alfred 3.app
    default    09:10:05.066867 -0700    tccd    -[TCCDAccessIdentity staticCode]: static code for: identifier com.runningwithcrayons.Alfred-3, type: 0: 0x7faa38e3bfe0 at /Applications/Alfred 3.app
    default    09:10:05.090871 -0700    tccd    -[TCCDAccessIdentity staticCode]: static code for: identifier com.runningwithcrayons.Alfred-3, type: 0: 0x7faa38c25ac0 at /Applications/Alfred 3.app
    default    09:10:05.114321 -0700    tccd    -[TCCDAccessIdentity staticCode]: static code for: identifier com.runningwithcrayons.Alfred-3, type: 0: 0x7faa38e384b0 at /Applications/Alfred 3.app
    default    09:10:13.974138 -0700    Alfred 3    LSExceptions shared instance invalidated for timeout.

     

  2. I figured it out. The problem is that I was triggering the script filter with a hotkey, and I had incorrectly chosen "Pass through to workflow" rather than "Show Alfred" as the Action.

     

    I'm not totally clear on why this matters; since my script filter doesn't actually use its arguments when "Alfred filters results" is checked, why should it matter if I pass something in from the hotkey? If someone can explain that, it might help my understanding. But my main problem is solved.

  3. I'm working on a script to play music using MPD. I want to list available albums and have Alfred filter them rather than doing the filtering myself in a script filter. But when I check the "Alfred filters results" check box, the result is an empty list regardless of what I type:

    Screen Shot 2017-03-07 at 5.11.36 PM.png

     

    If, on the other hand, I uncheck that box, I get a list of albums as expected, but I can't type to filter them:

    Screen Shot 2017-03-07 at 5.12.14 PM.png

     

    Here's my code, in Python. It's really not very complicated:

    from __future__ import unicode_literals
    from __future__ import print_function
    
    import json
    import os
    import subprocess
    import sys
    
    MUSIC_DIR = '/Users/Shared/iTunes/iTunes Media/Music'
    FIND_CMD = [
        '/usr/local/bin/mpc', 'list', 'album'
    ]
    
    
    def make_item(album_name):
        return dict(
            title=album_name,
            uid=album_name,
            valid=True,
            arg=json.dumps({'album': album_name}),
            icon='icon.png',
            autocomplete=album_name,
        )
    
    
    def main():
        print(json.dumps({
            'items': [
                make_item(item)
                for item in subprocess.check_output(FIND_CMD).decode('utf-8').split('\n')
                if item.strip()
            ]
        }))
    
    
    if __name__ == '__main__':
        sys.exit(main())

     

    Can anyone tell me what I might be doing wrong?

×
×
  • Create New...