[GH-ISSUE #420] 2FA Failing when Opening Web Vault #244

Closed
opened 2026-03-03 01:27:10 +03:00 by kerem · 8 comments
Owner

Originally created by @kmwoley on GitHub (Feb 28, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/420

Setup:
Running the latest docker image (version 2.8.0 reported by the web ui)
I have my account successfully setup using 2FA with a Yubikey NFC 5.

Previously:
I've successfully logged in using 2FA on both mobile (iPhone) and via the webvault. I believe the error has started after I've updated to the most recent docker image.

Error:
Now, when I attempt to log in I get "An error has occurred. An unexpected error has occurred." error in the UI, and the error logs show the errors below).

[2019-02-28 08:04:57][rocket::rocket][INFO] POST /api/accounts/prelogin application/json; charset=utf-8:
[2019-02-28 08:04:57][_][INFO] Matched: POST /api/accounts/prelogin (prelogin)
[2019-02-28 08:04:57][_][INFO] Outcome: Success
[2019-02-28 08:04:57][_][INFO] Response succeeded.
[2019-02-28 08:04:57][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8:
[2019-02-28 08:04:57][_][INFO] Matched: POST /identity/connect/token (login)
[2019-02-28 08:04:57][bitwarden_rs::error][ERROR] JsonError. {"TwoFactorProviders":[3],"TwoFactorProviders2":{"3":{"Nfc":true}},"error":"invalid_grant","error_description":"Two factor required."}
[2019-02-28 08:04:57][_][INFO] Outcome: Success
[2019-02-28 08:04:57][_][INFO] Response succeeded.
[2019-02-28 08:05:06][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8:
[2019-02-28 08:05:06][_][INFO] Matched: POST /identity/connect/token (login)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5
thread 'main' panicked at 'internal error: entered unreachable code: the call to `handle_threads` should block on success', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.0/src/rocket.rs:725:13

Originally created by @kmwoley on GitHub (Feb 28, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/420 Setup: Running the latest docker image (version 2.8.0 reported by the web ui) I have my account successfully setup using 2FA with a Yubikey NFC 5. Previously: I've successfully logged in using 2FA on both mobile (iPhone) and via the webvault. I believe the error has started after I've updated to the most recent docker image. Error: Now, when I attempt to log in I get "An error has occurred. An unexpected error has occurred." error in the UI, and the error logs show the errors below). ``` [2019-02-28 08:04:57][rocket::rocket][INFO] POST /api/accounts/prelogin application/json; charset=utf-8: [2019-02-28 08:04:57][_][INFO] Matched: POST /api/accounts/prelogin (prelogin) [2019-02-28 08:04:57][_][INFO] Outcome: Success [2019-02-28 08:04:57][_][INFO] Response succeeded. [2019-02-28 08:04:57][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8: [2019-02-28 08:04:57][_][INFO] Matched: POST /identity/connect/token (login) [2019-02-28 08:04:57][bitwarden_rs::error][ERROR] JsonError. {"TwoFactorProviders":[3],"TwoFactorProviders2":{"3":{"Nfc":true}},"error":"invalid_grant","error_description":"Two factor required."} [2019-02-28 08:04:57][_][INFO] Outcome: Success [2019-02-28 08:04:57][_][INFO] Response succeeded. [2019-02-28 08:05:06][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8: [2019-02-28 08:05:06][_][INFO] Matched: POST /identity/connect/token (login) thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5 thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5 thread 'main' panicked at 'internal error: entered unreachable code: the call to `handle_threads` should block on success', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.0/src/rocket.rs:725:13 ```
kerem closed this issue 2026-03-03 01:27:10 +03:00
Author
Owner

@kmwoley commented on GitHub (Feb 28, 2019):

Something deeper is going on; I attempted to restart the docker container and it will no-longer start with the following (similar) error:

[2019-02-28 08:05:06][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8:
[2019-02-28 08:05:06][_][INFO] Matched: POST /identity/connect/token (login)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5
thread 'main' panicked at 'internal error: entered unreachable code: the call to `handle_threads` should block on success', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.0/src/rocket.rs:725:13
<!-- gh-comment-id:468335016 --> @kmwoley commented on GitHub (Feb 28, 2019): Something deeper is going on; I attempted to restart the docker container and it will no-longer start with the following (similar) error: ``` [2019-02-28 08:05:06][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8: [2019-02-28 08:05:06][_][INFO] Matched: POST /identity/connect/token (login) thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5 thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', src/libcore/result.rs:997:5 thread 'main' panicked at 'internal error: entered unreachable code: the call to `handle_threads` should block on success', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.0/src/rocket.rs:725:13 ```
Author
Owner

@dani-garcia commented on GitHub (Feb 28, 2019):

This error seems to be coming from the Rocket web server, when attempting to start. It shouldn't be because any change we made, I don't think.

Did you make any changes to the docker container networking? Maybe you are trying to bind the port to one that's already bound to another container or something like that? Or maybe you have multiple instances of bitwarden_rs running?

<!-- gh-comment-id:468338684 --> @dani-garcia commented on GitHub (Feb 28, 2019): This error seems to be coming from the Rocket web server, when attempting to start. It shouldn't be because any change we made, I don't think. Did you make any changes to the docker container networking? Maybe you are trying to bind the port to one that's already bound to another container or something like that? Or maybe you have multiple instances of bitwarden_rs running?
Author
Owner

@mprasil commented on GitHub (Mar 1, 2019):

Do you use --net host or something similar in your docker run by any chance @kmwoley? Normally the application runs in its own network namespace, so already used port is kinda strange.

<!-- gh-comment-id:468622945 --> @mprasil commented on GitHub (Mar 1, 2019): Do you use `--net host` or something similar in your docker run by any chance @kmwoley? Normally the application runs in its own network namespace, so already used port is kinda strange.
Author
Owner

@kmwoley commented on GitHub (Mar 1, 2019):

I suspect this is due to my docker network config, too. I found a change in
my host OS that may be causing it. Let’s close out this issue as I also
think it’s not a bitwarden_rs isssue. I’ll reopen/comment on it if I can
prove otherwise. Thanks!

On Fri, Mar 1, 2019 at 2:41 AM mprasil notifications@github.com wrote:

Do you use --net host or something similar in your docker run by any
chance @kmwoley https://github.com/kmwoley? Normally the application
runs in its own network namespace, so already used port is kinda strange.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/dani-garcia/bitwarden_rs/issues/420#issuecomment-468622945,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF1jeOQbSnXADYrlaBE90JFgc13QeuVVks5vSQPpgaJpZM4bXLf-
.

<!-- gh-comment-id:468677998 --> @kmwoley commented on GitHub (Mar 1, 2019): I suspect this is due to my docker network config, too. I found a change in my host OS that may be causing it. Let’s close out this issue as I also think it’s not a bitwarden_rs isssue. I’ll reopen/comment on it if I can prove otherwise. Thanks! On Fri, Mar 1, 2019 at 2:41 AM mprasil <notifications@github.com> wrote: > Do you use --net host or something similar in your docker run by any > chance @kmwoley <https://github.com/kmwoley>? Normally the application > runs in its own network namespace, so already used port is kinda strange. > > — > You are receiving this because you were mentioned. > > > Reply to this email directly, view it on GitHub > <https://github.com/dani-garcia/bitwarden_rs/issues/420#issuecomment-468622945>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AF1jeOQbSnXADYrlaBE90JFgc13QeuVVks5vSQPpgaJpZM4bXLf-> > . >
Author
Owner

@kmwoley commented on GitHub (Mar 3, 2019):

Confirmed. This had nothing to do with bitwarden_rs. Sorry for the noise.

<!-- gh-comment-id:468972974 --> @kmwoley commented on GitHub (Mar 3, 2019): Confirmed. This had nothing to do with bitwarden_rs. Sorry for the noise.
Author
Owner

@bronco21016 commented on GitHub (Jun 24, 2019):

Sorry to bring this back. How did you solve it? I’m getting the exact same error messages when trying to setup a Yubikey on Bitwarden_RS pulled from Archlinux AUR.

<!-- gh-comment-id:505150917 --> @bronco21016 commented on GitHub (Jun 24, 2019): Sorry to bring this back. How did you solve it? I’m getting the exact same error messages when trying to setup a Yubikey on Bitwarden_RS pulled from Archlinux AUR.
Author
Owner

@kmwoley commented on GitHub (Jun 25, 2019):

@bronco21016 IIRC, my host OS had made a bad upgrade to Docker that screwed up MACVLAN. Networking was the source of my issue. I rolled back my OS version and solved it, reported it to the OS maintainers, and it got fixed.

<!-- gh-comment-id:505476335 --> @kmwoley commented on GitHub (Jun 25, 2019): @bronco21016 IIRC, my host OS had made a bad upgrade to Docker that screwed up MACVLAN. Networking was the source of my issue. I rolled back my OS version and solved it, reported it to the OS maintainers, and it got fixed.
Author
Owner

@bronco21016 commented on GitHub (Jun 25, 2019):

@kmwoley It seems I’m having a network issue as well but can’t quite trace it down. Shouldn’t be related to Docker though as I’m not using Docker. Seems more related to my Apache reverse proxy. Oh well. I’ll post something separate to see if I can get some help. Thanks again!

<!-- gh-comment-id:505509937 --> @bronco21016 commented on GitHub (Jun 25, 2019): @kmwoley It seems I’m having a network issue as well but can’t quite trace it down. Shouldn’t be related to Docker though as I’m not using Docker. Seems more related to my Apache reverse proxy. Oh well. I’ll post something separate to see if I can get some help. Thanks again!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#244
No description provided.