Code Monkey home page Code Monkey logo

Comments (25)

rjc avatar rjc commented on August 13, 2024 4

Same here, with the exception that I seem to be able to register with rbw register but am being re-prompted for password constantly with pinentry claiming it isn't correct.

Edit: this is both on a machine where rbw was working previously, and on a new one.

from rbw.

joelsleeba avatar joelsleeba commented on August 13, 2024 2
❯ rbw config show
{
  "email": "******@****.com",
  "base_url": "https://api.bitwarden.com/",
  "identity_url": null,
  "notifications_url": null,
  "lock_timeout": 3600,
  "sync_interval": 3600,
  "pinentry": "pinentry-gnome3",
  "client_cert_path": null
}

❯ cat .local/share/rbw/agent.err
websocket error: Io(Kind(UnexpectedEof))
websocket error: Protocol(ResetWithoutClosingHandshake)
websocket error: Protocol(ResetWithoutClosingHandshake)
websocket error: Protocol(ResetWithoutClosingHandshake)
websocket error: Protocol(ResetWithoutClosingHandshake)
websocket error: Protocol(ResetWithoutClosingHandshake)
failed to sync: failed to load db from /home/user/.cache/rbw/https%3A%2F%2Fapi.bitwarden.com%2F:******@****.com.json: No such file or directory (os error 2)

I got the same issue. I tried with default base_url and pinentry. Same error

❯ rbw login
rbw login: failed to log in to bitwarden instance: failed to parse JSON: EOF while parsing a value at line 1 column 0

rbw 1.8.3
linux 6.6.3.arch1-1

from rbw.

rjp avatar rjp commented on August 13, 2024 2

Have tested against vaultwarden and rbw works fine there. Unhelpful, I know, but it really does seem like bitwarden are doing something weird that isn't specified in their API documentation (which is pretty terrible.)

from rbw.

rjp avatar rjp commented on August 13, 2024 1

Also getting this. Been digging in to see if I can figure out if things are going wrong in rbw but nothing useful yet.

from rbw.

carlosala avatar carlosala commented on August 13, 2024 1

Same here!

from rbw.

augustebaum avatar augustebaum commented on August 13, 2024

Same also; this seemed to coincide with my swapping i3 for GNOME, but this issue tells me there is something deeper happening.

from rbw.

JeffDess avatar JeffDess commented on August 13, 2024

@augustebaum I don't think it's related to a DE/WM, I'm having the same in Plasma connecting to the default API. Maybe BW changed something recently?

from rbw.

valentingregoire avatar valentingregoire commented on August 13, 2024

I have this issue with a fresh installation. I can login on both the Chrome extension and the fedora app, yet not with the cli. The only thin I set is the email: rbw config set email [email protected] because the rest should be the default. When entering my password, the login fails... Could this be a certificate issue? I didn't configure a certificate in the app neither, but maybe that is using the chrome certs?

from rbw.

carlosala avatar carlosala commented on August 13, 2024

Was someone able to debug it? I really need rbw in my daily workflow🥲

from rbw.

arcstur avatar arcstur commented on August 13, 2024

Same here. Trying rbw register (and putting client id and secret) is returning

rbw register: failed to log in to bitwarden instance: api request returned error: 400

rbw 1.8.3
linux 6.6.4-arch1-1

from rbw.

rjp avatar rjp commented on August 13, 2024

I've done some debugging and I think that whilst rbw might have some issues (the 400 response, perhaps), I can't get anything other than a 500 back from the bitwarden API by hand following the API descriptions I've found elsewhere. Will have a look at vaultwarden and see if that gives me any clues (assuming that vw is still compatible with the bw API!)

from rbw.

yazgoo avatar yazgoo commented on August 13, 2024

Until this is fixed I'm using this script to emulate my usage of it, more precisely:

  • rbw sync
  • rbw get
  • rbw get --full

All this based on official CLI client (bw)

⚠️ this stores the session in a local file with octal mode 600, use at your own risk

just name this script rbw, make it executable and put it in your path and you should be good.

to log in just do a rbw sync

#!/bin/env bash
set -eu -o pipefail
# emulate rbw wit bw

session_path="$HOME/.local/my_local_file"

bwu() {
    [ -e  "$session_path" ] && source "$session_path"
    BW_STATUS=$(bw status | jq -r .status)
    case "$BW_STATUS" in
    "unauthenticated")
        echo "Logging into BitWarden" >&2
        export BW_SESSION="$(bw login --raw)"
        ;;
    "locked")
        echo "Unlocking Vault" >&2
        export BW_SESSION="$(bw unlock --raw)"
        ;;
    "unlocked")
        echo "Vault is unlocked" >&2
        ;;
    *)
        echo "Unknown Login Status: $BW_STATUS" >&2
        return 1
        ;;
    esac
    bw sync >&2
    echo "export BW_SESSION=\"$BW_SESSION\"" > "$session_path"
    chmod 600 "$session_path"
}

if [ "$#" -eq 0 ]
then
    echo "Usage: rbw <get|sync> [options] <item>"
    exit
fi
case "$1" in
"get")
    source "$session_path"
    shift
    full=0
    for arg in "$@"
    do
        if [ "$arg" = "--full" ]
        then
            full=1
            shift
        fi
    done
    id=$(bw list items --search "$1" |  jq -r ".[] | select(.name==\"$1\") | .id")
    if [ "$full" = "1" ]
    then
        json="$(bw get item "$id")"
        echo "$json" | jq -r '.login.password' | tail -1
        echo "Username: $(echo "$json" | jq -r '.login.username' | tail -1)"
        uris="$(echo "$json" | jq -r '.login.uris')"
        [ "$uris" != "null" ] && echo "URI: $(echo "$json" | jq -r '.login.uris[].uri' | tail -1)"
    else
        bw get item "$id" | jq -r '.login.password' 
    fi
    ;;
"sync")
    bwu 
    ;;
esac

from rbw.

Msouza91 avatar Msouza91 commented on August 13, 2024

Has anyone else tested #151 fix? I removed previous version of rbw and installed his revision with the proposed fix, but still getting the error message.

from rbw.

rjc avatar rjc commented on August 13, 2024

I've just tested the #151 fix - it does resolve the issue!

from rbw.

joelsleeba avatar joelsleeba commented on August 13, 2024

#151 fixes it! yayy!!

from rbw.

00sapo avatar 00sapo commented on August 13, 2024

Confirmed, it works

from rbw.

Msouza91 avatar Msouza91 commented on August 13, 2024

I might be doing something wrong here, I did and rbw purge, deleted the config file, uninstalled the previous version of rbw, then installed the one from the PR, killed rbw-agent and rebooted my computer, not all at the same time, but that is all what I have done so far and still getting the error message, I checked the cargo checkouts folder and I have the code with the fix in the version installed on my PC.
Thoroughly confused here :( I was so looking forward to try this with rofi-rbw, but I seem to be suffering from a major case of Skill Issue, not sure where else to look to solve this for me...

from rbw.

rjc avatar rjc commented on August 13, 2024

@Msouza91 Did your run rbw register?

from rbw.

Msouza91 avatar Msouza91 commented on August 13, 2024

@rjc Register returns 400 as well, after input of the id and secret.
image

from rbw.

rjc avatar rjc commented on August 13, 2024

@Msouza91 Are you a .eu user by any chance? If so, check the issue #148. If not, try on another machine where you previously hadn't used rbw. If it still doesn't work, try rotating the key and/or bumping PBKDF2 rounds. Other than that, I'm running out of ideas.

BTW, I've tested on macOS 14.2.1 and OpenBSD -current.

from rbw.

Msouza91 avatar Msouza91 commented on August 13, 2024

Regular bitwarden.com user, will try the PBK parameter and rotating keys, thanks for the pointers.

from rbw.

Msouza91 avatar Msouza91 commented on August 13, 2024

@rjc I was using Argo2id changed back to PBK, still didn't work for me after rotating keys, I'm at a loss, will try a minimal setup on a VM later and see what happens.

from rbw.

00sapo avatar 00sapo commented on August 13, 2024

I might be doing something wrong here, I did and rbw purge, deleted the config file, uninstalled the previous version of rbw, then installed the one from the PR, killed rbw-agent and rebooted my computer, not all at the same time, but that is all what I have done so far and still getting the error message, I checked the cargo checkouts folder and I have the code with the fix in the version installed on my PC. Thoroughly confused here :( I was so looking forward to try this with rofi-rbw, but I seem to be suffering from a major case of Skill Issue, not sure where else to look to solve this for me...

Try which rbw to check you have not other installations hiding the cargo installation. Then, remove the repo in the .cargo folder and retry (I used --branch option, but --ref should work the same).

from rbw.

Msouza91 avatar Msouza91 commented on August 13, 2024

@00sapo Well, I only had cargo installed through cargo from the beginning, uninstalled the main version and used the -rev command from the PR to install it again, but didn't work for me, didn't get the time to test on a VM, but it wouldn't change much if it worked on the VM since I can't figure out what is wrong in my main machine.
rbw login returns the same error
image

from rbw.

00sapo avatar 00sapo commented on August 13, 2024

It says "rbw 1.8.3 is already installed". Remove it and install or use "--force"...

from rbw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.