Code Monkey home page Code Monkey logo

Comments (8)

jurgenmehja avatar jurgenmehja commented on August 13, 2024 1

Having the same issue with the latest arch package, is there a way to debug it? Using the default config btw.
Thanks!

from rbw.

matt-snider avatar matt-snider commented on August 13, 2024

Just noting this is probably related to (or a duplicate of) #145 or #32

from rbw.

Ironedde avatar Ironedde commented on August 13, 2024

I think I have found the culprit for this.
Looking insidesrc/config you can find a section defining the default base_url and how to format a custom one:

    pub fn base_url(&self) -> String {
        self.base_url.clone().map_or_else(
            || "https://api.bitwarden.com".to_string(),
            |url| format!("{}/api", url.trim_end_matches('/')),
        )
    }

When Bitwarden introduced the EU servers they used the same style of URL as the US one: https://api.bitwarden.eu.
But the code added on an /api at the end for all "custom" URL:s, which doesn't work the official instance.
Understandable, of course, since the EU servers probably didn't exist when this code was original written

Adding something like this will solve the issue:

-            |url| format!("{}/api", url.trim_end_matches('/')),
+            |url| {
+                let clean_url = format!("{}", url.trim_end_matches('/'));
+                if clean_url == "https://api.bitwarden.eu" {
+                    return clean_url
+                } else {
+                    format!("{}/api", clean_url)
+                }
+            },

I can write a PR for this when I'm back from traveling on Monday. 👍

from rbw.

Morten03Nordbye avatar Morten03Nordbye commented on August 13, 2024

Any status on this?

from rbw.

Ironedde avatar Ironedde commented on August 13, 2024

Any status on this?

Sorry, it took a while.

Feel free to try the solution provided in #152.

You can run the agent standalone with more debugging like this:
RUST_LOG=trace ./target/release/rbw-agent --no-daemonize

from rbw.

Morten03Nordbye avatar Morten03Nordbye commented on August 13, 2024

I can conform it worked

from rbw.

Philip-Wittamore avatar Philip-Wittamore commented on August 13, 2024

Confirmed fixed in rbw-1.9.0-1 arch package. Thanks!

from rbw.

TheNilesh avatar TheNilesh commented on August 13, 2024

When I do rbw register it does not complain, but whenever I do rbw login|ls|get it returns the following error:

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

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.