I have not been able to successfully post to a Lemmy instance either as a post or a comment. A cryptic error message is returned where the error is unknown and the message is a generic message:
{"error":"unknown","message":"data did not match any variant of untagged enum AnnouncableActivities"}From my logs, it seems this is happening:
- I make a valid ActivityPub request with the audience of a community (or cc a user).
- Lemmy makes an ActivityPub request back at me at
/. - My web site does not handle ActivityPub at
/, and responds with atext/plainerror message. This is default behavior in Drupal. - Lemmy rejects my request with a 400 response with the error message above.
I tested other instances by making the following get request to the root of each instance (thank you, Daniel Sternberg for maintaining curl):
curl -v -H "Accept: application/activity+json" -H "Content-Type: application/activity+json" <url>- With the following results
- Lemmy returns an Application Actor.
- Misskey returns a 200 response in
text/html. - Mastodon returns a 406 response in
application/json. - NodeBB returns
text/html. - GoToSocial returns a 406 response in
application/json. - Mitra returns a 200 response in
text/html. - Pixelfed returns a 200 response in
text/html. - Peertube returns an empty 406 response.
My hypothesis is that Lemmy is rejecting the request because I return text/plain and/or it cannot handle a response with that content type.
To test that I am working on changing the default behavior. I will need to dynamically add a route based on system.site.page.front and return a 406 response in JSON. This is simple enough. If my hypothesis is correct, I can also make a merge request into drupal/activitypub module, which would have the same problem. If not, then I’ll need to go digging further.



