blacs30 / bitwarden-alfred-workflow

Simple Bitwarden Workflow for Alfred
MIT License
448 stars 31 forks source link

Error the Bitwarden command \"bw\" wasn't found #38

Closed garyli2198 closed 4 years ago

garyli2198 commented 4 years ago

I downloaded the latest version of this workflow and this error occurred when I first tried to run the command. I made sure to install the CLI and add Alfred to the list of security exceptions. I'm on Alfred version 4.1 and macOS Catalina 10.15.6

[17:57:20.894] Logging Stopped.
[17:58:15.175] Logging Started...
[17:58:21.024] Bitwarden v2[Script Filter] Queuing argument '(null)'
[17:58:21.213] Bitwarden v2[Script Filter] Script with argv '(null)' finished
[17:58:21.215] STDERR: Bitwarden v2[Script Filter] 17:58:21 config.go:73: BW DataPath /Users/gli/Library/Application Support/Bitwarden CLI/data.json
17:58:21 config.go:86: Got existing Bitwarden CLI data
🍺
17:58:21 workflow.go:328: -------- Bitwarden v2/2.0.4 (AwGo/0.26.2) --------
17:58:21 main.go:161: &main.options{Search:false, Config:false, SetConfigs:false, Auth:false, Sfa:false, Lock:false, Icons:false, Folder:false, Unlock:false, Login:false, Logout:false, Sync:false, Open:false, GetItem:false, Force:false, Totp:false, Last:false, Cache:false, Background:false, Id:"", Query:"", Previous:"", Attachment:"", Output:""}
17:58:21 main.go:163: args=[]string{} => []string{}
17:58:21 main.go:165: (main.config) {
 AutoFetchIconCacheAge: (int) 1440,
 AutoFetchIconMaxCacheAge: (time.Duration) 24h0m0s,
 BwconfKeyword: (string) "",
 BwauthKeyword: (string) "",
 BwKeyword: (string) "",
 BwExec: (string) (len=2) "bw",
 CacheAge: (int) 1440,
 Email: (string) "",
 EmptyDetailResults: (bool) false,
 IconCacheAge: (int) 43200,
 IconCacheEnabled: (bool) true,
 IconMaxCacheAge: (time.Duration) 720h0m0s,
 MaxResults: (int) 1000,
 MaxCacheAge: (time.Duration) 24h0m0s,
 Mod1: (string) (len=3) "alt",
 Mod2: (string) (len=5) "shift",
 Mod3: (string) (len=4) "ctrl",
 Mod4: (string) (len=7) "cmd,opt",
 OutputFolder: (string) (len=21) "/Users/gli/Downloads/",
 ReorderingDisabled: (bool) true,
 Server: (string) (len=21) "https://bitwarden.com",
 Sfa: (bool) true,
 SfaMode: (int) 0,
 SyncCacheAge: (int) 1440,
 SyncMaxCacheAge: (time.Duration) 24h0m0s
}
17:58:21 feedback.go:482: Sent 1 result(s) to Alfred
17:58:21 workflow.go:405: ------------------ 148.306756ms ------------------
[17:58:21.218] Bitwarden v2[Script Filter] {
  "variables": {
    "AW_SESSION_ID": "2ZWLMTPLVE65Y6EXZS8Z9DDF"
  },
  "items": [
    {
      "title": "Error the Bitwarden command \"bw\" wasn't found.",
      "subtitle": "Set \"BW_EXEC\" or \"PATH\" in the Workflow. Press ↩ or ⇥ for more info.",
      "arg": "README.html",
      "valid": true,
      "icon": {
        "path": "icons/warning.png"
      },
      "variables": {
        "action": "-open"
      }
    }
  ]
}
blacs30 commented 4 years ago

@garyli2198 Thanks for opening this issue. It should be solvable quickly. In the CLI can you type which bw then copy the result into the Workflow configuration variable BW_EXEC you might also need to update the PATH workflow configuration.

blacs30 commented 4 years ago

@garyli2198 I've released version 2.0.5 that contains (among other fixes and small improvements) an updated readme including gif example on how to set the PATH.