Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

My hypothesis on why Lemmy is rejecting valid activities

General Discussion
10 4 48
  • 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:

    1. I make a valid ActivityPub request with the audience of a community (or cc a user).
    2. Lemmy makes an ActivityPub request back at me at /.
    3. My web site does not handle ActivityPub at /, and responds with a text/plain error message. This is default behavior in Drupal.
    4. 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.

  • 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:

    1. I make a valid ActivityPub request with the audience of a community (or cc a user).
    2. Lemmy makes an ActivityPub request back at me at /.
    3. My web site does not handle ActivityPub at /, and responds with a text/plain error message. This is default behavior in Drupal.
    4. 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.

    @mradcliffe

    >Mitra returns a 200 response in text/html.

    But it federates with Lemmy

    >data did not match any variant of untagged enum AnnouncableActivities

    Did you wrap your activity in Announce?

  • @mradcliffe

    >Mitra returns a 200 response in text/html.

    But it federates with Lemmy

    >data did not match any variant of untagged enum AnnouncableActivities

    Did you wrap your activity in Announce?

    @silverpill

    >Mitra returns a 200 response in text/html.

    But it federates with Lemmy

    My hypothesis is it's the text/plain is the problem, and that everyone else is doing something acceptable.

    Did you wrap your activity in Announce?

    Is that necessary? I could not find that in the Federation documentation. I know that Lemmy sends Announces out when it forwards activities, but to me when the documentation states

    When a user creates a new post, it is sent to the respective community as Create/Page. Editing a previously created post sends an almost identical activity, except the type being Update.

    A reply to a post, or to another comment as Create/Note

    that means I should do similarly, right?

  • 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:

    1. I make a valid ActivityPub request with the audience of a community (or cc a user).
    2. Lemmy makes an ActivityPub request back at me at /.
    3. My web site does not handle ActivityPub at /, and responds with a text/plain error message. This is default behavior in Drupal.
    4. 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.

    If I do need to wrap it an Announce, then I think I will need to do the following based on how it works on my end.

    1. Create my post as normal, but don’t address it to the community initially.
    2. Announce my own post making sure I address it to the community.

    I guess that might show up as me boosting my own post on some instances (tooting my own horn? Horning my own toot?), which I would feel ashamed of.

     

  • If I do need to wrap it an Announce, then I think I will need to do the following based on how it works on my end.

    1. Create my post as normal, but don’t address it to the community initially.
    2. Announce my own post making sure I address it to the community.

    I guess that might show up as me boosting my own post on some instances (tooting my own horn? Horning my own toot?), which I would feel ashamed of.

     

    mradcliffe@nokoto.org no, Lemmy doesn't check the root for an Application actor (and as you discovered, NodeBB doesn't send one either, and we federate with Lemmy fine.)

    Can you share a sample Create you're sending Lemmy? You should only need to have the group actor ID in to or cc, and probably as:Public somewhere in there too.

  • If I do need to wrap it an Announce, then I think I will need to do the following based on how it works on my end.

    1. Create my post as normal, but don’t address it to the community initially.
    2. Announce my own post making sure I address it to the community.

    I guess that might show up as me boosting my own post on some instances (tooting my own horn? Horning my own toot?), which I would feel ashamed of.

     

    @mradcliffe

    >Is that necessary? I could not find that in the Federation documentation.

    The error message says that server expects an Announce activity. But yes, group's inbox should also accept replies wrapped in Create, as well as Likes.

  • @mradcliffe

    >Is that necessary? I could not find that in the Federation documentation.

    The error message says that server expects an Announce activity. But yes, group's inbox should also accept replies wrapped in Create, as well as Likes.

    silverpill@mitra.social the group's inbox should, if the post is in local category, but what if it's a post in a remote category? It doesn't ever make it over to the remote server...

  • 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:

    1. I make a valid ActivityPub request with the audience of a community (or cc a user).
    2. Lemmy makes an ActivityPub request back at me at /.
    3. My web site does not handle ActivityPub at /, and responds with a text/plain error message. This is default behavior in Drupal.
    4. 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.

    Hi, I had a look at the activities sent from your account. Looks like the only problem is that you are missing a @context field. After adding that it parses just fine. What you serve from / is irrelevant, that one is completely optional.

  • Hi, I had a look at the activities sent from your account. Looks like the only problem is that you are missing a @context field. After adding that it parses just fine. What you serve from / is irrelevant, that one is completely optional.

    nutomic oh that's interesting, does Lemmy do JSON-LD validation? I didn't think it would.

  • 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:

    1. I make a valid ActivityPub request with the audience of a community (or cc a user).
    2. Lemmy makes an ActivityPub request back at me at /.
    3. My web site does not handle ActivityPub at /, and responds with a text/plain error message. This is default behavior in Drupal.
    4. 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.

    Actually I was wrong, there is a context so thats fine. The problem is that audience should be a simple string but you are sending an error, thats why it fails. Anyway that field is optional, so you can leave it out and put the community in to or cc instead.

    julian No but still the field is mandatory (mainly because that hasnt caused any problems so far).


Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • 0 Votes
    1 Posts
    10 Views
    Does anyone else have this issue with their Ghost 6.9.0 blog? I can write posts, I can follow other people, but the explore tab is completely empty. No matter if I try to use "top" or any other topic. I always get a "404". ActivityPub initialization seems to be fine though.What am I missing? (yes, the domain name is redacted)#ghost #activitypub #blogging
  • 0 Votes
    1 Posts
    10 Views
    Sind Sie Administrator einer Mastodon-Instanz?⚠️ Aktualisieren Sie jetzt auf Version 4.5! ⚠️Ältere Versionen von Mastodon enthalten bekannte Sicherheitslücken. Außerdem können veraltete Instanzen bestimmte Arten von Inhalten (z. B. Zitate), die in der neuesten Version eingeführt wurden, möglicherweise nicht richtig anzeigen oder übermitteln.Um die Sicherheit, Kompatibilität und Benutzerfreundlichkeit für Ihre Nutzer zu gewährleisten, sollten Sie Ihre Mastodon-Instanz so bald wie möglich auf Version 4.5 aktualisieren.#Mastodon #Fediverse #ActivityPub #Fedi #FediAdmin #Administrator #Admin #MastoAdmin
  • 0 Votes
    1 Posts
    13 Views
    First 100: BadgeFed Explorer The verified Badge was issued to @lqdev You ventured into uncharted territory and helped shape the BadgeFed project from the start. As one of the first 100 testers, your curiosity, feedback, and bug-finding instincts helped stabilize the platform. The fediverse will always remember your role in getting us off the ground—one crash, typo, and glorious bug report at a time. Earning Criteria: Awarded to the first 100 individuals who actively participated in the early testing phase of BadgeFed. This includes exploring the platform, submitting feedback or bug reports, and generally poking around where things probably weren’t ready yet. These badges are limited—no retroactive claims, no reruns, no exceptions. You were here. You mattered.. Issued on: 04/11/2025 17:57:58 Accepted On: 05/06/2025 01:35:26 Verify the Badge here. #badgefed #fediverse #activitypub #mastodon #IssuedByBadgeFed #_BadgeDrop
  • 0 Votes
    1 Posts
    18 Views
    I'm now on Loops as user spaceotter@loops.video The new app for this social media site is slated for release some time this week, maybe Halloween 🎃, or possibly in November. #loops #spaceotter #activitypub