lemmy
lemmy copied to clipboard
Can't subscribe to items from Pleroma instance
Found a bug? Please fill out the sections below. 👍
Issue Summary
It appears we're having issues when trying to subscribe to Lemmy items from Pleroma. I've been testing from mycrowd.ca and getting errors.
Steps to Reproduce
On the Pleroma side, search for a user or community and try to follow it. Request will be sent, the UI shows "Request sent!" and doesn't complete.
I have tried subscribing to items on both lemmy.ca and lemmy.ml with what appear to be the same results.
Technical details
On the lemmy.ca side of things, we see, when trying to follow /u/kinetix:
Dec 09 08:40:58 [mycrowd] request_id=Fr8jtv8pKp1zof4BBtVB [error] Follower/Following counter update for https://lemmy.ca/u/kinetix failed._{:error, "id must be a string"}
Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582411Z_[0m _[32m INFO_[0m _[1;32mtracing_actix_web::root_span_builder_[0m_[32m: _[32mnew_[0m
Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs:40_[2;3m
Dec 09 08:40:58 [lemmy] _[0m _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582480Z_[0m _[32m INFO_[0m _[1;32mhttp_signature_normalization_actix::digest::middleware_[0m_[32m: _[32mnew_[0m
Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/http-signature-normalization-actix-0.5.0-beta.12/src/digest/middleware.rs:165_[2;3m
Dec 09 08:40:58 [lemmy] _[0m _[2;3min_[0m http_signature_normalization_actix::digest::middleware::_[1mVerify digest_[0m _[2;3mwith_[0m , _[1mdigest.required_[0m: true
Dec 09 08:40:58 [lemmy] _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582580Z_[0m _[32m INFO_[0m _[1;32mhttp_signature_normalization_actix::digest::middleware_[0m_[32m: _[32mclose, _[1;32mtime.busy_[0m_[32m: 4.95µs, _[1;32mtime.idle_[0m_[32m: 94.7µs_[0m
Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/http-signature-normalization-actix-0.5.0-beta.12/src/digest/middleware.rs:165_[2;3m
Dec 09 08:40:58 [lemmy] _[0m _[2;3min_[0m http_signature_normalization_actix::digest::middleware::_[1mVerify digest_[0m _[2;3mwith_[0m , _[1mdigest.required_[0m: true
Dec 09 08:40:58 [lemmy] _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582623Z_[0m _[32m INFO_[0m _[1;32mhttp_signature_normalization_actix::digest::middleware_[0m_[32m: _[32mnew_[0m
Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/http-signature-normalization-actix-0.5.0-beta.12/src/digest/middleware.rs:207_[2;3m
Dec 09 08:40:58 [lemmy] _[0m _[2;3min_[0m http_signature_normalization_actix::digest::middleware::_[1mVerify Payload_[0m _[2;3mwith_[0m , _[1mvec_[0m: [DigestPart { algorithm: "SHA-256", digest: "nxzeYOwZbDClroXZsd0KqYCIOnKAZVj3S82ti9pKvJM=" }]
Dec 09 08:40:58 [lemmy] _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582873Z_[0m _[34mDEBUG_[0m _[1;34mhttp_signature_normalization_actix::digest::sha2::server_[0m_[34m: _[34mVerifying digest type, SHA-256_[0m
Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/http-signature-normalization-actix-0.5.0-beta.12/src/digest/sha2.rs:86_[2;3m
Dec 09 08:40:58 [lemmy] _[0m
Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582950Z_[0m _[32m INFO_[0m _[1;32mhttp_signature_normalization_actix::digest::middleware_[0m_[32m: _[32mclose, _[1;32mtime.busy_[0m_[32m: 86.0µs, _[1;32mtime.idle_[0m_[32m: 239µs_[0m
Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/http-signature-normalization-actix-0.5.0-beta.12/src/digest/middleware.rs:207_[2;3m
Dec 09 08:40:58 [lemmy] _[0m _[2;3min_[0m http_signature_normalization_actix::digest::middleware::_[1mVerify Payload_[0m _[2;3mwith_[0m , _[1mvec_[0m: [DigestPart { algorithm: "SHA-256", digest: "nxzeYOwZbDClroXZsd0KqYCIOnKAZVj3S82ti9pKvJM=" }]
Dec 09 08:40:58 [lemmy] _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.583000Z_[0m _[32m INFO_[0m _[1;32mlemmy_apub::http::person_[0m_[32m: _[32mReceived person inbox activity {"@context":["https://www.w3.org/ns/activitystreams","https://mycrowd.ca/schemas/litepub-0.1.jsonld",{"@language":"und"}],"actor":"https://mycrowd.ca/users/kinetix","cc":[],"id":"https://mycrowd.ca/activities/dab6a4d3-0db0-41ee-8aab-7bfa4929b4fd","object":"https://lemmy.ca/u/kinetix","state":"pending","to":["https://lemmy.ca/u/kinetix"],"type":"Follow"}_[0m
Dec 09 08:40:58 [lemmy] _[2;3mat_[0m crates/apub/src/http/person.rs:57_[2;3m
Dec 09 08:40:58 [lemmy] _[0m _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.583534Z_[0m _[31mERROR_[0m _[1;31mtracing_actix_web::middleware_[0m_[31m: _[31mError encountered while processing the incoming HTTP request: LemmyError { inner: data did not match any variant of untagged enum PersonInboxActivities at line 1 column 355, context: SpanTrace [{ target: "tracing_actix_web::root_span_builder", name: "HTTP request", fields: "http.method=POST http.route=/u/{user_name}/inbox http.flavor=1.0 http.scheme=http http.host=lemmy.ca http.client_ip=208.87.97.51 http.user_agent=Pleroma 2.4.1; https://mycrowd.ca <[email protected]> http.target=/u/kinetix/inbox otel.kind=\"server\" request_id=240a608f-5f9b-491d-9dda-a3907060f1f4", file: "/home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs", line: 40 }] }_[0m
Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/middleware.rs:258_[2;3m
Dec 09 08:40:58 [lemmy] _[0m _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4, _[1mexception.message_[0m: data did not match any variant of untagged enum PersonInboxActivities at line 1 column 355 0: tracing_actix_web::root_span_builder::HTTP request
Dec 09 08:40:58 [lemmy] with http.method=POST http.route=/u/{user_name}/inbox http.flavor=1.0 http.scheme=http http.host=lemmy.ca http.client_ip=208.87.97.51 http.user_agent=Pleroma 2.4.1; https://mycrowd.ca <[email protected]> http.target=/u/kinetix/inbox otel.kind="server" request_id=240a608f-5f9b-491d-9dda-a3907060f1f4
Dec 09 08:40:58 [lemmy] at /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs:40, _[1mexception.details_[0m: LemmyError { inner: data did not match any variant of untagged enum PersonInboxActivities at line 1 column 355, context: SpanTrace [{ target: "tracing_actix_web::root_span_builder", name: "HTTP request", fields: "http.method=POST http.route=/u/{user_name}/inbox http.flavor=1.0 http.scheme=http http.host=lemmy.ca http.client_ip=208.87.97.51 http.user_agent=Pleroma 2.4.1; https://mycrowd.ca <[email protected]> http.target=/u/kinetix/inbox otel.kind=\"server\" request_id=240a608f-5f9b-491d-9dda-a3907060f1f4", file: "/home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs", line: 40 }] }, _[1mhttp.status_code_[0m: 500, _[1motel.status_code_[0m: "ERROR"
Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.583598Z_[0m _[32m INFO_[0m _[1;32mtracing_actix_web::root_span_builder_[0m_[32m: _[32mclose, _[1;32mtime.busy_[0m_[32m: 931µs, _[1;32mtime.idle_[0m_[32m: 259µs_[0m
Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs:40_[2;3m
Dec 09 08:40:58 [lemmy] _[0m _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4, _[1mexception.message_[0m: data did not match any variant of untagged enum PersonInboxActivities at line 1 column 355 0: tracing_actix_web::root_span_builder::HTTP request
Dec 09 08:40:58 [lemmy] with http.method=POST http.route=/u/{user_name}/inbox http.flavor=1.0 http.scheme=http http.host=lemmy.ca http.client_ip=208.87.97.51 http.user_agent=Pleroma 2.4.1; https://mycrowd.ca <[email protected]> http.target=/u/kinetix/inbox otel.kind="server" request_id=240a608f-5f9b-491d-9dda-a3907060f1f4
Dec 09 08:40:58 [lemmy] at /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs:40, _[1mexception.details_[0m: LemmyError { inner: data did not match any variant of untagged enum PersonInboxActivities at line 1 column 355, context: SpanTrace [{ target: "tracing_actix_web::root_span_builder", name: "HTTP request", fields: "http.method=POST http.route=/u/{user_name}/inbox http.flavor=1.0 http.scheme=http http.host=lemmy.ca http.client_ip=208.87.97.51 http.user_agent=Pleroma 2.4.1; https://mycrowd.ca <[email protected]> http.target=/u/kinetix/inbox otel.kind=\"server\" request_id=240a608f-5f9b-491d-9dda-a3907060f1f4", file: "/home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs", line: 40 }] }, _[1mhttp.status_code_[0m: 500, _[1motel.status_code_[0m: "ERROR"
Lemmy doesn't support user following yet. You can only follow lemmy communities from pleroma / masto.
OK... following communities isn't happening either:
Dec 09 10:08:24 [mycrowd] request_id=Fr8ofG7hrkxX41sAU5OC [error] Follower/Following counter update for https://lemmy.ca/c/main failed._{:error, "id must be a string"}
Dec 09 10:08:24 [lemmy] _[2m2021-12-09T18:08:24.570452Z_[0m _[32m INFO_[0m _[1;32mlemmy_apub::http::community_[0m_[32m: _[32mReceived community inbox activity {"@context":["https://www.w3.org/ns/activitystreams","https://mycrowd.ca/schemas/litepub-0.1.jsonld",{"@language":"und"}],"actor":"https://mycrowd.ca/users/kinetix","cc":[],"id":"https://mycrowd.ca/activities/f68eb37f-21a6-454c-b97f-7af71efe14d4","object":"https://lemmy.ca/c/main","state":"pending","to":["https://lemmy.ca/c/main"],"type":"Follow"}_[0m
This is back on reduced logging - would you like debug output?
I'd need @Nutomic 's help with this one, he did the pleroma testing.
Mastodon also can't follow communities on lemmy. Nginx log shows that /c/{community_name}/inbox
returns 500, and lemmy logs:
lemmy_1 | 2021-12-10T07:07:29.295120Z ERROR tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: LemmyError { inner: invalid type: string "https://www.w3.org/ns/activitystreams", expected a sequence at line 1 column 51, context: SpanTrace [{ target: "tracing_actix_web::root_span_builder", name: "HTTP request", fields: "http.method=POST http.route=/c/{community_name}/inbox http.flavor=1.0 http.scheme=http http.host={{my_lemmy_host}} http.client_ip=2a01:4f8:171:a6::2 http.user_agent=http.rb/5.0.4 (Mastodon/3.4.3; +https://mastodon.social/) http.target=/c/main/inbox otel.kind=\"server\" request_id=865685b1-ec02-4f0b-9fe1-aa1b996c3d3c", file: "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs", line: 40 }] }
lemmy_1 | at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/middleware.rs:258
lemmy_1 | in tracing_actix_web::root_span_builder::HTTP request with , http.method: POST, http.route: /c/{community_name}/inbox, http.flavor: 1.0, http.scheme: http, http.host: {{my_lemmy_host}}, http.client_ip: 2a01:4f8:171:a6::2, http.user_agent: http.rb/5.0.4 (Mastodon/3.4.3; +https://mastodon.social/), http.target: /c/main/inbox, otel.kind: "server", request_id: 865685b1-ec02-4f0b-9fe1-aa1b996c3d3c, exception.message: invalid type: string "https://www.w3.org/ns/activitystreams", expected a sequence at line 1 column 51 0: tracing_actix_web::root_span_builder::HTTP request
lemmy_1 | with http.method=POST http.route=/c/{community_name}/inbox http.flavor=1.0 http.scheme=http http.host={{my_lemmy_host}} http.client_ip=2a01:4f8:171:a6::2 http.user_agent=http.rb/5.0.4 (Mastodon/3.4.3; +https://mastodon.social/) http.target=/c/main/inbox otel.kind="server" request_id=865685b1-ec02-4f0b-9fe1-aa1b996c3d3c
lemmy_1 | at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs:40, exception.details: LemmyError { inner: invalid type: string "https://www.w3.org/ns/activitystreams", expected a sequence at line 1 column 51, context: SpanTrace [{ target: "tracing_actix_web::root_span_builder", name: "HTTP request", fields: "http.method=POST http.route=/c/{community_name}/inbox http.flavor=1.0 http.scheme=http http.host={{my_lemmy_host}} http.client_ip=2a01:4f8:171:a6::2 http.user_agent=http.rb/5.0.4 (Mastodon/3.4.3; +https://mastodon.social/) http.target=/c/main/inbox otel.kind=\"server\" request_id=865685b1-ec02-4f0b-9fe1-aa1b996c3d3c", file: "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs", line: 40 }] }, http.status_code: 500, otel.status_code: "ERROR"
Just same as #1983
update:
After I upgraded lemmy to 14.5, I see some kind of new error when trying to follow a community.
Mastodon 3.4.1:
ERROR tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: LemmyError { inner: error decoding response body: expected value at line 1 column 1
Pleroma:
ERROR tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: LemmyError { inner: data did not match any variant of untagged enum GroupInboxActivities at line 1 column 394, context: SpanTrace [{ target: "tracing_actix_web::root_span_builder", name: "HTTP request", fields: "http.method=POST http.route=/c/{community_name}/inbox http.flavor=1.0 http.scheme=http http.host=dis-thu.closed.social http.client_ip=157.245.194.64 http.user_agent=Pleroma 2.3.0-1-gb221d77a; https://hereiszyn.com <[email protected]> http.target=/c/memes/inbox otel.kind=\"server\" request_id=b85046c4-0c9d-4679-81fa-8007e9433ee1", file: "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs", line: 40 }] }
I added a test case for the Pleroma follow activity here and its working fine, so not sure what the problem could be.
Anyway, you need to include the activity json so that we can debug the problem, in Lemmy logs it looks something like this from the comment here (@OmmyZhang same goes for #1983).
Received community inbox activity {"@context":["https://www.w3.org/ns/activitystreams","https://mycrowd.ca/schemas/litepub-0.1.jsonld",{"@language":"und"}],"actor":"https://mycrowd.ca/users/kinetix","cc":[],"id":"https://mycrowd.ca/activities/f68eb37f-21a6-454c-b97f-7af71efe14d4","object":"https://lemmy.ca/c/main","state":"pending","to":["https://lemmy.ca/c/main"],"type":"Follow"}
I think this is it - looks very similar to what you quoted:
Dec 09 12:39:03 [lemmy] _[2m2021-12-09T20:39:03.478606Z_[0m _[32m INFO_[0m _[1;32mlemmy_apub::http::community_[0m_[32m: _[32mReceived community inbox activity {"@context":["https://www.w3.org/ns/activitystreams","https://mycrowd.ca/schemas/litepub-0.1.jsonld",{"@language":"und"}],"actor":"https://mycrowd.ca/users/kinetix","cc":[],"id":"https://mycrowd.ca/activities/45826aa3-7bf5-4e0f-b5ff-38a6e331bdd2","object":"https://lemmy.ca/c/main","state":"pending","to":["https://lemmy.ca/c/main"],"type":"Follow"}_[0m
Both the follow activity and your pleroma user look totally fine, not sure what it could be. Could you post the full logs from that line "Received community inbox activity" up to the error message?
I think there's an error just before that line and then after... here's the further detail:
Dec 09 12:39:03 [mycrowd] [info] POST /api/v1/accounts/AECRLgkxoGReV7RO9w/follow
Dec 09 12:39:03 [mycrowd] request_id=Fr8wtPYdlsY2rt8BDOPB [error] Follower/Following counter update for https://lemmy.ca/c/main failed._{:error, "id must be a string"}
Dec 09 12:39:03 [lemmy] _[2m2021-12-09T20:39:03.478606Z_[0m _[32m INFO_[0m _[1;32mlemmy_apub::http::community_[0m_[32m: _[32mReceived community inbox activity {"@context":["https://www.w3.org/ns/activitystreams","https://mycrowd.ca/schemas/litepub-0.1.jsonld",{"@language":"und"}],"actor":"https://mycrowd.ca/users/kinetix","cc":[],"id":"https://mycrowd.ca/activities/45826aa3-7bf5-4e0f-b5ff-38a6e331bdd2","object":"https://lemmy.ca/c/main","state":"pending","to":["https://lemmy.ca/c/main"],"type":"Follow"}_[0m
Dec 09 12:39:03 [lemmy] _[2;3mat_[0m crates/apub/src/http/community.rs:66_[2;3m
Dec 09 12:39:03 [lemmy] _[0m
Dec 09 12:39:03 [lemmy] _[2m2021-12-09T20:39:03.479852Z_[0m _[32m INFO_[0m _[1;32mlemmy_apub::http_[0m_[32m: _[32mVerifying activity https://mycrowd.ca/activities/45826aa3-7bf5-4e0f-b5ff-38a6e331bdd2_[0m
Dec 09 12:39:03 [lemmy] _[2;3mat_[0m crates/apub/src/http/mod.rs:100_[2;3m
Dec 09 12:39:03 [lemmy] _[0m
Dec 09 12:39:03 [lemmy] _[2m2021-12-09T20:39:03.483278Z_[0m _[32m INFO_[0m _[1;32mlemmy_apub::http_[0m_[32m: _[32mReceiving activity https://mycrowd.ca/activities/45826aa3-7bf5-4e0f-b5ff-38a6e331bdd2_[0m
Dec 09 12:39:03 [lemmy] _[2;3mat_[0m crates/apub/src/http/mod.rs:111_[2;3m
Dec 09 12:39:03 [lemmy] _[0m
Dec 09 12:39:03 [lemmy] _[2m2021-12-09T20:39:03.486820Z_[0m _[32m INFO_[0m _[1;32mlemmy_apub::activities_[0m_[32m: _[32mSending activity https://lemmy.ca/activities/accept/764630ec-c579-4624-8796-c829508bd8fd_[0m
Dec 09 12:39:03 [lemmy] _[2;3mat_[0m crates/apub/src/activities/mod.rs:162_[2;3m
Dec 09 12:39:03 [lemmy] _[0m
Dec 09 12:39:03 [lemmy] _[2m2021-12-09T20:39:03.489126Z_[0m _[32m INFO_[0m _[1;32mlemmy_apub_lib::activity_queue_[0m_[32m: _[32mSending https://lemmy.ca/activities/accept/764630ec-c579-4624-8796-c829508bd8fd to https://mycrowd.ca/users/kinetix/inbox_[0m
Dec 09 12:39:03 [lemmy] _[2;3mat_[0m crates/apub_lib/src/activity_queue.rs:70_[2;3m
Dec 09 12:39:03 [lemmy] _[0m
Dec 09 12:39:03 [mycrowd] [info] POST /users/kinetix/inbox
Dec 09 12:39:03 [mycrowd] request_id=Fr8wtQn8aZLiChYBDOQB [info] Sent 400 in 25ms
Dec 09 12:39:03 [lemmy] _[2m2021-12-09T20:39:03.523330Z_[0m _[33m WARN_[0m _[1;33mlemmy_apub_lib::activity_queue_[0m_[33m: _[33mSend https://lemmy.ca/activities/accept/764630ec-c579-4624-8796-c829508bd8fd to https://mycrowd.ca/users/kinetix/inbox failed with status 400 Bad Request: "error"_[0m
Dec 09 12:39:03 [lemmy] _[2;3mat_[0m crates/apub_lib/src/activity_queue.rs:83_[2;3m
Dec 09 12:39:03 [lemmy] _[0m
According to that log, your Pleroma instance is rejecting the Accept activity from Lemmy. You will have to check the Pleroma logs if theres any info.
Hmm, here's what I have when I try and get it to resubmit the follow request:
Dec 14 13:18:58 [mycrowd] request_id=FsC7yV_WvXIAmRYAZ_AC [error] Follower/Following counter update for https://lemmy.ca/c/main failed._{:error, "id must be a string"}
Dec 14 13:18:58 [mycrowd] [info] GET /users/kinetix
Dec 14 13:18:58 [mycrowd] request_id=FsC7yXCN_jDApt8AZ_BC [info] Sent 200 in 5ms
Dec 14 13:18:58 [mycrowd] [info] POST /users/kinetix/inbox
Dec 14 13:18:58 [mycrowd] request_id=FsC7yXJQ2hr8NEwBQeRB [info] Sent 400 in 18ms
That's with the debug level logging on.
I just tried it myself, Follow/Accept is really broken with both Pleroma and Mastodon. No idea why, i dont think we changed anything in that regard. Need to debug it.
Can you try if you still have this problem? I suspect that it was fixed by https://github.com/LemmyNet/lemmy/pull/2113
Lemmy doesn't support user following yet.
Is this still intended behavior? If it is not, I might be able to lend a hand and provide some debug logs/traffic dumps.
@roobre Its not a bug, but simply not implemented yet. In other words, there is no database table for followers of a user, and the relevant federation activities are not handled. It wouldnt be so hard to implement, but is just very low priority. Contributions welcome!
@Nutomic Thanks a lot for the explanation! I'd love to give it a swing but unfortunately my rust skills are almost non-existent 😭 If I ever want to give rust a try I'll definitely consider contributing to Lemmy :)
It might be a chance to learn rust. We will definitely help if you get stuck somewhere :)
Not fixed yet?
I'm getting error response when I try to follow Lemmy community: data did not match any variant
. Target instance runs Lemmy 0.16.4
@silverpill The issue is still open which means this hasnt been implemented yet.
Apparently the last comment regarding community following was "Can you try if you still have this problem? I suspect that it was fixed by..." But for me the problem persists. Is there anything I can do to help?
@Nutomic It seems that Lemmy accepts Follow activities where object
is an URI. Does it accept activities where object
is a Group
, and if so, does it expect this Group
object to have all required properties like preferred_username
and inbox
?
@silverpill Sorry I got confused because someone above was talking about user following (which isnt possible yet). Following Lemmy communities from Pleroma should work fine. Can you specify which community you are trying to follow, and from which instance? Preferably paste the activity that gets sent by Pleroma, and any response from Lemmy (you need to be server admin for that).
I can't test following from Pleroma at the moment.
I'm using different software and my follow activity contains object
in the form of {"id":"https://example.com/c/community","type":"Group"}
(not a plain URI). Lemmy responds with data did not match any variant
. The question is, is this form of object representation supported? I've looked at the code and it seems that it is not supported (see my previous comment). Could you confirm that?
You should really open a new issue if it has nothing to do with Pleroma. Anyway, follow currently needs to look like this: https://github.com/LemmyNet/lemmy/blob/main/crates/apub/assets/lemmy/activities/following/follow.json
I believe all existing fediverse platforms handle it this way, and it would be a lot easier if you change the format that you send.
Other platforms process my Follow activity correctly, the problem I've described is specific to Lemmy. Anyway, I don't really care about the format. I switched to plain URIs and after that Lemmy accepted the activity and sent back Accept(Follow). However, the HTTP signature format is a bit unusual, with (created)
and (expires)
pseudo-headers in it.
I added support for these pseudo-headers and now everything works fine.
Also, I've tried to follow Lemmy community from Pleroma and the follow request is stuck in pending state. I think this is because Pleroma doesn't support hs2019 algo and therefore can not process Accept(Follow) coming from Lemmy.
These HTTP signature fields are introduced in draft 11 which we use when sending (but older drafts are supported for receiving).
I can add support for receiving Follow activities in the format you describe, but you really have to open a new issue for that.
Pleroma federation used to federate fine before, with the same HTTP signature draft. It would be helpful if you could post some logs to investigate.
Whats the name of your project btw?
No worries, my software can federate with Lemmy now, nothing else needs to be done. (I'm using Mitra).
Pleroma federation used to federate fine before, with the same HTTP signature draft. It would be helpful if you could post some logs to investigate.
This part looks relevant:
21:27:42.048 request_id=FxSIslkkc8_J510AAn5h [debug] Sigstring: (request-target): post /users/silverpill/inbox
(created):
(expires):
content-type: application/activity+json
digest: SHA-256=vS5bcIgvSOT7bh7UX58/nPlxXruyYGI0FV401BnWZEI=
host: ***
21:27:42.050 request_id=FxSIslkkc8_J510AAn5h [debug] Signature validation error for: https://***, make sure you are forwarding the HTTP Host header!
The last message is misleading but I think Pleroma is simply not aware that (created)
and (expires)
are not actual headers but pseudo-headers. That's why their values are missing in reconstructed sigstring.
AFAIK the latest draft is not widely supported. All fediverse platforms I've encountered are sending signatures in accordance with Mastodon's implementation (which uses rsa-sha256
algorithm, not hs2019
).
Okay I can reproduce the problem. Its strange because federation with Pleroma was the first thing we got working about a year ago, and since then we havent made any changes to http signatures iirc. Is there anything else in the logs that looks relevant?
Edit: I was wrong, we removed http signature compat mode just a month before this issue was opened. Apparently i didnt test it properly with Pleroma https://github.com/LemmyNet/lemmy/pull/1915
Maybe that means we need to revert #1915 ?