Salta al contenuto
Citiverse è uno spazio aperto a tutte le comunità. Se vuoi aprire un gruppo locale o una sezione per la tua organizzazione, puoi contattare gli amministratori: pagina dei contatti.

My hypothesis on why Lemmy is rejecting valid activities

General Discussion
4 2 23
  • scritto su ultima modifica di
    #1

    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.

    scritto su ultima modifica di
    #2

    @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?

    scritto su ultima modifica di
    #3

    @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

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

    scritto su ultima modifica di
    #4

    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.

     

  • 14 Votazioni
    11 Post
    8 Visualizzazioni
    sk@utsukta.orgS
    oh thats are pomodoro timer. a countdown timer widget also exists that the user can place where they want. the layout is editable by the user. Currently they dont do anything on expiry but your idea is interesting, a countdown timer that makes you take a break from being online
  • 0 Votazioni
    1 Post
    8 Visualizzazioni
    Nessuno ha risposto
  • 0 Votazioni
    1 Post
    12 Visualizzazioni
    Nessuno ha risposto
  • 1 Votazioni
    23 Post
    68 Visualizzazioni
    julian@activitypub.spaceJ
    @michalbryxi@mastodon.world adversarial APIs! I love to see it.
  • 0 Votazioni
    1 Post
    268 Visualizzazioni
    Nessuno ha risposto
  • Happy sunday!

    General Discussion thefedibookproject activitypub fedibook
    2
    1 Votazioni
    2 Post
    32 Visualizzazioni
    stefan@stefanbohacek.onlineS
    @sindum Very nice to see the progress!
  • 0 Votazioni
    5 Post
    32 Visualizzazioni
    julian@activitypub.spaceJ
    @evan@cosocial.ca trick question it can be both, as I discovered
  • 1 Votazioni
    3 Post
    204 Visualizzazioni
    macfrancM
    @team@blog.purewebhosting.nz @gwilymgj@mastodon.social Standardising Public Information Publishing I think you should discuss this with the @swf@socialwebfoundation.org group. The issue of standardization is one of the most delicate in the relationship between the fediverse and the mastosphere, and will likely be resolved in different ways based on the so-called "doocracy." It will be important for it to adhere as closely as possible to W3C standards and be conceived in simple terms. Some platforms like Friendica have already solved the formatting of georeferencing and event data. (cc @heluecht@pirati.ca is right?) Should an entity run it’s own presence much like they run their own website or email? It depends a lot on the type of organization. A nonprofit organization could simply choose to be hosted by a federated social network in its own country. A public institution could do the same, but first consider opening a proprietary instance, since, depending on the institution's importance, the traffic flow could become problematic. A private company, on the other hand, has the obligation to create its own instance. If I were to manage an organization's faith migration, I would make these assessments by evaluating the TOSs of the instances in my country and, if I found one suitable, I would agree on my inclusion in advance with the instance administrators. I also remember that careful management of a federated WordPress or Ghost server is already an interesting solution, just as a federated NodeBB forum allows you to wonderfully control the moderation of your audience of interested users. Possible disadvantages Here we must be realistic: using commercial social media for your organization's communication is NEVER perceived as a problem! It will be difficult to obtain the exact costs of managing a social media account, and the employees (or vendors) who manage an organization's social media account are resistant to change. My advice is to find out in advance whether the organization already uses automated publishing systems, whether these systems include at least the Mastodon API, and whether these systems include engagement measurement systems; If they don't use automatic publishing, you can find a system that helps them manage everything more easily. I may be unpopular, but an organization shouldn't be forced to do without commercial social media! Any organization's social media strategy should have three ethical obligations: Maintain a presence on the most popular commercial social media platforms that are consistent with its audience, to ensure maximum reach. Maintain a presence on an open-source social network that allows users to follow the organization and interact with it without being tracked, profiled, or having their data transferred to problematic countries, because this is a guarantee for its customers/users. Prioritize communication on the open social network, publishing content on the federated account earlier and more carefully, and possibly attempting to move communication to the federated account.

Citiverse è un progetto che si basa su NodeBB ed è federato! | Categorie federate | Chat | 📱 Installa web app o APK | 🧡 Donazioni | Privacy Policy

Il server utilizzato è quello di Webdock, in Danimarca. Se volete provarlo potete ottenere il 20% di sconto con questo link e noi riceveremo un aiuto sotto forma di credito da usare proprio per mantenere Citiverse.