Closed fauno closed 1 year ago
Test site is https://probandoactivitypub200.sutty.nl/
Mind posting an example Activity that you're sending out as a notification? I'm guessing it might be something to do with the followers verification
This is an example, it's sent as-is to the Social Inbox: https://probandoactivitypub200.sutty.nl/2023/09/04/et-qui-et-nihil/create/1693842359.jsonld
I've installed a Pleroma instance and it's returning a 500 error to the Social Inbox notification because the follow request was never approved. I can't find the website on the Following list.
I can see there's a call back from DPress to Pleroma immediately after the follow request sent from Pleroma, but can't tell what it contains/does.
By querying followers I can find the follower from Pleroma:
curl --silent https://social.dp.chanterelle.xyz/v1/@probandoactivitypub200@probandoactivitypub200.sutty.nl/followers | jq .
I can see there's a call back from DPress to Pleroma immediately after the follow request sent from Pleroma, but can't tell what it contains/does.
Got this from Pleroma's debug log, I think the localhost:7625 on the Accept activity ID is the reason why the activity is failing:
02:19:16.585 request_id=F4J8XtTuAuiDTjYAAAyR [debug] POST /users/fauno/inbox 02:19:16.586 request_id=F4J8XtTuAuiDTjYAAAyR [debug] Processing with Pleroma.Web.ActivityPub.ActivityPubController.inbox/2 Parameters: %{"@context" => "https://www.w3.org/ns/activitystreams", "actor" => "https://probandoactivitypub200.sutty.nl/about.jsonld", "id" => "http://localhost:7625/v1/@probandoactivitypub200@probandoactivitypub200.sutty.nl/outbox/5-BfS0CAwYBCfGWTbt_JU", "nickname" =>
"fauno", "object" => %{"@context" => ["https://www.w3.org/ns/activitystreams", "https://pleroma.sutty.nl/schemas/litepub-0.1.jsonld", %
{"@language" => "und"}], "actor" => "https://pleroma.sutty.nl/users/fauno", "bcc" => [], "bto" => [], "cc" => [], "id" => "https://pleroma.sutty.nl/activities/fb9dbed3-b095-46f8-94fb-89a30c0cc6da", "object" => "https://probandoactivitypub200.sutty.nl/about.jsonld", "state" => "pending", "to" => ["https://probandoactivitypub200.sutty.nl/about.jsonld"], "type" => "Follow"}, "to" => "https://pleroma.sutty.nl/users/fauno", "type" => "Accept"}
[snip]
02:19:16.613 [debug] Origin containment failure for http://localhost:7625/v1/@probandoactivitypub200@probandoactivitypub200.sutty.nl/out
box/5-BfS0CAwYBCfGWTbt_JU
I think the issue is how publicURL is being constructed at index.ts
const port = Number(argv.port ?? process.env.PORT ?? '8080')
const host = argv.host ?? process.env.HOST ?? 'localhost'
const storage = argv.storage ?? paths.data
const publicURL = `http://${host}:${port}`
I hardcoded it to social.dp.chanterelle.xyz and it worked, but still got an error during the callback
02:27:26.078 [debug] Origin containment failure for https://social.dp.chanterelle.xyz/v1/@probandoactivitypub200@probandoactivitypub200.sutty.nl/outbox/qZyUBD9jqMG-cN0nfbVZV
By looking at Pleroma's code I think it's validating that the origin of the action is the same as the actor, and since the actor is at Sutty but the action comes from DPress, it fails:
https://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/web/federator.ex#L85
https://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/object/containment.ex#L67
That would mean that sites need to reverse proxy DPress to actually work?
Sorry I'm doing this on Pleroma when the issue is for Mastodon, but it was simpler to install a debug instance and I wanted to discard it was a federation issue. I can start another issue is they end up unrelated.
Debugging this, looks like activities are being rejected but not sure why
Looks like it was due to us putting the URL to the Note
instead of inlining it into the Activity when we send it to mastodon users' inbox.
Inlining the Note fixed the error when we were testing
Tested and inlining the note into the activity worked!
Related to #8
We are sending notifications to the Social Inbox, but followers on Mastodon are not getting them on the local feed, and visiting the profile doesn't show them either. They do appear on our test Ktistec instance though.