[bug] Internal Server Error when uploading media #636

Closed
opened 2023-08-29 19:55:02 +00:00 by Crafti · 4 comments

Your setup

From source

Extra details

Fedora release 38 (Linux 6.2.15-300.fc38.aarch64 #1 SMP PREEMPT_DYNAMIC Thu May 11 16:54:06 UTC 2023 aarch64 GNU/Linux)

Version

3.10.4

PostgreSQL version

15.1

What were you trying to do?

Uploading media (regardless of size or type)

What did you expect to happen?

Media upload to be successful.

What actually happened?

Uploading fails with 500.

Logs

[debug] POST /api/v1/media
[debug] Processing with Pleroma.Web.MastodonAPI.MediaController.create/2
   Parameters: %{"file" => %Plug.Upload{path: "/tmp/plug-1693/multipart-1693338034-92571290139-3", content_type: "application/octet-stream", filename: "FhNvWTkXwAAwlQs.jpg"}}
   Pipelines: [:authenticated_api]
[error] Internal server error: {:noproc, {:gen_statem, :call, [#PID<0.15606.47>, {:perform, "/tmp/plug-1693/multipart-1693338034-92571290139-3"}, 30000]}}
[debug] Converted exit {:noproc, {:gen_statem, :call, [#PID<0.15606.47>, {:perform, "/tmp/plug-1693/multipart-1693338034-92571290139-3"}, 30000]}} to 500 response

---

[error] Internal server error: {:noproc, {:gen_statem, :call, [#PID<0.1213.0>, {:perform, "/tmp/plug-1693/multipart-1693338331-401404157336-1"}, 30000]}}
[debug] Converted exit {:noproc, {:gen_statem, :call, [#PID<0.1213.0>, {:perform, "/tmp/plug-1693/multipart-1693338331-401404157336-1"}, 30000]}} to 500 response
[error] Ranch listener Pleroma.Web.Endpoint.HTTP, connection process #PID<0.1490.0>, stream 1 had its request process #PID<0.1491.0> exit with reason {{:noproc, {:gen_statem, :call, [#PID<0.1213.0>, {:perform, "/tmp/plug-1693/multipart-1693338331-401404157336-1"}, 30000]}}, {Pleroma.Web.Endpoint, :call, [%Plug.Conn{adapter: {Plug.Cowboy.Conn, :...}, assigns: %{}, body_params: %Plug.Conn.Unfetched{aspect: :body_params}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "akkoma.0x68756773.moe", method: "POST", owner: #PID<0.1491.0>, params: %Plug.Conn.Unfetched{aspect: :params}, path_info: ["api", "v1", "media"], path_params: %{}, port: 80, private: %{}, query_params: %Plug.Conn.Unfetched{aspect: :query_params}, query_string: "", remote_ip: {127, 0, 0, 1}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"accept-encoding", "gzip"}, {"authorization", "[REDACTED]"}, {"connection", "upgrade"}, {"content-length", "7050129"}, {"content-type", "multipart/form-data; boundary=dart-http-boundary-DFAQgA1zHApzXy8N3BDWTbqci3X6HCioB9Hsg8lz5ufhIZ0WRT1"}, {"host", "akkoma.0x68756773.moe"}, {"user-agent", "Kaiteki/1.0"}, {"x-forwarded-for", "[REDACTED]"}], request_path: "/api/v1/media", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}], scheme: :http, script_name: [], secret_key_base: nil, state: :unset, status: nil}, []]}} and stacktrace []

Severity

I cannot use it as easily as I'd like

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup From source ### Extra details Fedora release 38 (Linux 6.2.15-300.fc38.aarch64 #1 SMP PREEMPT_DYNAMIC Thu May 11 16:54:06 UTC 2023 aarch64 GNU/Linux) ### Version 3.10.4 ### PostgreSQL version 15.1 ### What were you trying to do? Uploading media (regardless of size or type) ### What did you expect to happen? Media upload to be successful. ### What actually happened? Uploading fails with 500. ### Logs ```shell [debug] POST /api/v1/media [debug] Processing with Pleroma.Web.MastodonAPI.MediaController.create/2 Parameters: %{"file" => %Plug.Upload{path: "/tmp/plug-1693/multipart-1693338034-92571290139-3", content_type: "application/octet-stream", filename: "FhNvWTkXwAAwlQs.jpg"}} Pipelines: [:authenticated_api] [error] Internal server error: {:noproc, {:gen_statem, :call, [#PID<0.15606.47>, {:perform, "/tmp/plug-1693/multipart-1693338034-92571290139-3"}, 30000]}} [debug] Converted exit {:noproc, {:gen_statem, :call, [#PID<0.15606.47>, {:perform, "/tmp/plug-1693/multipart-1693338034-92571290139-3"}, 30000]}} to 500 response --- [error] Internal server error: {:noproc, {:gen_statem, :call, [#PID<0.1213.0>, {:perform, "/tmp/plug-1693/multipart-1693338331-401404157336-1"}, 30000]}} [debug] Converted exit {:noproc, {:gen_statem, :call, [#PID<0.1213.0>, {:perform, "/tmp/plug-1693/multipart-1693338331-401404157336-1"}, 30000]}} to 500 response [error] Ranch listener Pleroma.Web.Endpoint.HTTP, connection process #PID<0.1490.0>, stream 1 had its request process #PID<0.1491.0> exit with reason {{:noproc, {:gen_statem, :call, [#PID<0.1213.0>, {:perform, "/tmp/plug-1693/multipart-1693338331-401404157336-1"}, 30000]}}, {Pleroma.Web.Endpoint, :call, [%Plug.Conn{adapter: {Plug.Cowboy.Conn, :...}, assigns: %{}, body_params: %Plug.Conn.Unfetched{aspect: :body_params}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "akkoma.0x68756773.moe", method: "POST", owner: #PID<0.1491.0>, params: %Plug.Conn.Unfetched{aspect: :params}, path_info: ["api", "v1", "media"], path_params: %{}, port: 80, private: %{}, query_params: %Plug.Conn.Unfetched{aspect: :query_params}, query_string: "", remote_ip: {127, 0, 0, 1}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"accept-encoding", "gzip"}, {"authorization", "[REDACTED]"}, {"connection", "upgrade"}, {"content-length", "7050129"}, {"content-type", "multipart/form-data; boundary=dart-http-boundary-DFAQgA1zHApzXy8N3BDWTbqci3X6HCioB9Hsg8lz5ufhIZ0WRT1"}, {"host", "akkoma.0x68756773.moe"}, {"user-agent", "Kaiteki/1.0"}, {"x-forwarded-for", "[REDACTED]"}], request_path: "/api/v1/media", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}], scheme: :http, script_name: [], secret_key_base: nil, state: :unset, status: nil}, []]}} and stacktrace [] ``` ### Severity I cannot use it as easily as I'd like ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
Crafti added the
bug
label 2023-08-29 19:55:02 +00:00

the implication here is that a genserver is unavailable

quite possible the majic one

do you have file/magic installed? are they in the path given to the service? do you have any upload filters enabled?

the implication here is that a genserver is unavailable quite possible the majic one do you have file/magic installed? are they in the path given to the service? do you have any upload filters enabled?
Author

do you have file/magic installed?

what's that?

do you have any upload filters enabled?

Only Exiftool and Dedupe

> do you have file/magic installed? what's that? > do you have any upload filters enabled? Only Exiftool and Dedupe

upload filters rely on certain preinstalled programs to function

diagnostics here should be easy

try disabling exiftool - if uploading works, it's perl-exiftool not installed

if it continues to not work, it's magic/file which I believe is called file-devel on fedora

upload filters rely on certain preinstalled programs to function diagnostics here should be easy try disabling exiftool - if uploading works, it's perl-exiftool not installed if it continues to not work, it's magic/file which I believe is called file-devel on fedora
Author

Unfortunately I think followed all package instructions correctly and all needed packages are already installed.

Package file-5.44-3.fc38.aarch64 is already installed.
Package file-devel-5.44-3.fc38.aarch64 is already installed.
Package perl-Image-ExifTool-12.60-1.fc38.noarch is already installed.

I disabled the Exiftool filter and the issue still persists. file and exiftool are accessible when running sudo -su akkoma.

Unfortunately I think followed all package instructions correctly and all needed packages are already installed. ``` Package file-5.44-3.fc38.aarch64 is already installed. Package file-devel-5.44-3.fc38.aarch64 is already installed. Package perl-Image-ExifTool-12.60-1.fc38.noarch is already installed. ``` I disabled the Exiftool filter and the issue still persists. `file` and `exiftool` are accessible when running `sudo -su akkoma`.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#636
No description provided.