Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load items - mac failed #83

Open
visibilityspots opened this issue Oct 20, 2023 · 2 comments
Open

Could not load items - mac failed #83

visibilityspots opened this issue Oct 20, 2023 · 2 comments

Comments

@visibilityspots
Copy link

I used the bwmenu for a few weeks now all went fine and I was quite happy. But last couple of days it failed on me, I was asked for my Master Password and only got the message in rofi stating

Could not load items

after some research I tried the keyctl commands but without success. So I digged a little deeper and started looking into the code. I came to the conclusion the ask_password function was giving me a session hash with the error message 'mac failed' included.

This seemed to be the culprit since obviously that wasn't a valid session hash, as I understood this has something to see with some corrupt entries in my vaultwarden, although I don't see any errors in the vaultwarden server neither in the CLI commands I use or the mobile app nor the firefox plugin.

As a workaround I changed the unlock command to redirect it's stderr to /dev/null which now circumvents the issue.

ask_password() {                                                                                         
  rm $CACHE_FILE
  mpw=$(printf '' | rofi -dmenu -p "Master Password" -password -l 0 ${ROFI_OPTIONS[@]}) || exit $?
  if ! out="$(bw --raw --nointeraction unlock "$mpw" 2>/dev/null)"; then
    exit_error 1 "Could not unlock vault: $out"
  fi
  echo "$out"
}
ask_password() {
  rm $CACHE_FILE
  mpw=$(printf '' | rofi -dmenu -p "Master Password" -password -l 0 ${ROFI_OPTIONS[@]}) || exit $?
  if ! out="$(bw --raw --nointeraction unlock "$mpw" 2>&1)"; then
    exit_error 1 "Could not unlock vault: $out"
  fi
  echo "$out"
}

yet I'm wondering if we should tackle this in the ask_password function to only fetch the session hash and if by any chance someone could point me in the direction how to fix the mac failed issue in the first place?

@arch-dawson
Copy link

I started getting the same issue a few days ago

@MaxWinsemius
Copy link

I have a similar issue on archlinux - updated yesterday. I fixed it by redirecting the stderr from the rm command failing into /dev/null in /usr/bin/bwmenu

 ask_password() { 
-  rm $CACHE_FILE
+  rm $CACHE_FILE 2>/dev/null 
   mpw=$(printf '' | rofi -dmenu -p "Master Password" -password -l 0 ${ROFI_OPTIONS[@]}) || exit $? 
   if ! out="$(bw --raw --nointeraction unlock "$mpw" 2>&1)"; then 
     exit_error 1 "Could not unlock vault: $out" 
   fi 
   echo "$out" 
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants