[bug] Internal server error in logs since 3.13.3 release #858
Labels
No labels
approved, awaiting change
bug
cannot reproduce
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs change/feedback
needs docs
needs tests
not a bug
not our bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AkkomaGang/akkoma#858
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Your setup
From source
Extra details
Gentoo
Version
stable (3.13.3)
PostgreSQL version
15
What were you trying to do?
Nothing - just reviewing logs and noticed the errors, so I'll skip ahead to the log entries.
What did you expect to happen?
No response
What actually happened?
When speaking to Oneric in #akkoma about this, he recommended posting at least the log lines that I've pasted in here, and he thought there were two new bugs here.
Logs
Severity
I can manage
Have you searched for this issue?
I think this issue is more serious because its affecting the interconnection with Activity-Relay, where Akkoma instances can't follow or remove relay’s actors.
This bug is reproducible in 3.13.3, akkoma stable 2025.01 (3.14.0) and Hotfix 3.14.1. both my friend's and my instance have this issue.
Possible problematic sql commands:
SELECT s0. “user_id”, s0. “public_key”, s0. “private_key”, s0. “key_id”, s0. “inserted_at”, s0. “updated_at”, s0. “user_id” FROM ” signing_keys” AS s0 WHERE (s0. ‘user_id’ = $1)corresponds to{:ok, Repo.get_by(__MODULE__, user_id: user_id)}Relevant link: https://meta.akkoma.dev/t/internal-server-error-ecto-multipleresultserror/810
I'm also encountering this error
In my case this happened because a user seems to switch keys, which results in 2 results;
this happens with gup.pe, where the key sent via HTTP signature is not (exactly) the same as the key in the database, and instead it creates two entries; one by fetching the entity (with
#main-key), and one when it receives the key via http signature (without#main-key)Edit: I've since created an issue highlighting this; https://github.com/immers-space/guppe/issues/113
I fixed this with the following patch;
Honestly, the expectation that there's only one user to signing key is not proper form here, since there's no
UNIQUEindex onsigning_keyforuser -> key_id, and there's this following comment;It seems this was fixed with
cc5c1bb10cand surrounding commits?Unsure if there was also a PR attached, but that commit should fix this issue.
Federation with Activity-Relay still seems broken
This should be fixed now with 3.15.0
@Oneric wrote in #858 (comment):
I tried with the 3.15.1 but it's not fixed for relays:
I searched the instance list provided by the relay and I couldn't find my instance.
and the relays doesn't display "Followed back" as ✅ in admin-fe.
If you don't see a "500 internal server error" and "MultipleResults" exception in your logs, the original bug is fixed.
The logs you’re showing are something completely different; please do not hijack existing issues with unrelated problems, but create a new issue.
Regardless: your logs indicate that the relay actor is not using the same key id in it’s actor representation and its signatures. Specifically the ID used in its signatures is it’s actor rather than key ID. This is a bug of the relay; Bookwyrm had a similar bug a while ago which broke its federation with e.g. GTS.
The relay URls you’re showing here don't look like akkoma relay actor URLs so this is not our bug, contact whoever develops the relay. (And if you want to write anything further about this, create a new issue)
fixed in 3.15.0