-
Notifications
You must be signed in to change notification settings - Fork 255
Description
What happened?
Whenever I try to upload an avatar or an emoji, it is rejected by the backend with error 500.
Browser logs
POST https://stoat.example.org/autumn/emojis
Content-Disposition: form-data; name="file"; filename="__.png"
Content-Type: image/png
<binary data>
receives response 500 {"type":"InternalError","location":"crates/core/files/src/lib.rs:28:5"}
PUT https://stoat.example.org/api/custom/emoji/undefined
{"parent":{"type":"Server","id":"01KJC6ZQ204YH2R36ZJHMJ1MZV"},"name":"__"}
receives response 404 {"type":"NotFound","location":"crates/core/database/src/models/files/ops/mongodb.rs:100:24"}
Container logs
stoat-api[70475]: INFO rocket::server > POST /sync/settings/fetch? text/plain:
stoat-api[70475]: INFO rocket::server::_ > Matched: (fetch) POST /sync/settings/fetch
stoat-api[70475]: INFO rocket::server::_ > Outcome: Success(200 OK)
stoat-api[70475]: INFO rocket::server::_ > Response succeeded.
stoat-api[70475]: INFO rocket::server > GET /sync/unreads?:
stoat-api[70475]: INFO rocket::server::_ > Matched: (unreads) GET /sync/unreads
stoat-api[70475]: INFO rocket::server::_ > Outcome: Success(200 OK)
stoat-api[70475]: INFO rocket::server::_ > Response succeeded.
stoat-for-web[70529]: [12:23:21] 200 ─ 0.97ms ─ /serviceWorker.js
stoat-file-server[69910]: INFO revolt_autumn::api > Received file __.png
stoat-file-server[69910]: Original hash: 997b3376399f34ca6807bca58b7e88e8bb989da789f51eac8ae77a187e766405
stoat-file-server[69910]: Original size: 35588 bytes
stoat-file-server[69910]: Mime type: image/png
stoat-file-server[69910]: Metadata: Image { width: 128, height: 128 }
stoat-file-server[69910]: Processed file size: 22952 bytes (64.49%).
stoat-file-server[69910]: Processed hash: a5bfc9fb508fc357096ea49c73fd5761224cfdb35efd2b173bd8f5bd7a6dfdae
stoat-file-server[69910]: Processing took 1.570631ms
stoat-api[70475]: INFO rocket::server > PUT /custom/emoji/undefined? text/plain:
stoat-api[70475]: INFO rocket::server::_ > Matched: (create_emoji) PUT /custom/emoji/<id>
stoat-api[70475]: INFO rocket::server::_ > Outcome: Success(404 Not Found)
stoat-api[70475]: INFO rocket::server::_ > Response succeeded.
The file does not get saved to MinIO, the bucket is empty.
Steps to reproduce:
- Deploy the services listed in compose.yml
- Create an account and log in
- Go to Server settings
- Go to Emojis tab
- Upload an emoji, give it a name and click Create
How reproducible:
Always
Version information:
$ podman image ls | grep -e mongo -e for-web -e file-server -e api -e minio
ghcr.io/stoatchat/for-web addb6b7 6a4328ccd016 9 days ago 214 MB
docker.io/library/mongo latest f0286cc18189 10 days ago 945 MB
ghcr.io/stoatchat/file-server v0.11.1 ae9275e5db2c 2 weeks ago 323 MB
ghcr.io/stoatchat/api v0.11.1 cd64a528b3cd 2 weeks ago 71.2 MB
quay.io/minio/minio latest 69b2ec208575 5 months ago 176 MBAdditional Information:
I have deployed the services via Podman Quadlets, I do not have Docker and its compose available. But I do believe everything is set up correctly; in MinIO Web UI, I can log in with the configured credentials, and it does have 'revolt-uploads' configured as the default bucket, which means Stoat did manage to connect to it before.
In case this is a configuration issue, what do I need to include in stoatchat/stoatchat repository bug report to make sure these configuration issues have better visibility in logs?