lemmy
lemmy copied to clipboard
HTTP 400 error on inbox delivery of Like activity: "invalid type: map, expected a string representing an URL"
Hi I tried federating a Like
activity from Bridgy Fed to this post on lemmy.ml (running BE 0.16.7) just now, and the AP inbox delivery to https://lemmy.ml/u/OptimusPrime/inbox
returned 400 with invalid type: map, expected a string representing an URL at line 1 column 218
. Bridgy Fed log here. Full AS2 object below.
I don't know that Lemmy supports likes, but the error message sounds unrelated to that, more like maybe it can only handle string URLs for actor
s instead of compound objects, or something similar?
Not urgent, just interop testing. Also tracking in https://github.com/snarfed/bridgy-fed/issues/372.
{
"published": "2023-01-17T13:03:52-08:00",
"content": "likes <a class=\"u-like u-like-of\" href=\"https://lemmy.ml/post/713841\">[lemmy.ml](http://lemmy.ml/)</a>",
"url": "https://fed.brid.gy/r/https://snarfed.org/2023-01-17_lemmy-ml",
"actor": {
"url": "https://fed.brid.gy/r/https://snarfed.org/",
"image": {
"url": "https://secure.gravatar.com/avatar/947b5f3f323da0ef785b6f02d9c265d6?s=96&d=blank&r=g",
"type": "Image"
},
"type": "Person",
"name": "Ryan Barrett",
"icon": {
"url": "https://secure.gravatar.com/avatar/947b5f3f323da0ef785b6f02d9c265d6?s=96&d=blank&r=g",
"type": "Image"
},
"id": "https://fed.brid.gy/snarfed.org",
"preferredUsername": "[snarfed.org](http://snarfed.org/)"
},
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Like",
"object": "https://lemmy.ml/post/713841",
"id": "https://fed.brid.gy/r/https://snarfed.org/2023-01-17_lemmy-ml",
"cc": [
"https://lemmy.ml/u/OptimusPrime",
"https://lemmy.ml/c/privacy",
"https://www.w3.org/ns/activitystreams#Public"
],
"to": [
"https://www.w3.org/ns/activitystreams#Public"
]
}
maybe it can only handle string URLs for
actor
s instead of compound objects, or something similar?
Yup, that's it. Line 1 column 218 of the request body points to the value of the actor
field.
Ooh, was this fixed in 0.19? Looks like lemmy.ml is still on 0.18, but I'm looking forward to testing against a 0.19 instance if so!
Its not fixed, rather this format for actor is not supported. And I dont see why it should be, considering that all major platforms federate actor as a simple id. You can see here for examples.
See https://www.w3.org/TR/activitystreams-vocabulary/#dfn-actor
Both must be supported for full compliance with ActivityPub / ActivityStreams 2.0
I doubt that any of the major existing platforms can claim full compliance with Activitypub. And its not a goal for Lemmy, what matters is that federation works (which it does).
I doubt that any of the major existing platforms can claim full compliance with Activitypub. And its not a goal for Lemmy, what matters is that federation works (which it does).
We'll soon see, given folks are developing an ActivityPub compliance test suite.