Found a bug? Please fill out the sections below. 👍

For front end issues, use lemmy-ui

Issue Summary

Posting a NEW posting from friendica in a lemmy-community fails

I think, it’s similar to the friendica-federation bug a few weeks ago for commenting. The error-message seems the same.

Steps to Reproduce

  1. Join to a community on lemmy from friendica
  2. Create a new posting

Technical details

lemmy_1     | 2022-03-22T10:21:37.202728Z  INFO HTTP request{http.method=POST http.scheme="http" http.host=lemmy.schuerz.at http.target=/inbox otel.kind="server" request_id=492c3682-a6f0-4911-b86c-a93380c31f45}:shared_inbox: lemmy_apub::http: Received shared inbox activity {"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1",{"vcard":"http://www.w3.org/2006/vcard/ns#","dfrn":"http://purl.org/macgirvin/dfrn/1.0/","diaspora":"https://diasporafoundation.org/ns/","litepub":"http://litepub.social/ns#","toot":"http://joinmastodon.org/ns#","schema":"http://schema.org#","manuallyApprovesFollowers":"as:manuallyApprovesFollowers","sensitive":"as:sensitive","Hashtag":"as:Hashtag","directMessage":"litepub:directMessage","discoverable":"toot:discoverable","PropertyValue":"schema:PropertyValue","value":"schema:value"}],"id":"https://soc.schuerz.at/objects/4edd2508-2662-39a3-305d-8ca330868827/Create","type":"Create","actor":"https://soc.schuerz.at/profile/jakob","published":"2022-03-22T10:21:36Z","instrument":{"type":"Service","name":"Friendica 'Siberian Iris' 2022.05-dev-1452","url":"https://soc.schuerz.at"},"to":["https://lemmy.schuerz.at/c/test"],"cc":["https://www.w3.org/ns/activitystreams#Public","https://lemmy.schuerz.at/c/test/followers"],"object":{"id":"https://soc.schuerz.at/objects/4edd2508-2662-39a3-305d-8ca330868827","type":"Article","summary":"","inReplyTo":null,"diaspora:guid":"4edd2508-2662-39a3-305d-8ca330868827","published":"2022-03-22T10:21:36Z","url":"https://soc.schuerz.at/display/4edd2508-2662-39a3-305d-8ca330868827","attributedTo":"https://soc.schuerz.at/profile/jakob","sensitive":false,"context":"https://soc.schuerz.at/objects/4edd2508-2662-39a3-305d-8ca330868827#context","name":"Test from friendica","content":"<span class=\"h-card\"><a href=\"https://lemmy.schuerz.at/c/test\" class=\"u-url mention\">!<span>test</span></a></span><br><br>Test from friendica","contentMap":{"de":"<bdi>!<a href=\"https://lemmy.schuerz.at/c/test\" class=\"userinfo mention\" title=\"test\">test</a></bdi><br><br>Test from friendica"},"source":{"content":"![url=https://lemmy.schuerz.at/c/test]This is a Testcommunity[/url]\n\nTest from friendica","mediaType":"text/bbcode"},"attachment":[],"tag":[{"type":"Mention","href":"https://lemmy.schuerz.at/c/test","name":"@test@lemmy.schuerz.at"}],"to":["https://lemmy.schuerz.at/c/test"],"cc":["https://www.w3.org/ns/activitystreams#Public","https://lemmy.schuerz.at/c/test/followers"]},"signature":{"type":"RsaSignature2017","nonce":"b2cffb52849d97fa34217eec0ad18dee67e4725a7864d9cff408026672cb8636","creator":"https://soc.schuerz.at/profile/jakob#main-key","created":"2022-03-22T10:21:37Z","signatureValue":"CJaHnbhQGby60BEwB40+1R3lknAz6LtUTMiEXs+T8DTPHElKr0FkAW3KmfqQlhge5Q2eQb0n55cZUjFs+pR4RyOpvGvZelz2MXCidZUbrKLKuA5qrIP+134f6qZT2YlcLxxpvvesHCtMfzk7bt3sOqWllN2YgS2aCGYiz2oEvseeRVEod4wtrlYCSg/lPZIHLd3CFCglVAuM7OvV8gI0w+JyMsQ9x9z8OdNyPJ0r4FmktW1jbNv4U+9rWMrO3fi3wXTMuenhe2QaO5d0AJGdugXuLP1IE8ln2HEWlGeK6EVlxZvMwuaFPLNKf0vQEtB9RGvjpAa2C+GD6xaevQsG0P0Ui3Evdzvp4OHzuJ/y3Z/Wl64Y5wfYgsRu4AqcmRgtWLzP30G0DjZl+1lfxcUNARX265HtlD+CLFvJk3tu3YJJ4OaAdDQ8BV2HQuaXhf+VcV/HsjM7c32eTGlEbgfO+PNNdr4JF1GLIl518UnJNv8GearKJWhNLfCDmB5SBbq8TNm41Glc6dgIfBdCo94XrGdh8nM+n0H/qU9oMF+ru/lsO8NlzPzct3LbqUKxANhLaGaDKu7346D14/ipROH7VEckL6bOE8fFNQOIhDaDN8uik7zHrIkeo71qmGjCqujC9MpizyEtnHCsvtxTNUsqZylSGzdoRH8X7MaSWOyp+t8="}}
lemmy_1     | 2022-03-22T10:21:37.204832Z  WARN Error encountered while processing the incoming HTTP request: lemmy_server::root_span_builder: data did not match any variant of untagged enum SharedInboxActivities at line 1 column 3117
lemmy_1     |    0: lemmy_apub::http::shared_inbox
lemmy_1     |              at crates/apub/src/http/mod.rs:41
lemmy_1     |    1: lemmy_server::root_span_builder::HTTP request
lemmy_1     |            with http.method=POST http.scheme="http" http.host=lemmy.schuerz.at http.target=/inbox otel.kind="server" request_id=492c3682-a6f0-4911-b86c-a93380c31f45 http.status_code=400 otel.status_code="OK"
lemmy_1     |              at src/root_span_builder.rs:16
lemmy_1     |    2: tokio::task::runtime.spawn
lemmy_1     |            with kind=local task.name= loc.file="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/task/local.rs" loc.line=302 loc.col=22
lemmy_1     |              at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/util/trace.rs:16
lemmy_1     |    3: tokio::task::runtime.spawn
lemmy_1     |            with kind=local task.name= loc.file="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/task/local.rs" loc.line=302 loc.col=22
lemmy_1     |              at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/util/trace.rs:16
lemmy_1     |    4: tokio::task::runtime.spawn
lemmy_1     |            with kind=local task.name= loc.file="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/task/local.rs" loc.line=302 loc.col=22
lemmy_1     |              at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/util/trace.rs:16
lemmy_1     |    5: tokio::task::runtime.spawn
lemmy_1     |            with kind=local task.name= loc.file="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/task/local.rs" loc.line=302 loc.col=22
lemmy_1     |              at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/util/trace.rs:16
lemmy_1     |    6: tokio::task::runtime.spawn
lemmy_1     |            with kind=block_on task.name= loc.file="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/task/local.rs" loc.line=466 loc.col=12
lemmy_1     |              at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/util/trace.rs:16
lemmy_1     | LemmyError { message: None, inner: data did not match any variant of untagged enum SharedInboxActivities at line 1 column 3117, context: "SpanTrace" }

Originally posted by xundeenergie in #2144

  • issue_tracking_bot@lemm.eeOPB
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    This activity creates an Article, which is not supported by Lemmy (we use Page for posts). We could add support for receiving this though, but first i would like to be sure that its the best solution. Is there any other way to make a post in Friendica which could result in a Page? Or some documentation which lists the objects used by Friendica? If you dont know, it woud be good to talk to a Friendica dev about this.

    For reference, here is the activity properly formatted:

    {
    	"@context": [
    		"https://www.w3.org/ns/activitystreams",
    		"https://w3id.org/security/v1",
    		{
    			"vcard": "http://www.w3.org/2006/vcard/ns#",
    			"dfrn": "http://purl.org/macgirvin/dfrn/1.0/",
    			"diaspora": "https://diasporafoundation.org/ns/",
    			"litepub": "http://litepub.social/ns#",
    			"toot": "http://joinmastodon.org/ns#",
    			"schema": "http://schema.org#",
    			"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
    			"sensitive": "as:sensitive",
    			"Hashtag": "as:Hashtag",
    			"directMessage": "litepub:directMessage",
    			"discoverable": "toot:discoverable",
    			"PropertyValue": "schema:PropertyValue",
    			"value": "schema:value"
    		}
    	],
    	"id": "https://soc.schuerz.at/objects/4edd2508-2662-39a3-305d-8ca330868827/Create",
    	"type": "Create",
    	"actor": "https://soc.schuerz.at/profile/jakob",
    	"published": "2022-03-22T10:21:36Z",
    	"instrument": {
    		"type": "Service",
    		"name": "Friendica 'Siberian Iris' 2022.05-dev-1452",
    		"url": "https://soc.schuerz.at"
    	},
    	"to": [
    		"https://lemmy.schuerz.at/c/test"
    	],
    	"cc": [
    		"https://www.w3.org/ns/activitystreams#Public",
    		"https://lemmy.schuerz.at/c/test/followers"
    	],
    	"object": {
    		"id": "https://soc.schuerz.at/objects/4edd2508-2662-39a3-305d-8ca330868827",
    		"type": "Article",
    		"summary": "",
    		"inReplyTo": null,
    		"diaspora:guid": "4edd2508-2662-39a3-305d-8ca330868827",
    		"published": "2022-03-22T10:21:36Z",
    		"url": "https://soc.schuerz.at/display/4edd2508-2662-39a3-305d-8ca330868827",
    		"attributedTo": "https://soc.schuerz.at/profile/jakob",
    		"sensitive": false,
    		"context": "https://soc.schuerz.at/objects/4edd2508-2662-39a3-305d-8ca330868827#context",
    		"name": "Test from friendica",
    		"content": "<span class=\"h-card\"><a href=\"https://lemmy.schuerz.at/c/test\" class=\"u-url mention\">!<span>test</span></a></span><br><br>Test from friendica",
    		"contentMap": {
    			"de": "<bdi>!<a href=\"https://lemmy.schuerz.at/c/test\" class=\"userinfo mention\" title=\"test\">test</a></bdi><br><br>Test from friendica"
    		},
    		"source": {
    			"content": "![url=https://lemmy.schuerz.at/c/test]This is a Testcommunity[/url]\n\nTest from friendica",
    			"mediaType": "text/bbcode"
    		},
    		"attachment": [],
    		"tag": [{
    			"type": "Mention",
    			"href": "https://lemmy.schuerz.at/c/test",
    			"name": "@test@lemmy.schuerz.at"
    		}],
    		"to": [
    			"https://lemmy.schuerz.at/c/test"
    		],
    		"cc": [
    			"https://www.w3.org/ns/activitystreams#Public",
    			"https://lemmy.schuerz.at/c/test/followers"
    		]
    	},
    	"signature": {
    		"type": "RsaSignature2017",
    		"nonce": "b2cffb52849d97fa34217eec0ad18dee67e4725a7864d9cff408026672cb8636",
    		"creator": "https://soc.schuerz.at/profile/jakob#main-key",
    		"created": "2022-03-22T10:21:37Z",
    		"signatureValue": "CJaHnbhQGby60BEwB40+1R3lknAz6LtUTMiEXs+T8DTPHElKr0FkAW3KmfqQlhge5Q2eQb0n55cZUjFs+pR4RyOpvGvZelz2MXCidZUbrKLKuA5qrIP+134f6qZT2YlcLxxpvvesHCtMfzk7bt3sOqWllN2YgS2aCGYiz2oEvseeRVEod4wtrlYCSg/lPZIHLd3CFCglVAuM7OvV8gI0w+JyMsQ9x9z8OdNyPJ0r4FmktW1jbNv4U+9rWMrO3fi3wXTMuenhe2QaO5d0AJGdugXuLP1IE8ln2HEWlGeK6EVlxZvMwuaFPLNKf0vQEtB9RGvjpAa2C+GD6xaevQsG0P0Ui3Evdzvp4OHzuJ/y3Z/Wl64Y5wfYgsRu4AqcmRgtWLzP30G0DjZl+1lfxcUNARX265HtlD+CLFvJk3tu3YJJ4OaAdDQ8BV2HQuaXhf+VcV/HsjM7c32eTGlEbgfO+PNNdr4JF1GLIl518UnJNv8GearKJWhNLfCDmB5SBbq8TNm41Glc6dgIfBdCo94XrGdh8nM+n0H/qU9oMF+ru/lsO8NlzPzct3LbqUKxANhLaGaDKu7346D14/ipROH7VEckL6bOE8fFNQOIhDaDN8uik7zHrIkeo71qmGjCqujC9MpizyEtnHCsvtxTNUsqZylSGzdoRH8X7MaSWOyp+t8="
    	}
    }
    

    Originally posted by Nutomic in #2144

  • issue_tracking_bot@lemm.eeOPB
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Currently Friendica uses either Article (when the post contains a title) or Note when creating posts. Systems like Mastodon or Pleroma only are using Note. If we had to use Page to make the communication work with Lemmy, then we had to distinguish between different group implementations, thus requiring having some reliable way of knowing the system on the other side. We are using this instrument value for that purpose, so that other systems always know with whom they are speaking with.

    On my test system I just tested a post with Page. But the server (the one from this issue) answered it with an HTTP error 400. I’m not sure if this is related or not.

    Originally posted by annando in #2144

  • issue_tracking_bot@lemm.eeOPB
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    @diogogithub we don’t have any platform specific code in Friendica either - and we really want to avoid that as well. But I see it like with the “Nodeinfo” mechanism. It is nice to know each other.

    Concerning the differences between the two types: AFAIK all these fields can be used for both types, so we are safe here.

    @Nutomic accepting both Page and Article (and maybe Note?) seems like a good idea. It fits into the “Robustness principle”.

    Originally posted by annando in #2144

  • issue_tracking_bot@lemm.eeOPB
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    We could switch from Page to Article, but there are also other projects which send Page (lotide and GNU social). So unless they do the same switch, it seems more reasonable for Lemmy to keep sending Page for backwards compat, and also accept receiving Article, as they seem equivalent. cc @vpzomtrrfrt

    @annando It also needs another change which is not merged yet. Try with ds9.lemmy.ml, that has a fixed version which should federate fine. Also, it would be good if you could send a list of all activitypub objects/activities sent by Friendica, so that i can add support for all of them at once.

    Originally posted by Nutomic in #2144

  • issue_tracking_bot@lemm.eeOPB
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Okay so it seems the best solution for Lemmy is to accept receiving both Page and Article, and treat them as equivalent. But we would keep sending as Page, to avoid any incompatibility with older Lemmy versions or with other software.

    Originally posted by Nutomic in #2144

  • issue_tracking_bot@lemm.eeOPB
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    We adopted Page because we want to be friendly with Lemmy’s Groups. GNU social v3 (the only release with groups over ActivityPub) is not being used by any instance. For us, switching from Page to Article is completely harmless, and the latter seems to fit better in this context.

    @annando We don’t have any platform-specific code in GNU social, and would like to avoid having to, but we will add the instrument property to our activities when federating out.

    For reference:

    Originally posted by diogogithub in #2144