[GH-ISSUE #443] building mobile client android #9078

Closed
opened 2026-04-20 12:03:13 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @pdarcos on GitHub (Mar 25, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/443

Hi guys,

I tried building an android mobile client from the bw mobile github, changing the base address according to the instructions there:

By default the app is targeting the production API. If you are running the Core API locally, you'll need to switch the app to target your local instance. Open src/App/Utilities/ApiHttpClient.cs and src/App/Utilities/IdentityHttpClient.cs and set the BaseAddress to your local API endpoints (ex. new Uri("http://localhost:5000")). Alternatively, you can also adjust the environment endpoints from the environment settings page on the home screen of the app (log out).

I changed it in both files to my URL vault.domain.com and I get network error messages. Checking the logs server side it seems it can't find the correct routing.

[2019-03-25 22:57:25][rocket::rocket][INFO] POST //accounts/prelogin application/json; charset=utf-8:
[2019-03-25 22:57:25][][ERROR] No matching routes for POST //accounts/prelogin application/json; charset=utf-8.
[2019-03-25 22:57:25][
][WARN] Responding with 404 Not Found catcher.
[2019-03-25 22:57:25][][INFO] Response succeeded.
[2019-03-25 22:57:26][rocket::rocket][INFO] POST //connect/token application/x-www-form-urlencoded:
[2019-03-25 22:57:26][
][ERROR] No matching routes for POST //connect/token application/x-www-form-urlencoded.
[2019-03-25 22:57:26][][WARN] Responding with 404 Not Found catcher.
[2019-03-25 22:57:26][
][INFO] Response succeeded.

Anyone had any luck building the mobile client from scratch for their install?

Originally created by @pdarcos on GitHub (Mar 25, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/443 Hi guys, I tried building an android mobile client from the [bw mobile github](https://github.com/bitwarden/mobile), changing the base address according to the instructions there: > By default the app is targeting the production API. If you are running the Core API locally, you'll need to switch the app to target your local instance. Open src/App/Utilities/ApiHttpClient.cs and src/App/Utilities/IdentityHttpClient.cs and set the BaseAddress to your local API endpoints (ex. new Uri("http://localhost:5000")). Alternatively, you can also adjust the environment endpoints from the environment settings page on the home screen of the app (log out). I changed it in both files to my URL vault.domain.com and I get network error messages. Checking the logs server side it seems it can't find the correct routing. [2019-03-25 22:57:25][rocket::rocket][INFO] POST //accounts/prelogin application/json; charset=utf-8: [2019-03-25 22:57:25][_][ERROR] No matching routes for POST //accounts/prelogin application/json; charset=utf-8. [2019-03-25 22:57:25][_][WARN] Responding with 404 Not Found catcher. [2019-03-25 22:57:25][_][INFO] Response succeeded. [2019-03-25 22:57:26][rocket::rocket][INFO] POST //connect/token application/x-www-form-urlencoded: [2019-03-25 22:57:26][_][ERROR] No matching routes for POST //connect/token application/x-www-form-urlencoded. [2019-03-25 22:57:26][_][WARN] Responding with 404 Not Found catcher. [2019-03-25 22:57:26][_][INFO] Response succeeded. Anyone had any luck building the mobile client from scratch for their install?
Author
Owner

@pdarcos commented on GitHub (Mar 25, 2019):

Even weirder is that if I change the server URL in self-hosted environment (under settings view) to vault.domain.com in the compiled android app it works fine.

<!-- gh-comment-id:476411389 --> @pdarcos commented on GitHub (Mar 25, 2019): Even weirder is that if I change the _server URL_ in self-hosted environment (under settings view) to vault.domain.com in the compiled android app it works fine.
Author
Owner

@dani-garcia commented on GitHub (Mar 25, 2019):

Can't say I ever tried, but looking at the log, you might need to modify the URL.

The requests should go to:

POST /api/accounts/prelogin
POST /identity/connect/token 

Note that both go to different places. So the ApiHttpClient should point to domain/api and the IdentityHttpClient should point to domain/identity.

If you are going to change the source code, also make sure that the other services (icons, push notifications) aren't pointing to the official servers either.

<!-- gh-comment-id:476412139 --> @dani-garcia commented on GitHub (Mar 25, 2019): Can't say I ever tried, but looking at the log, you might need to modify the URL. The requests should go to: ``` POST /api/accounts/prelogin POST /identity/connect/token ``` Note that both go to different places. So the ApiHttpClient should point to `domain/api` and the IdentityHttpClient should point to `domain/identity`. If you are going to change the source code, also make sure that the other services (icons, push notifications) aren't pointing to the official servers either.
Author
Owner

@pdarcos commented on GitHub (Mar 25, 2019):

Thanks @dani-garcia
I'll give those a try

<!-- gh-comment-id:476412368 --> @pdarcos commented on GitHub (Mar 25, 2019): Thanks @dani-garcia I'll give those a try
Author
Owner

@pdarcos commented on GitHub (Mar 25, 2019):

That did it.
Thanks for the fast reply!!

<!-- gh-comment-id:476413768 --> @pdarcos commented on GitHub (Mar 25, 2019): That did it. Thanks for the fast reply!!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#9078