Cannot attach file to note #2267

Closed
opened 2025-10-09 17:54:16 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @pew on GitHub.

Hi,

I'm trying to attach a file to an existing note using the macOS bitwarden client (1.11.2), I get "an unexpected error occurred" within the app. The log files reveal a bit more:

    => Matched: POST /api/ciphers/<uuid>/attachment multipart/form-data
Multipart::with_boundary(_, "----WebKitFormBoundary2fiejULtr1u8xrNL")
thread '<unnamed>' panicked at 'No filename provided', libcore/option.rs:1000:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:476
   5: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:390
   6: rust_begin_unwind
             at libstd/panicking.rs:325
   7: core::panicking::panic_fmt
             at libcore/panicking.rs:77
   8: core::option::expect_failed
             at libcore/option.rs:1000
   9: <multipart::server::Multipart<R>>::foreach_entry
  10: bitwarden_rs::api::core::ciphers::post_attachment
  11: bitwarden_rs::api::core::ciphers::rocket_route_fn_post_attachment
  12: rocket::rocket::Rocket::dispatch
  13: <rocket::rocket::Rocket as hyper::server::Handler>::handle
  14: <hyper::server::Worker<H>>::handle_connection
  15: hyper::server::listener::spawn_with::{{closure}}
    => Warning: Data left unread. Force closing network stream.

I don't know how to set a name, I'm just selecting a file and hit the save icon, there's no way to set a name?

I'm using the docker image mprasil/bitwarden:1.4.0-alpine and have the DOMAIN ENV var set (I read about this in some other issue)

Thank you!

Originally created by @pew on GitHub. Hi, I'm trying to attach a file to an existing note using the macOS bitwarden client (1.11.2), I get "an unexpected error occurred" within the app. The log files reveal a bit more: ``` => Matched: POST /api/ciphers/<uuid>/attachment multipart/form-data Multipart::with_boundary(_, "----WebKitFormBoundary2fiejULtr1u8xrNL") thread '<unnamed>' panicked at 'No filename provided', libcore/option.rs:1000:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at libstd/sys_common/backtrace.rs:71 at libstd/sys_common/backtrace.rs:59 2: std::panicking::default_hook::{{closure}} at libstd/panicking.rs:211 3: std::panicking::default_hook at libstd/panicking.rs:227 4: std::panicking::rust_panic_with_hook at libstd/panicking.rs:476 5: std::panicking::continue_panic_fmt at libstd/panicking.rs:390 6: rust_begin_unwind at libstd/panicking.rs:325 7: core::panicking::panic_fmt at libcore/panicking.rs:77 8: core::option::expect_failed at libcore/option.rs:1000 9: <multipart::server::Multipart<R>>::foreach_entry 10: bitwarden_rs::api::core::ciphers::post_attachment 11: bitwarden_rs::api::core::ciphers::rocket_route_fn_post_attachment 12: rocket::rocket::Rocket::dispatch 13: <rocket::rocket::Rocket as hyper::server::Handler>::handle 14: <hyper::server::Worker<H>>::handle_connection 15: hyper::server::listener::spawn_with::{{closure}} => Warning: Data left unread. Force closing network stream. ``` I don't know how to set a name, I'm just selecting a file and hit the save icon, there's no way to set a name? I'm using the docker image `mprasil/bitwarden:1.4.0-alpine` and have the `DOMAIN` ENV var set (I read about this in some other issue) Thank you!
OVERLORD added the troubleshooting label 2025-10-09 17:54:16 +03:00
Author
Owner

@mprasil commented on GitHub:

What's your setup like? Do you use any sort of reverse proxy?

@mprasil commented on GitHub: What's your setup like? Do you use any sort of reverse proxy?
Author
Owner

@hjiang commented on GitHub:

I'm not using any reverse proxy. Here's the command I used to launch it:

docker run -d --name bitwarden \
	-e ROCKET_TLS='{certs="....",key="...."}' \
	-e DOMAIN=https://.... \
	-e SERVER_ADMIN_EMAIL=... \
	-v /etc/letsencrypt/:/ssl/ \
	-v /bw-data/:/data/ \
	-p 443:80 \
	mprasil/bitwarden:latest
@hjiang commented on GitHub: I'm not using any reverse proxy. Here's the command I used to launch it: ``` docker run -d --name bitwarden \ -e ROCKET_TLS='{certs="....",key="...."}' \ -e DOMAIN=https://.... \ -e SERVER_ADMIN_EMAIL=... \ -v /etc/letsencrypt/:/ssl/ \ -v /bw-data/:/data/ \ -p 443:80 \ mprasil/bitwarden:latest ```
Author
Owner

@mprasil commented on GitHub:

There were some changes in the API, I believe they should be now fixed in the rocket-0.4 branch. If you're willing to test the implementation, you can try mprasil/bitwarden:beta docker image. Just be aware that there are some changes around attachments, so a backup before you test the beta version is strongly advised. Otherwise you might end up loosing the attachments.

@mprasil commented on GitHub: There were some changes in the API, I believe they should be now fixed in the rocket-0.4 branch. If you're willing to test the implementation, you can try `mprasil/bitwarden:beta` docker image. Just be aware that there are some changes around attachments, so a backup before you test the beta version is *strongly* advised. Otherwise you might end up loosing the attachments.
Author
Owner

@dani-garcia commented on GitHub:

This is fixed in `master´ now. I'll wait a couple of days to test if the fixes to #275 work fine now and then I'll publish a new release.

@dani-garcia commented on GitHub: This is fixed in `master´ now. I'll wait a couple of days to test if the fixes to #275 work fine now and then I'll publish a new release.
Author
Owner

@hjiang commented on GitHub:

Hi. I'm using the latest docker image from bitwardenrs/server and still seeing the same errors:

thread '<unnamed>' panicked at 'No filename provided', libcore/option.rs:1010:5
POST /api/ciphers/bd7ba83d-a4c8-48f8-a351-efac0b651620/attachment multipart/form-data; boundary=----WebKitFormBoundaryBbBuE8KDbDvfr0yo:
    => Matched: POST /api/ciphers/<uuid>/attachment multipart/form-data
Multipart::with_boundary(_, "----WebKitFormBoundaryBbBuE8KDbDvfr0yo")
thread '<unnamed>' panicked at 'No filename provided', libcore/option.rs:1010:5
POST /api/ciphers/bd7ba83d-a4c8-48f8-a351-efac0b651620/attachment multipart/form-data; boundary=----WebKitFormBoundaryqrXMLddgwrln75G7:
    => Matched: POST /api/ciphers/<uuid>/attachment multipart/form-data
Multipart::with_boundary(_, "----WebKitFormBoundaryqrXMLddgwrln75G7")
POST /notifications/hub/negotiate text/plain; charset=UTF-8:
@hjiang commented on GitHub: Hi. I'm using the latest docker image from bitwardenrs/server and still seeing the same errors: ``` thread '<unnamed>' panicked at 'No filename provided', libcore/option.rs:1010:5 POST /api/ciphers/bd7ba83d-a4c8-48f8-a351-efac0b651620/attachment multipart/form-data; boundary=----WebKitFormBoundaryBbBuE8KDbDvfr0yo: => Matched: POST /api/ciphers/<uuid>/attachment multipart/form-data Multipart::with_boundary(_, "----WebKitFormBoundaryBbBuE8KDbDvfr0yo") thread '<unnamed>' panicked at 'No filename provided', libcore/option.rs:1010:5 POST /api/ciphers/bd7ba83d-a4c8-48f8-a351-efac0b651620/attachment multipart/form-data; boundary=----WebKitFormBoundaryqrXMLddgwrln75G7: => Matched: POST /api/ciphers/<uuid>/attachment multipart/form-data Multipart::with_boundary(_, "----WebKitFormBoundaryqrXMLddgwrln75G7") POST /notifications/hub/negotiate text/plain; charset=UTF-8: ```
Author
Owner

@hjiang commented on GitHub:

Actually, my bad. I didn't notice that the image name had changed to bitwardenrs/server:latest (it's what I used in docker pull), so I wasn't actually running the latest version. After i updated the startup script, attachments are working fine now.

Thanks!

@hjiang commented on GitHub: Actually, my bad. I didn't notice that the image name had changed to `bitwardenrs/server:latest` (it's what I used in `docker pull`), so I wasn't actually running the latest version. After i updated the startup script, attachments are working fine now. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2267