Unhandled Activity error on Note with Attachment
Environment
- Installation type (OTP or From Source): From Source
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): 2.4.2
- Elixir version (
elixir -v
for from source installations, N/A for OTP): Elixir 1.9.1 - Operating system: Ubuntu 20.04.4 LTS
- PostgreSQL version (
psql -V
): psql (PostgreSQL) 14.2 (Ubuntu 14.2-1.pgdg20.04+1+b1)
Bug description
I have an Owncast instance set up, which will send out notifications to followers (as Create activities with a Note).
I noticed that the notifications will work fine in other ActivityPub implementations, but with Pleroma I receive an "Unhandled Activity" error.
The Pleroma installation was set up with these instructions: https://docs-develop.pleroma.social/backend/installation/debian_based_en/ and is using the stock configuration.
I did notice that in Owncast, if I modify the source to not include an attachment, the activity shows up in follower's timelines. The only striking thing I notice about the Owncast-generated attachment and others - the attachment is a JSON object, but most fediverse things seem to use an array of objects. From reading the specs, I believe this is fine.
So for reference, here's the JSON from an activity that generated the "Unhandled Activity" message - posted to the user's inbox:
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"http://joinmastodon.org/ns"
],
"actor": "https://owncast.localhost.localdomain/federation/user/streamer",
"audience": "https://www.w3.org/ns/activitystreams#Public",
"id": "https://owncast.localhost.localdomain/federation/KCfHuqU7Rz",
"object": {
"attachment": {
"content": "Live stream preview",
"type": "Image",
"url": "https://owncast.localhost.localdomain/preview.gif?us=KjfNX387gm"
},
"attributedTo": "https://owncast.localhost.localdomain/federation/user/streamer",
"audience": "https://www.w3.org/ns/activitystreams#Public",
"content": "<p>I've gone live!</p><p></p><p><a class=\"hashtag\" href=\"https://directory.owncast.online/tags/owncast\">#owncast</a> <a class=\"hashtag\" href=\"https://directory.owncast.online/tags/streaming\">#streaming</a></p><a href=\"https://owncast.localhost.localdomain\">https://owncast.localhost.localdomain</a>",
"id": "https://owncast.localhost.localdomain/federation/KjBNuq8ng",
"published": "2022-04-17T15:42:03Z",
"tag": [
{
"href": "https://directory.owncast.online/tags/owncast",
"name": "#owncast",
"type": "Hashtag"
},
{
"href": "https://directory.owncast.online/tags/streaming",
"name": "#streaming",
"type": "Hashtag"
},
{
"href": "https://directory.owncast.online/tags/owncast",
"name": "#owncast",
"type": "Hashtag"
}
],
"to": "https://www.w3.org/ns/activitystreams#Public",
"type": "Note"
},
"to": "https://www.w3.org/ns/activitystreams#Public",
"type": "Create"
}
Whereas this JSON works correctly (same as above, just with the attachment
property removed:
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"http://joinmastodon.org/ns"
],
"actor": "https://owncast.localhost.localdomain/federation/user/streamer",
"audience": "https://www.w3.org/ns/activitystreams#Public",
"id": "https://owncast.localhost.localdomain/federation/h7S-lqU7gz",
"object": {
"attributedTo": "https://owncast.localhost.localdomain/federation/user/streamer",
"audience": "https://www.w3.org/ns/activitystreams#Public",
"content": "<p>I've gone live!</p><p></p><p><a class=\"hashtag\" href=\"https://directory.owncast.online/tags/owncast\">#owncast</a> <a class=\"hashtag\" href=\"https://directory.owncast.online/tags/streaming\">#streaming</a></p><a href=\"https://owncast.localhost.localdomain\">https://owncast.localhost.localdomain</a>",
"id": "https://owncast.localhost.localdomain/federation/2nI-lqUnR",
"published": "2022-04-17T15:30:21Z",
"tag": [
{
"href": "https://directory.owncast.online/tags/owncast",
"name": "#owncast",
"type": "Hashtag"
},
{
"href": "https://directory.owncast.online/tags/streaming",
"name": "#streaming",
"type": "Hashtag"
},
{
"href": "https://directory.owncast.online/tags/owncast",
"name": "#owncast",
"type": "Hashtag"
}
],
"to": "https://www.w3.org/ns/activitystreams#Public",
"type": "Note"
},
"to": "https://www.w3.org/ns/activitystreams#Public",
"type": "Create"
}