Jump to content

sjcjonker

Member
  • Posts

    4
  • Joined

  • Last visited

Posts posted by sjcjonker

  1. Hi Deanishe,

     

    Apologies if this hasn't changed then something else surely must have changed. I then need to revisit the updates & actions log I keep to find what else has changed, although I'm certain it started after the update. Maybe two updates coming together, as Chrome is often updated in the background.

     

    I'm aware of the passing of by Chrome to the running processes, which none of the "fresh" items in the workflow do. 

     

    Thanks for your feedback I'll continue my hunt; but I guess I can rule out Alfred. 

  2. Hi There,

     

    On macOS 11.6 build 20G165 (on M1 laptop) with Alfred 4.6 Build 1266 there is a slight change in the running of workflows as it seems. I most note I also have Little Snitch version 5.3.1 installed. Little Snitch is an outbound firewall so to say for MacOS.

     

    Before I installed Alfred Build 4.6 and I ran my workflow "runChrome" which has options to run a new empty Chrome profile, ignore all TLS Errors and/or with a proxy for SSH port forward enabled this worked fine with Little Snitch as Little Snitch used the rules defined for Chrome.

     

    Now since Alfred 4.6, at least I think that's what triggered it, when I run Chrome via this workflow, Little Snitch is asking to grant outbound network access to Alfred instead of Chrome for the actual Chrome process/Window.

     

    My guess is that with Alfred 4.6 the way a script is launched from the workflow is different than the previous Alfred 4.5.1, almost like it's a full child process and doesn't get spawned as a more or less disconnected process. I did check to see if there was an option like this on the workflow, but I don't believe so.

     

    As I can't attach the workflow, here is the code, this all there is to the workflow and script.

     

    Please advice if something changed in 4.6, happy to debug / test further but would need some guidance how to do this in Alfred, as the log window for the workflow only said:

    Quote

     

    [20:49:44.068] Logging Started...

    [20:49:51.243] Run Chrome[List Filter] Processing complete

    [20:49:51.247] Run Chrome[List Filter] Passing output 'fresh' to Run Script

     

     

     

    Thanks in advance!

    Stijn

     

    Workflow:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
            <key>bundleid</key>
            <string>nl.sjc.runChrome</string>
            <key>category</key>
            <string>Productivity</string>
            <key>connections</key>
            <dict>
                    <key>F89ECEC3-23A4-42A9-BDD2-694AE847EB41</key>
                    <array>
                            <dict>
                                    <key>destinationuid</key>
                                    <string>9452871A-321F-4B2B-9941-99CAF74D947C</string>
                                    <key>modifiers</key>
                                    <integer>0</integer>
                                    <key>modifiersubtext</key>
                                    <string></string>
                                    <key>vitoclose</key>
                                    <false/>
                            </dict>
                    </array>
            </dict>
            <key>createdby</key>
            <string>Stijn Jonker</string>
            <key>description</key>
            <string>Launch Chrome</string>
            <key>disabled</key>
            <false/>
            <key>name</key>
            <string>Run Chrome</string>
            <key>objects</key>
            <array>
                    <dict>
                            <key>config</key>
                            <dict>
                                    <key>argumenttrimmode</key>
                                    <integer>0</integer>
                                    <key>argumenttype</key>
                                    <integer>1</integer>
                                    <key>fixedorder</key>
                                    <true/>
                                    <key>items</key>
                                    <string>[{"title":"Fresh","arg":"fresh","subtitle":"Fresh Incognito Profile"},{"title":"FreshProxy","arg":"freshproxy","subtitle":"Fresh Incognito Profile w\/ Proxy"},{"title":"FreshNoCert","arg":"freshnocert","subtitle":"Fresh Incognito Profile no cert check"},{"title":"FreshNoCertProxy","arg":"freshnocertproxy","subtitle":"Fresh Incognito Profile w\/ Proxy no cert check"},{"title":"Proxy","arg":"proxy","subtitle":"Normal Profile w\/ Proxy"}]</string>
                                    <key>keyword</key>
                                    <string>runchrome</string>
                                    <key>runningsubtext</key>
                                    <string></string>
                                    <key>subtext</key>
                                    <string>Which mode would you like to use?</string>
                                    <key>title</key>
                                    <string>RunChrome</string>
                                    <key>withspace</key>
                                    <true/>
                            </dict>
                            <key>type</key>
                            <string>alfred.workflow.input.listfilter</string>
                            <key>uid</key>
                            <string>F89ECEC3-23A4-42A9-BDD2-694AE847EB41</string>
                            <key>version</key>
                            <integer>1</integer>
                    </dict>
                    <dict>
                            <key>config</key>
                            <dict>
                                    <key>concurrently</key>
                                    <true/>
                                    <key>escaping</key>
                                    <integer>102</integer>
                                    <key>script</key>
                                    <string>/Users/sjcjonker/Documents/Scripts/AlfredChromeRun.sh {query}</string>
                                    <key>scriptargtype</key>
                                    <integer>0</integer>
                                    <key>scriptfile</key>
                                    <string></string>
                                    <key>type</key>
                                    <integer>0</integer>
                            </dict>
                            <key>type</key>
                            <string>alfred.workflow.action.script</string>
                            <key>uid</key>
                            <string>9452871A-321F-4B2B-9941-99CAF74D947C</string>
                            <key>version</key>
                            <integer>2</integer>
                    </dict>
            </array>
            <key>readme</key>
            <string></string>
            <key>uidata</key>
            <dict>
                    <key>9452871A-321F-4B2B-9941-99CAF74D947C</key>
                    <dict>
                            <key>xpos</key>
                            <integer>450</integer>
                            <key>ypos</key>
                            <integer>255</integer>
                    </dict>
                    <key>F89ECEC3-23A4-42A9-BDD2-694AE847EB41</key>
                    <dict>
                            <key>xpos</key>
                            <integer>125</integer>
                            <key>ypos</key>
                            <integer>50</integer>
                    </dict>
            </dict>
            <key>variablesdontexport</key>
            <array/>
            <key>version</key>
            <string>0.0.1</string>
            <key>webaddress</key>
            <string>www.sjc.nl</string>
    </dict>
    </plist>

     

    The (ugly) shell script called is:

    #/Users/sjcjonker/Scripts/AlfredRunChrome.sh {query}
    OPT=${1}
    # Any command in a pipe fails, then all fail
    # Unset variables are an error!
    set -u -o pipefail
    # Chrome CMDLine for proxy
    CHROMEBIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
    # --incognito
    CHROMEOPT="--incognito --disable-logging --disable-notifications --bwsi --disable-infobars --no-default-browser-check"
    # Set chromedir
    CHROMEPROFILEDIR="/tmp/ChromeProfiles"
    if [ ! -d ${CHROMEPROFILEDIR} ]; then
      mkdir -p ${CHROMEPROFILEDIR};
    fi
    MYTEMPBASE="RunChrome"
    MYTMPDIR=`mktemp -d -q ${CHROMEPROFILEDIR}/${MYTEMPBASE}.XXXXXX`
    if [ $? -ne 0 ]; then
      echo "$0: Can't create temp directory, exiting..."
      exit 1
    fi
    # Disable first run
    touch "${MYTMPDIR}/First Run"
    echo '{"browser": {"confirm_to_quit": false}}' > "${MYTMPDIR}/Local State"
    # Now run Chrome
    if [ "${OPT-}" == "fresh" ] ; then
      "${CHROMEBIN}" ${CHROMEOPT} --user-data-dir=${MYTMPDIR}
    elif [ "${OPT-}" == "freshproxy" ] ; then
      "${CHROMEBIN}" ${CHROMEOPT} --proxy-server=socks5://127.0.0.1:9998 --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE 127.0.0.1" --user-data-dir=${MYTMPDIR}
    elif [ "${OPT-}" == "freshnocert" ] ; then
      "${CHROMEBIN}" ${CHROMEOPT} --user-data-dir=${MYTMPDIR} --ignore-certificate-errors
    elif [ "${OPT-}" == "freshnocertproxy" ] ; then
      "${CHROMEBIN}" ${CHROMEOPT} --user-data-dir=${MYTMPDIR} --ignore-certificate-errors -proxy-server=socks5://127.0.0.1:9998 --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE 127.0.0.1"
    elif [ "${OPT-}" == "proxy" ] ; then
      "${CHROMEBIN}" --proxy-server=socks5://127.0.0.1:9998 --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE 127.0.0.1"
    else
      "${CHROMEBIN}"
    fi
    # Delete profile dir
    rm -R "${MYTMPDIR}"
    if [ $? -ne 0 ]; then
      echo "$0: Can't remove temp directory, please check \"${MYTMPDIR}\""
      exit 1
    fi

     

     

     

  3. Hi Vitor,

     

    If I recall correctly I never installed Homebrew on this laptop. But I'm not sure why I never notices the directory in the  "Search Scope" under "Features" => "Default Results" as I looked in a lot of places for a setting. Now that I removed this one it's also gone in the search results.

     

    So issue fixed, but I still believe it shouldn't have shown up there if the dir didn't exists / nothing inside could  be found. 

     

    Stijn

  4. Hi all,

     

    I think I found a minor bug. Alfred shows a file/directory which doesn't actually exists.

     

    I'm running Alfred v2.8.1 (425) on:

    OS Info   : Mac OS X - 10.11.2 - 15C50
    HW Info   : MacBook8,1 - x86_64
    CPU Info  : Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz
    Power     : On  - Charge 100% - State: charged - Left: 0:00 remaining present: true
    Memory    : Total: 8192 MB Used: 7926 MB Free: 266 MB
    Load Avg  : 1m: 1.32 5m: 1.83 15m: 1.93
    Disk(s)   : Path: /                    Disk: disk1    Size: 233Gi  Free: 144Gi  Free: 39%
    

    When pressing <cmd>-<space> and "Ce" it's suggesting /usr/local/Cellar which doesn't actually exists.

     

     

    iY5uaEA.png
    Mbook:~ root# cd /usr/local/
    Mbook:local root# ls -ald C*
    ls: C*: No such file or directory
    Mbook:local root# file Cellar
    Cellar: cannot open `Cellar' (No such file or directory)
    Mbook:local root# stat Cellar
    stat: Cellar: stat: No such file or directory
    Mbook:local root# cd Cellar
    -sh: cd: Cellar: No such file or directory
    

    Thanks,

    Stijn

     

×
×
  • Create New...