Error when uploading image
kukumaka opened this issue · 3 comments
Did you check the FAQ & Troubleshooting section for answers to common questions and issues?
Yes
Describe the issue
What happened? Post any relevant log snippets.
I am unable to upload images, it displays this on the website (discuss . ge):
{"data":{"msg":"Failed with status exit status: 1","files":null},"state":"success"}
Diagnostic Information
Run
./deploy.sh -d
and paste the output below:
==== Docker Information ====
Detected runtime: docker (Docker version 24.0.2, build cb74dfc)
Detected compose: docker compose (Docker Compose version v2.18.1)
Runtime state: OK
==== System Information ====
OS: Linux
KERNEL: 4.15.0-20-generic (x86_64)
HOSTNAME: OK
SHELL: bash
MEMORY:
total used free shared buff/cache available
Mem: 968M 352M 101M 25M 514M 427M
Swap: 1.0G 43M 980M
DISTRO:
----------------------------
NAME="Ubuntu"
PRETTY_NAME="Ubuntu 18.04 LTS"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
----------------------------
==== Lemmy-Easy-Deploy Information ====
Version: 1.3.2
IMAGE CREATED STATUS
caddy:latest 2 days ago Up 2 days
ghcr.io/ubergeek77/lemmy-ui:0.19.1 2 days ago Up 2 days
ghcr.io/ubergeek77/lemmy:0.19.1 2 days ago Up 2 days
mwader/postfix-relay 2 days ago Up 2 days
asonix/pictrs:0.4.3 2 days ago Up 2 days
postgres:15-alpine 2 days ago Up 2 days
Integrity:
4d152974ef6012d761e203b5e7618be56f2b1a12e4c8821b6c7fd8872f0eddd3 ./deploy.s h
92c95dfc886792b8df2e9fffb540fc71a35c3bc6fd6c7662134da1545a79457a ./template s/Caddy-Dockerfile.template
c1202e70662dd2228da36a35a0f38ec8fc81bec8964d7315d02e8671a58dd7d7 ./template s/Caddyfile.template
2537678c7971df36c1ed95f4228d3cfcb15bb4a28a60d939eaf8dd75b5d64a36 ./template s/cloudflare.snip
c9cb4c5fee12930e17798a02ae1bd12e2dc69e149a394c24511bc9d4e6b776d4 ./template s/compose-email.snip
c494a610bcb4cd1cfc0a4fe4fb0f6d437b2a84a0ad1625daee240e6dd6f1c910 ./template s/compose-email-volumes.snip
d7a137df820c50c591a6b46ff0fc5ab9ee9e5be341fcac9eb5c3d0f650f94213 ./template s/docker-compose.yml.template
1c202b1b6e87c65b2fcda6035c9fe3f8631d76662907ffd38f24b14686e30647 ./template s/lemmy-email.snip
c834cdce9eaf77f38155b404724fdfe66845575386ee516987452aa715642a6f ./template s/lemmy.hjson.template
Custom Files:
*** No custom files ***
==== Settings ====
CLOUDFLARE: No
CADDY_DISABLE_TLS: false
CADDY_HTTP_PORT: 80
CADDY_HTTPS_PORT: 443
LEMMY_TLS_ENABLED: true
ENABLE_EMAIL: true
SMTP_PORT: 25
ENABLE_POSTFIX: true
POSTGRES_POOL_SIZE: 5
==== Generated Files ====
Deploy Version: 0.19.1;0.19.1
total 40K
drwxr-xr-x 2 0 0 4.0K Jan 8 13:56 caddy
-rw-r--r-- 1 0 0 26 Jan 8 13:56 caddy.env
-rw-r--r-- 1 0 0 2.1K Jan 8 13:56 docker-compose.yml
-rw-r--r-- 1 0 0 50 Jan 8 13:56 lemmy.env
-rw-r--r-- 1 0 0 652 Jan 8 13:56 lemmy.hjson
drwxr-xr-x 2 0 0 4.0K Jan 8 13:57 lemmy-ui-themes
-rw-r--r-- 1 0 0 49 Jan 8 13:56 pictrs.env
-rw-r--r-- 1 0 0 30 Jan 8 13:56 postfix.env
-rw-r--r-- 1 0 0 51 Jan 8 13:56 postgres.env
-rw-r--r-- 1 0 0 14 Jan 8 13:57 version
Unfortunately, I can't reproduce this issue.
Do you have enough disk space?
I've just pushed an update to Lemmy-Easy-Deploy that updates pictrs to 0.4.7
. This update would also update you to Lemmy 0.19.2
. It's possible this bug was fixed already.
Please update by running ./deploy.sh
twice and see if this fixes the issue.
If you're still having issues after you update, you may need to report this to the Lemmy developers. Based on the error message this sounds like a possible Lemmy-UI issue:
So this is really weird. The file I'm uploading is a JPEG file. I have tried other files, like JPG and PNG, and they work fine. I also uploaded the JPEG file to imgur and downloaded it again, and it works fine.
You can reproduce the issue by downloading this file: https://www.reddit.com/media?url=https%3A%2F%2Fi.redd.it%2Fw8auh5p8rhbc1.jpeg and it will not let you upload it.
Thanks for the help and I really appreciate this whole project! I wish I had found it sooner!
I was able to reproduce this issue, but unfortunately, I can't fix this issue for you. This seems to be an issue with the pictrs
container, and even further, with the ffprobe
binary they use. There is something about this image that ffprobe
does not like.
However, you can work around this issue by converting problematic images to PNG. It seems this is specific to jpeg images:
pictrs-1 | 0: Error in ffmpeg
pictrs-1 | 1: Error in ffmpeg process
pictrs-1 | 2: ffprobe Failed with exit status: 1
pictrs-1 |
pictrs-1 | Location:
pictrs-1 | /workspace/asonix/pict-rs/src/discover.rs:32
pictrs-1 |
pictrs-1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
pictrs-1 |
pictrs-1 | 0: pict_rs::discover::discover_bytes_stream
pictrs-1 | at src/discover.rs:27
pictrs-1 | 1: pict_rs::ingest::validate::validate_bytes_stream
pictrs-1 | at src/ingest/validate.rs:64
pictrs-1 | 2: pict_rs::ingest::ingest with declared_alias=None upload_query=UploadQuery { limits: UploadLimits { max_width: None, max_height: None, max_area: None, max_frame_count: None, max_file_size: None, allow_image: Serde { inner: true }, allow_animation: Serde { inner: true }, allow_video: Serde { inner: true } }, operations: [] }
pictrs-1 | at src/ingest.rs:169
pictrs-1 | 3: pict_rs::file-upload with filename="lemmy-test-image.jpeg"
pictrs-1 | at src/lib.rs:219
pictrs-1 | 4: actix_form_data::upload::multipart-field
pictrs-1 | at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-form-data-0.7.0-beta.7/src/upload.rs:312
Once this is fixed by pictrs and/or the ffmpeg team (who manages ffprobe), this issue will be resolved as Lemmy-Easy-Deploy uses the official pictrs container.
Sorry about that!