LemmyNet/lemmy

[Bug]: Communities with broken outboxes

freamon opened this issue · 2 comments

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Do you agree to follow the rules in our Code of Conduct?
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

Some communities that should have entries in their outbox instead return:

{
  "error": "unknown",
  "message": "Record not found"
}

Steps to Reproduce

  1. curl --header 'accept: application/activity+json' --location https://lemmy.ml/c/lemmy/outbox | jq .
  2. curl --header 'accept: application/activity+json' --location https://lemmy.ca/c/nostalgia/outbox | jq .
  3. curl --header 'accept: application/activity+json' --location https://real.lemmy.fan/c/weirdnews/outbox | jq .

Technical Details

For comparison, to see a community return the expected result:
curl --header 'accept: application/activity+json' --location https://lemmy.ml/c/memes/outbox | jq . | head

A while ago, I noticed that lemmy.world/c/memes was affected by this. I informed the admins, but never heard back. When I checked again recently, it was working again. So, if the admins didn't do anything, one possibility is that there's a bad post causing the error, and it fixes itself when that post rotates out of the outbox (I'm just guessing, though)

Since lemmy.ml hosts one of the affected communities, hopefully it's something where you'll be able to be see both sides of the transaction.

Version

0.19.3

Lemmy Instance URL

No response

Verified.

The only thing I can think, is that it might have to do with a person who deleted their account : https://github.com/LemmyNet/lemmy/blob/main/crates/apub/src/collections/community_outbox.rs#L53

@Nutomic It'd probably be better to use PostView:: there anyway, then you wouldn't have to loop over the posts and fetch the person. That's potentially saving 50 DB calls.

@dessalines Yes that makes sense.