- cross-posted to:
- poliverso@lemmy.ml
- cross-posted to:
- poliverso@lemmy.ml
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
- Join to a community on lemmy from friendica
- 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
This activity creates an
Article
, which is not supported by Lemmy (we usePage
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 aPage
? 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=" } }
Currently Friendica uses either
Article
(when the post contains a title) orNote
when creating posts. Systems like Mastodon or Pleroma only are usingNote
. If we had to usePage
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 thisinstrument
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.@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
andArticle
(and maybeNote
?) seems like a good idea. It fits into the “Robustness principle”.Also, is
Page
demanded by any other platform? If no, then both ours should decide on one to use, instead of trying to build support for both.Originally posted by dessalines in #2144
I asked the friendica devs to have a look on this issue
Originally posted by xundeenergie in #2144
@annando Great! Could you please send json of your activitypub objects and activities? Basically whats in the link below, for inclusion in our tests. Dont make a PR, as it needs code changes as well. Once i have that, i will make the necessary changes.
https://github.com/LemmyNet/lemmy/tree/main/crates/apub/assets
We could switch from
Page
toArticle
, but there are also other projects which sendPage
(lotide and GNU social). So unless they do the same switch, it seems more reasonable for Lemmy to keep sendingPage
for backwards compat, and also accept receivingArticle
, 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.
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 fromPage
toArticle
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:
- Article: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-article
- Page: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page
Originally posted by diogogithub in #2144
@Nutomic with manually set the type to
Page
the message arrived at the test group: https://ds9.lemmy.ml/post/13652 - that’s great!