Open latest BItwarden Android app and create a new file in Send. Clicking Save results in an error message: Es ist ein Fehler aufgetreten (german, translates to "An error occurred").
Expected behaviour
A Send file is created and can be shared with others.
Actual behaviour
File is not uploaded to Send.
Troubleshooting data
You can upload a file via the web interface without any issue. I just discovered this error using the Bitwarden Android app v2.18.0 (4572). The vaultwarden trace logs show the following:
Vaultwarden Trace Log
[2022-05-29 10:35:59.468][start][INFO] Rocket has launched from http://0.0.0.0:80
[2022-05-29 10:36:07.063][mio::poll][TRACE] registering event source with poller: token=Token(2), interests=READABLE | WRITABLE
[2022-05-29 10:36:07.063][tracing::span][TRACE] parse_headers;
[2022-05-29 10:36:07.063][tracing::span::active][TRACE] -> parse_headers;
[2022-05-29 10:36:07.064][tracing::span::active][TRACE] <- parse_headers;
[2022-05-29 10:36:07.064][tracing::span][TRACE] -- parse_headers;
[2022-05-29 10:36:07.064][request][INFO] POST /api/sends/file/v2
[2022-05-29 10:36:07.064][response][INFO] 404 Not Found
[2022-05-29 10:36:07.064][tracing::span][TRACE] encode_headers;
[2022-05-29 10:36:07.064][tracing::span::active][TRACE] -> encode_headers;
[2022-05-29 10:36:07.064][tracing::span::active][TRACE] <- encode_headers;
[2022-05-29 10:36:07.064][tracing::span][TRACE] -- encode_headers;
[2022-05-29 10:36:07.064][mio::poll][TRACE] deregistering event source from poller
[2022-05-29 10:36:07.301][mio::poll][TRACE] registering event source with poller: token=Token(16777218), interests=READABLE | WRITABLE
[2022-05-29 10:36:07.302][tracing::span][TRACE] parse_headers;
[2022-05-29 10:36:07.302][tracing::span::active][TRACE] -> parse_headers;
[2022-05-29 10:36:07.302][tracing::span::active][TRACE] <- parse_headers;
[2022-05-29 10:36:07.302][tracing::span][TRACE] -- parse_headers;
[2022-05-29 10:36:07.302][request][INFO] POST /api/sends/file
[2022-05-29 10:36:07.306][multer::buffer][TRACE] finding next field: None
[2022-05-29 10:36:07.307][multer::buffer][TRACE] new field found at 607
[2022-05-29 10:36:07.307][multer::buffer][TRACE] finding next field: None
[2022-05-29 10:36:07.307][multer::buffer][TRACE] no new field found, not EOF, checking close
[2022-05-29 10:36:07.307][multer::buffer][TRACE] finding next field: None
[2022-05-29 10:36:07.307][multer::buffer][TRACE] finding next field: None
[2022-05-29 10:36:07.307][multer::buffer][TRACE] no new field found, not EOF, checking close
[2022-05-29 10:36:07.307][multer::buffer][TRACE] finding next field: None
[2022-05-29 10:36:07.307][multer::buffer][TRACE] finding next field: None
[2022-05-29 10:36:07.307][multer::buffer][TRACE] no new field found, not EOF, checking close
[2022-05-29 10:36:07.308][multer::buffer][TRACE] finding next field: None
[2022-05-29 10:36:07.308][multer::buffer][TRACE] finding next field: None
[2022-05-29 10:36:07.308][multer::buffer][TRACE] new field found at 69012
[2022-05-29 10:36:07.316][response][INFO] (post_send_file) POST /api/sends/file multipart/form-data => 422 Unprocessable Entity
[2022-05-29 10:36:07.316][tracing::span][TRACE] encode_headers;
[2022-05-29 10:36:07.316][tracing::span::active][TRACE] -> encode_headers;
[2022-05-29 10:36:07.316][tracing::span::active][TRACE] <- encode_headers;
[2022-05-29 10:36:07.316][tracing::span][TRACE] -- encode_headers;
[2022-05-29 10:36:07.317][mio::poll][TRACE] deregistering event source from poller
It seems that the Bitwarden Android app uses the API /api/sends/file/v2 (resulting in 422 Unprocessable Entity) whereas the the web interface uses the API /api/sends/file.
To rule out the possibility that the error is coming from the nginx reverse proxy, I've executed the command curl -sD - -o /dev/null http://localhost/api/sends/file/v2 directly in the vaultwarden container shell. I still get the 404 error:
Looks like the mobile clients send the data in a different way then the web-vault.
The same goes for Attachments as reported in #2512
@BlackDex commented on GitHub (May 29, 2022):
Looks like the mobile clients send the data in a different way then the web-vault.
The same goes for Attachments as reported in #2512
It looks like this is an issue of some interpretation of the RFC's and what is commonly used currently.
During a multipart/data stream it is encouraged to use quotes around field names, and most clients seem to do that, and a lot of servers seem to not allow unquoted items. This is the same for Rocket. For some reason the Android client doesn't quote some field names, and that causes Rocket to not parse the request correctly.
Now they have created a PR after some debugging together with me, but that PR now causes it to be the other way around 😆 .
I got it working on the Android app, but not via the web-vault anymore. So, we just have to wait until that is solved for this to work unfortunately.
@BlackDex commented on GitHub (Jun 1, 2022):
It looks like this is an issue of some interpretation of the RFC's and what is commonly used currently.
During a multipart/data stream it is encouraged to use quotes around field names, and most clients seem to do that, and a lot of servers seem to not allow unquoted items. This is the same for Rocket. For some reason the Android client doesn't quote some field names, and that causes Rocket to not parse the request correctly.
Now they have created a PR after some debugging together with me, but that PR now causes it to be the other way around 😆 .
I got it working on the Android app, but not via the web-vault anymore. So, we just have to wait until that is solved for this to work unfortunately.
For those who are interested: https://github.com/rousan/multer-rs/pull/42
Using web vault Version 2022.05.0 I can no longer upload attachments, I believe this is likely caused by the same issue.
Your environment (Generated via diagnostics page)
Vaultwarden version: v1.25.0
Web-vault version: v2022.05.0
Running within Docker: false (Base: Debian)
Environment settings overridden: false
Uses a reverse proxy: true
IP Header check: true (X-Real-IP)
Internet access: true
Internet access via a proxy: false
DNS Check: true
Time Check: true
Domain Configuration Check: true
HTTPS Check: true
Database type: SQLite
Database version: 3.35.4
I can upload any other info needed, please let me know.
@KnightTim commented on GitHub (Jun 23, 2022):
Using web vault Version 2022.05.0 I can no longer upload attachments, I believe this is likely caused by the same issue.
### Your environment (Generated via diagnostics page)
* Vaultwarden version: v1.25.0
* Web-vault version: v2022.05.0
* Running within Docker: false (Base: Debian)
* Environment settings overridden: false
* Uses a reverse proxy: true
* IP Header check: true (X-Real-IP)
* Internet access: true
* Internet access via a proxy: false
* DNS Check: true
* Time Check: true
* Domain Configuration Check: true
* HTTPS Check: true
* Database type: SQLite
* Database version: 3.35.4
I can upload any other info needed, please let me know.
@KnightTim uploading attachments via the web-vault is broken? Or using the other clients?? Because for me uploading via the web-vault works without issues. Only the mobile and cli clients give issues.
@BlackDex commented on GitHub (Jun 23, 2022):
@KnightTim uploading attachments via the web-vault is broken? Or using the other clients?? Because for me uploading via the web-vault works without issues. Only the mobile and cli clients give issues.
@KnightTim uploading attachments via the web-vault is broken? Or using the other clients?? Because for me uploading via the web-vault works without issues. Only the mobile and cli clients give issues.
@KnightTim commented on GitHub (Jun 23, 2022):
> @KnightTim uploading attachments via the web-vault is broken? Or using the other clients?? Because for me uploading via the web-vault works without issues. Only the mobile and cli clients give issues.
@BlackDex I get this error

What version of the web-vault are you running?
Edit: created a discussion https://github.com/dani-garcia/vaultwarden/discussions/2573
The exact same version. I suggest to start a discussion regarding this (not a new issue) and not clutter this issue, since i think you have some reverse proxy config issues.
@BlackDex commented on GitHub (Jun 23, 2022):
The exact same version. I suggest to start a discussion regarding this (not a new issue) and not clutter this issue, since i think you have some reverse proxy config issues.
@svenstaro commented on GitHub (Jul 15, 2022):
As an update, the upstream PR was merged in https://github.com/rousan/multer-rs/commit/677ce5cd1b2939d5aced78debd06932730efb19b and released in multer 2.0.3.
Unfortunately this issue seems still not fixed for me; same issue, same 404 error. Meanwhile I'm currently using vaultwarden v1.25.1 and the Android app v2022.6.2 (4851).
@mrclschstr commented on GitHub (Aug 7, 2022):
Unfortunately this issue seems still not fixed for me; same issue, same 404 error. Meanwhile I'm currently using vaultwarden v1.25.1 and the Android app v2022.6.2 (4851).
Have you installed the testing tagged image? Or are you using the latest tagged image?
Because the fix is only in the testing tagged image.
@BlackDex commented on GitHub (Aug 7, 2022):
Have you installed the `testing` tagged image? Or are you using the `latest` tagged image?
Because the fix is only in the `testing` tagged image.
To give a bit more context. We thought it would have been fixed in 1.25.1, though it caused an issue with mobile client uploads to be broken. So if you are still using that version and have uploaded files via the mobile client. They are probably broken.
In 1.25.2 we disabled this, and prevented those file uploads from reporting a false positive successful upload.
Now, in the current testing version there is a patch which allows these files to be uploaded again.
So, either use 1.25.2 which prevents broken uploads, or use the current testing image which has a fix for this.
@BlackDex commented on GitHub (Aug 7, 2022):
To give a bit more context. We thought it would have been fixed in 1.25.1, though it caused an issue with mobile client uploads to be broken. So if you are still using that version and have uploaded files via the mobile client. They are probably broken.
In 1.25.2 we disabled this, and prevented those file uploads from reporting a false positive successful upload.
Now, in the current `testing` version there is a patch which allows these files to be uploaded again.
So, either use 1.25.2 which prevents broken uploads, or use the current `testing` image which has a fix for this.
I'm sorry, small typo: I'm currently using the latest vaultwarden v1.25.2.
The issue itself has not changed since my bug report: During a file upload in Sends via the Android app I'm still seeing an API access to /api/sends/file/v2 which gives me a 404 error. To rule out the reverse proxy, I've executed the command curl -sD - -o /dev/null http://localhost/api/sends/file/v2 directly in the vaultwarden container shell which also gives me a 404.
I'll give the testing branch a shot.
@mrclschstr commented on GitHub (Aug 7, 2022):
I'm sorry, small typo: I'm currently using the latest vaultwarden v1.25.2.
The issue itself has not changed since my bug report: During a file upload in Sends via the Android app I'm still seeing an API access to `/api/sends/file/v2` which gives me a 404 error. To rule out the reverse proxy, I've executed the command `curl -sD - -o /dev/null http://localhost/api/sends/file/v2` directly in the vaultwarden container shell which also gives me a 404.
I'll give the `testing` branch a shot.
Well, that is correct, and that is no issue. Vaultwarden does not support /api/sends/file/v2 (yet). And that causes the clients to switch to the v1 way which works just fine.
So that 404 is as intended. But still, uploading works fine since it will use a different way.
@BlackDex commented on GitHub (Aug 7, 2022):
Well, that is correct, and that is no issue. Vaultwarden does not support /api/sends/file/v2 (yet). And that causes the clients to switch to the v1 way which works just fine.
So that 404 is as intended. But still, uploading works fine since it will use a different way.
Well, that's the point: The app is not switching to the v1 API for me; does it work for you? Is that an issue of the Android app or the reverse proxy configuration? Using the web app upload works just fine!
@mrclschstr commented on GitHub (Aug 7, 2022):
Well, that's the point: The app is not switching to the v1 API for me; does it work for you? Is that an issue of the Android app or the reverse proxy configuration? Using the web app upload works just fine!
If you are using the latest tagged version then currently you can't upload files via the mobile clients.
Use the testing tagged image for that.
And, yes, it works fine for me. Both Send and Cipher Attachments
@BlackDex commented on GitHub (Aug 7, 2022):
If you are using the `latest` tagged version then currently you can't upload files via the mobile clients.
Use the `testing` tagged image for that.
And, yes, it works fine for me. Both `Send` and Cipher `Attachments`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @mrclschstr on GitHub (May 29, 2022).
Originally assigned to: @BlackDex on GitHub.
Subject of the issue
Uploading files to Bitwarden Send using Bitwarden Android app v2.18.0 (4572) does not work.
Deployment environment
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden: DOMAIN, ADMIN_TOKEN
Steps to reproduce
Open latest BItwarden Android app and create a new file in Send. Clicking
Saveresults in an error message:Es ist ein Fehler aufgetreten(german, translates to "An error occurred").Expected behaviour
A Send file is created and can be shared with others.
Actual behaviour
File is not uploaded to Send.
Troubleshooting data
You can upload a file via the web interface without any issue. I just discovered this error using the Bitwarden Android app v2.18.0 (4572). The vaultwarden trace logs show the following:
Vaultwarden Trace Log
It seems that the Bitwarden Android app uses the API
/api/sends/file/v2(resulting in422 Unprocessable Entity) whereas the the web interface uses the API/api/sends/file.To rule out the possibility that the error is coming from the nginx reverse proxy, I've executed the command
curl -sD - -o /dev/null http://localhost/api/sends/file/v2directly in the vaultwarden container shell. I still get the 404 error:Does vaultwarden not yet implement the v2 api endpoint?
@BlackDex commented on GitHub (May 29, 2022):
Looks like the mobile clients send the data in a different way then the web-vault.
The same goes for Attachments as reported in #2512
@nathanael-h commented on GitHub (May 31, 2022):
Indeed: https://github.com/bitwarden/mobile/blob/b8b41fe847e3db5553a07f2a9246f4e8bc344b08/src/Core/Services/ApiService.cs#L253
@BlackDex commented on GitHub (May 31, 2022):
They still also support v1, but they seem to send different kind of parameters.
@BlackDex commented on GitHub (Jun 1, 2022):
It looks like this is an issue of some interpretation of the RFC's and what is commonly used currently.
During a multipart/data stream it is encouraged to use quotes around field names, and most clients seem to do that, and a lot of servers seem to not allow unquoted items. This is the same for Rocket. For some reason the Android client doesn't quote some field names, and that causes Rocket to not parse the request correctly.
Now they have created a PR after some debugging together with me, but that PR now causes it to be the other way around 😆 .
I got it working on the Android app, but not via the web-vault anymore. So, we just have to wait until that is solved for this to work unfortunately.
For those who are interested: https://github.com/rousan/multer-rs/pull/42
@KnightTim commented on GitHub (Jun 23, 2022):
Using web vault Version 2022.05.0 I can no longer upload attachments, I believe this is likely caused by the same issue.
Your environment (Generated via diagnostics page)
I can upload any other info needed, please let me know.
@BlackDex commented on GitHub (Jun 23, 2022):
@KnightTim uploading attachments via the web-vault is broken? Or using the other clients?? Because for me uploading via the web-vault works without issues. Only the mobile and cli clients give issues.
@KnightTim commented on GitHub (Jun 23, 2022):
@BlackDex I get this error

What version of the web-vault are you running?
Edit: created a discussion https://github.com/dani-garcia/vaultwarden/discussions/2573
@BlackDex commented on GitHub (Jun 23, 2022):
The exact same version. I suggest to start a discussion regarding this (not a new issue) and not clutter this issue, since i think you have some reverse proxy config issues.
@svenstaro commented on GitHub (Jul 15, 2022):
As an update, the upstream PR was merged in https://github.com/rousan/multer-rs/commit/677ce5cd1b2939d5aced78debd06932730efb19b and released in multer 2.0.3.
@mrclschstr commented on GitHub (Aug 7, 2022):
Unfortunately this issue seems still not fixed for me; same issue, same 404 error. Meanwhile I'm currently using vaultwarden v1.25.1 and the Android app v2022.6.2 (4851).
@BlackDex commented on GitHub (Aug 7, 2022):
Have you installed the
testingtagged image? Or are you using thelatesttagged image?Because the fix is only in the
testingtagged image.@BlackDex commented on GitHub (Aug 7, 2022):
To give a bit more context. We thought it would have been fixed in 1.25.1, though it caused an issue with mobile client uploads to be broken. So if you are still using that version and have uploaded files via the mobile client. They are probably broken.
In 1.25.2 we disabled this, and prevented those file uploads from reporting a false positive successful upload.
Now, in the current
testingversion there is a patch which allows these files to be uploaded again.So, either use 1.25.2 which prevents broken uploads, or use the current
testingimage which has a fix for this.@mrclschstr commented on GitHub (Aug 7, 2022):
I'm sorry, small typo: I'm currently using the latest vaultwarden v1.25.2.
The issue itself has not changed since my bug report: During a file upload in Sends via the Android app I'm still seeing an API access to
/api/sends/file/v2which gives me a 404 error. To rule out the reverse proxy, I've executed the commandcurl -sD - -o /dev/null http://localhost/api/sends/file/v2directly in the vaultwarden container shell which also gives me a 404.I'll give the
testingbranch a shot.@BlackDex commented on GitHub (Aug 7, 2022):
Well, that is correct, and that is no issue. Vaultwarden does not support /api/sends/file/v2 (yet). And that causes the clients to switch to the v1 way which works just fine.
So that 404 is as intended. But still, uploading works fine since it will use a different way.
@mrclschstr commented on GitHub (Aug 7, 2022):
Well, that's the point: The app is not switching to the v1 API for me; does it work for you? Is that an issue of the Android app or the reverse proxy configuration? Using the web app upload works just fine!
@BlackDex commented on GitHub (Aug 7, 2022):
If you are using the
latesttagged version then currently you can't upload files via the mobile clients.Use the
testingtagged image for that.And, yes, it works fine for me. Both
Sendand CipherAttachments@mrclschstr commented on GitHub (Oct 17, 2022):
Works perfectly with 1.26.0., thank you!