bitwarden-alfred-workflow
bitwarden-alfred-workflow copied to clipboard
Missing permission to copy LaunchAgent
when I want to execute the install auto sync script I always get the following output:
[23:32:31.717] Bitwarden v2[List Filter] Processing complete
[23:32:31.728] Bitwarden v2[List Filter] Passing output '--install' to Run Script
[23:32:31.922] ERROR: Bitwarden v2[Run Script] found workflow v3.0.1 at /Users/torben/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DA388574-13BA-4CE9-9B0C-D96C84AE7AC0
cp: /Users/torben/Library/LaunchAgents/com.lisowski-development.alfred.bitwarden_autosync.plist: No such file or directory
[23:32:31.939] Bitwarden v2[Run Script] Processing complete
[23:32:31.947] Bitwarden v2[Run Script] Passing output 'removing existing service
generating new service configuration
generated config with 2 timers [at 8:15 23:45 ]
/var/folders/l1/vq850vsj4cz36sh0wh_24kqr0000gn/T//com.lisowski-development.alfred.bitwarden_autosync.plist: OK
result|1|failed to copy LaunchAgent
' to Run Script
[23:32:31.993] Bitwarden v2[Run Script] Processing complete
[23:32:32.005] Bitwarden v2[Run Script] Passing output 'result|1|failed to copy LaunchAgent
' to Split Arg
[23:32:32.011] Bitwarden v2[Split Arg] Processing complete
[23:32:32.017] Bitwarden v2[Split Arg] Passing output 'result|1|failed to copy LaunchAgent
' to Conditional
[23:32:32.022] Bitwarden v2[Conditional] Processing complete
[23:32:32.026] Bitwarden v2[Conditional] Passing output 'result|1|failed to copy LaunchAgent
' to Arg and Vars
[23:32:32.031] Bitwarden v2[Arg and Vars] Processing complete
[23:32:32.035] Bitwarden v2[Arg and Vars] Passing output 'result|1|failed to copy LaunchAgent
' to Post Notification
seems like the permission to copy the created plist file into the LaunchAgent folder is missing:
if ! /bin/cp -f "${plist_tmp_path}" "${plist_path}"; then _end 1 "failed to copy LaunchAgent"; fi
I looked into this a bit since I'm the original author of that portion of the workflow. Seems it's in need of some dusting off!
I've just posted updated versions of the bw_cache_update.sh
and bw_auto_lock.sh
scripts that are used for the LaunchAgents controlling autosync/autolock. Can you try downloading them:
- https://github.com/luckman212/bw-cache-update/blob/2023/bw_cache_update.sh
- https://github.com/luckman212/bw-cache-update/blob/2023/bw_auto_lock.sh
...and dropping them into your workflow's folder, replacing the existing ones and give it another try?
Another thing to double check is that you've granted Full Disk Access and Accessibility permissions to Alfred:
@blacs30
While we wait for @torbenkeller to test, I've submitted these changes as PR https://github.com/blacs30/bitwarden-alfred-workflow/pull/176
Thank you @luckman212 for your fast response!
I replaced the files you mentioned in the workflow and still get the error. But now I also get a dialog window telling me the task has failed.
The new log message is this:
[21:46:34.021] Bitwarden v2[List Filter] Processing complete
[21:46:34.027] Bitwarden v2[List Filter] Passing output '--install' to Run Script
[21:46:34.029] ERROR: Bitwarden v2[Run Script] Task '/Users/torben/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DA388574-13BA-4CE9-9B0C-D96C84AE7AC0/bw_auto_lock.sh' failed with reason 'launch path not accessible'
[21:46:34.030] Bitwarden v2[Run Script] Processing complete
[21:46:34.032] Bitwarden v2[Run Script] Passing output '' to Run Script
[21:46:34.053] Bitwarden v2[Run Script] Processing complete
[21:46:34.067] Bitwarden v2[Run Script] Passing output '' to Split Arg
[21:46:34.069] Bitwarden v2[Split Arg] Processing complete
[21:46:34.070] Bitwarden v2[Split Arg] Passing output '' to Conditional
I hope this helps!
The workflow should be automatically making those scripts +x executable, but I'll need to check on that.
For now, try opening a Terminal and pasting
cd '/Users/torben/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DA388574-13BA-4CE9-9B0C-D96C84AE7AC0'
chmod +x *.sh
I just pushed another update to #176 with an auto-fix for the +x
flag. If that gets merged it could help with this
Feel free to merge and tag. I think @luckman212 might be also able to release a new version. - After a new tag is pushed a draft release is created and it just needs to be released. I'm currently unable for the next 2 weeks to do it myself.
@blacs30 I am happy to help, but I'm a bit uneasy about pushing a new release before reviewing the steps with you, becauce I think it involves compiling the bitwarden-alfred-workflow
binary as well? This isn't urgent, let's check back on it in a couple of weeks. I merged #176 in the meantime.
I just opened https://github.com/blacs30/bitwarden-alfred-workflow/pull/179 because the new bw_auto_lock.sh
didn't work for me any more, I think there was a typo in a variable name.
Thanks @wollew you're right. It wasn't technically a typo, but rather a missed instance of that bwexec variable which got renamed somewhere along the way. Good catch and sorry for the trouble.