szabodanika / microbin

A secure, configurable file-sharing and URL shortening web app written in Rust.
https://microbin.eu
BSD 3-Clause "New" or "Revised" License
2.63k stars 160 forks source link

Failed to delete file no-file #15

Closed NathanOSullivan closed 2 years ago

NathanOSullivan commented 2 years ago

Ran microbin in my Documents folder (not as sudo). Program crashed when I attempted to create new text pasta, at which point I killed the process.


2022-06-04T13:40:39 [INFO] - MicroBin starting on http://127.0.0.1:8080 2022-06-04T13:40:39 [INFO] - Starting 1 workers 2022-06-04T13:40:39 [INFO] - Actix runtime found; starting in Actix runtime 2022-06-04T13:40:48 [INFO] - 127.0.0.1 "GET / HTTP/1.1" 302 2615 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0" 0.000127 2022-06-04T13:40:48 [INFO] - 127.0.0.1 "GET /static/water.css HTTP/1.1" 302 22668 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0" 0.000121 2022-06-04T13:40:48 [INFO] - 127.0.0.1 "GET /favicon.ico HTTP/1.1" 302 1138 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0" 0.000093 2022-06-04T13:40:52 [INFO] - 127.0.0.1 "POST /upload HTTP/1.1" 302 0 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0" 0.000682 56942 thread 'actix-rt|system:0|arbiter:0' panicked at 'Failed to delete file no-file!: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/util/misc.rs:26:18 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41 thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41 thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41 thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41 thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41 thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41 thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41 thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41 thread 'actix-rt|system:0|arbiter:0' panicked at 'called Result::unwrap() on an Err value: PoisonError { .. }', src/endpoints/pasta.rs:20:41 ^C2022-06-04T13:41:06 [INFO] - SIGINT received; starting forced shutdown


Received this error twice (not back to back). I am unable to recreate this error no matter what I try.

(not sure if this info is needed, but here it is anyway) Mac M1 macOS Monterey v12.3.1 Firefox 101.0 (64-Bit)

Microbin was installed via "cargo install --git https://github.com/szabodanika/microbin"

szabodanika commented 2 years ago

Thanks for this @NathanOSullivan, well formatted issue! Is this on v1.0.1 or v1.0.2? I patched a few things not long ago (after the Reddit post), I think this issue should be fixed by a git update and a quick rebuild. Don't worry, your database won't be affected by this.

NathanOSullivan commented 2 years ago

Thanks for this @NathanOSullivan, well formatted issue! Is this on v1.0.1 or v1.0.2? I patched a few things not long ago (after the Reddit post), I think this issue should be fixed by a git update and a quick rebuild. Don't worry, your database won't be affected by this.

It seems that I was using v1.0.1, so likely this is no longer and issue. Dark theme looks great btw!

szabodanika commented 2 years ago

That's great, happy to hear it's all solved now, sorry for the trouble. Thanks for that, I'll pass that along to the guys who made Water.css :-)