[bug] Cannot import emojis from manifest #840

Closed
opened 2024-10-18 12:55:47 +00:00 by tudbut · 4 comments
Contributor

Your setup

From source

Extra details

No response

Version

f101886709

PostgreSQL version

16.3

What were you trying to do?

Import emojis using mix pleroma.emoji get-packs neocat -m https://volpeon.ink/emojis/neocat/manifest.json

What did you expect to happen?

The command to complete correctly.

What actually happened?

The command crashes.

Logs

```
14:36:16.700 [debug] Outbound: get https://volpeon.ink/emojis/neocat/neocat.json
Unpacking neocat
** (MatchError) no match of right hand side value: {:error, {:EXIT, {:badarg, [{:erlang, :++, ["/opt/akkoma/instance/static/emoji/neocat/neocat_0_0_256.png", []], [error_info: %{module: :erl_erts_errors}]}, {:zip, :check_valid_location, 2, [file: ~c"zip.erl", line: 2332]}, {:zip, :get_z_file, 11, [file: ~c"zip.erl", line: 2264]}, {:zip, :get_z_files, 5, [file: ~c"zip.erl", line: 2225]}, {:zip, :do_unzip, 2, [file: ~c"zip.erl", line: 425]}, {:zip, :unzip, 2, [file: ~c"zip.erl", line: 410]}, {Mix.Tasks.Pleroma.Emoji, :"-run/1-fun-3-", 3, [file: ~c"lib/mix/tasks/pleroma/emoji.ex", line: 116]}, {Enum, :"-map/2-lists^map/1-1-", 2, [file: ~c"lib/enum.ex", line: 1703]}]}}}
    (pleroma 3.13.2-631-gf1018867-develop) lib/mix/tasks/pleroma/emoji.ex:115: anonymous fn/3 in Mix.Tasks.Pleroma.Emoji.run/1
    (elixir 1.17.3) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
    (mix 1.17.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.17.3) lib/mix/cli.ex:96: Mix.CLI.run_task/2
    /usr/bin/mix:2: (file)
```

Severity

I cannot use the software

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup From source ### Extra details _No response_ ### Version f1018867097e6f293d8b2b5b6935f0a7ebf99bd0 ### PostgreSQL version 16.3 ### What were you trying to do? Import emojis using `mix pleroma.emoji get-packs neocat -m https://volpeon.ink/emojis/neocat/manifest.json` ### What did you expect to happen? The command to complete correctly. ### What actually happened? The command crashes. ### Logs ````shell ``` 14:36:16.700 [debug] Outbound: get https://volpeon.ink/emojis/neocat/neocat.json Unpacking neocat ** (MatchError) no match of right hand side value: {:error, {:EXIT, {:badarg, [{:erlang, :++, ["/opt/akkoma/instance/static/emoji/neocat/neocat_0_0_256.png", []], [error_info: %{module: :erl_erts_errors}]}, {:zip, :check_valid_location, 2, [file: ~c"zip.erl", line: 2332]}, {:zip, :get_z_file, 11, [file: ~c"zip.erl", line: 2264]}, {:zip, :get_z_files, 5, [file: ~c"zip.erl", line: 2225]}, {:zip, :do_unzip, 2, [file: ~c"zip.erl", line: 425]}, {:zip, :unzip, 2, [file: ~c"zip.erl", line: 410]}, {Mix.Tasks.Pleroma.Emoji, :"-run/1-fun-3-", 3, [file: ~c"lib/mix/tasks/pleroma/emoji.ex", line: 116]}, {Enum, :"-map/2-lists^map/1-1-", 2, [file: ~c"lib/enum.ex", line: 1703]}]}}} (pleroma 3.13.2-631-gf1018867-develop) lib/mix/tasks/pleroma/emoji.ex:115: anonymous fn/3 in Mix.Tasks.Pleroma.Emoji.run/1 (elixir 1.17.3) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2 (mix 1.17.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5 (mix 1.17.3) lib/mix/cli.ex:96: Mix.CLI.run_task/2 /usr/bin/mix:2: (file) ``` ```` ### Severity I cannot use the software ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
tudbut added the
bug
label 2024-10-18 12:55:47 +00:00
Author
Contributor

I have also found the cause of this. It is due to passing the wrong string type as CWD.

Fix PR incoming.

I have also found the cause of this. It is due to passing the wrong string type as CWD. Fix PR incoming.
Member

What elixir and erlang/OTP version are you using?

Current OTP docs really document CWD = file:filename() with filename being a string() = [char()], but nevertheless even the current version works fine for me with elixir 1.17 and OTP 26.

I also can’t reproduce your frontend installer issue

What elixir and erlang/OTP version are you using? Current OTP docs really document `CWD = file:filename()` with `filename` being a `string() = [char()]`, but nevertheless even the current version works fine for me with elixir 1.17 and OTP 26. I also can’t reproduce your frontend installer issue

yep we've confirmed that OTP27 is to blame here

weh

i will test the fixes on lower OTPs i guess?

yep we've confirmed that OTP27 is to blame here weh i will test the fixes on lower OTPs i guess?
Author
Contributor

BTW theres also other broken things with emojis I cant import from other instances, only the first page actually gets downloaded.

BTW theres also other broken things with emojis I cant import from other instances, only the first page actually gets downloaded.
Sign in to join this conversation.
No milestone
No project
No assignees
3 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#840
No description provided.