lemmy-ui icon indicating copy to clipboard operation
lemmy-ui copied to clipboard

[Bug]: Cannot subscribe to remote community, although it is listed under allowed instances and linked instances

Open cachho opened this issue 1 year ago • 1 comments

Summary

I have whitelisted lemmy.ml in the admin settings of my instance. It shows up under /instances both under linked instances and allowed instances. However, I cannot find it through the search to subscribe

Steps to Reproduce

  1. Whitelist community in admin dashboard (lemmy.ml in my case)
  2. Make sure it is listed under my.instance/instances
  3. Made sure federation is active according to https://join-lemmy.org/docs/en/administration/first_steps.html#federation
  4. The community I'm interested in is [email protected].

I tried everything in this guide to find the community: https://webapps.stackexchange.com/a/170880, meaning:

Either search in lemmy.ml for https://lemmy.ml/c/cryptography or search in lemmy.ml for [email protected] or go to https://lemmy.ca/c/[email protected]

  1. The direct link (https://lemmy.my.instance/c/[email protected]) returns 404: couldnt_find_community
  2. Backend docker-compose logs says:
lemmy_1     | 2023-06-13T06:08:37.948494Z  WARN Error encountered while processing the incoming HTTP request: lemmy_server::root_span_builder: couldnt_find_community: Request error: error sending request for url (https://lemmy.ml/.well-known/webfinger?resource=acct:[email protected]): error trying to connect: dns error: failed to lookup address information: Try again
lemmy_1     |    0: lemmy_apub::fetcher::resolve_actor_identifier
lemmy_1     |              at crates/apub/src/fetcher/mod.rs:16
lemmy_1     |    1: lemmy_apub::api::read_community::perform
lemmy_1     |            with self=GetCommunity { id: None, name: Some("[email protected]"), auth: None }
lemmy_1     |              at crates/apub/src/api/read_community.rs:30
lemmy_1     |    2: lemmy_server::root_span_builder::HTTP request
lemmy_1     |            with http.method=GET http.scheme="http" http.host=lemmy.my.instance http.target=/api/v3/community otel.kind="server" request_id=c8a08a50-6f79-46a3-872f-cb6bb620cd27 http.status_code=400 otel.status_code="OK"
lemmy_1     |              at src/root_span_builder.rs:16
lemmy_1     | LemmyError { message: Some("couldnt_find_community"), inner: Request error: error sending request for url (https://lemmy.ml/.well-known/webfinger?resource=acct:[email protected]): error trying to connect: dns error: failed to lookup address information: Try again
lemmy_1     | 
lemmy_1     | Caused by:
lemmy_1     |     0: error sending request for url (https://lemmy.ml/.well-known/webfinger?resource=acct:[email protected]): error trying to connect: dns error: failed to lookup address information: Try again
lemmy_1     |     1: error trying to connect: dns error: failed to lookup address information: Try again
lemmy_1     |     2: dns error: failed to lookup address information: Try again
lemmy_1     |     3: failed to lookup address information: Try again, context: "SpanTrace" }
lemmy_ui    | couldnt_find_community

Technical Details

None

Version

v0.17.3

cachho avatar Jun 13 '23 06:06 cachho

I get the same issue, updated to 0.17.4 as well and same

tried adding dns: to the docker compose & specifying google’s dns server, but same

dejl avatar Jun 13 '23 13:06 dejl

I am having a similar issue. I don't have a fix, and strangely I'm not seeing any errors in the logs, but it may be relevant to this issue.

On 0.17.3-something, I would search for a community to subscribe to, it would immediately pop up with "No results", and then after about 20 seconds or so it would update to show a link to the community; I could then click on that link and subscribe. With 0.17.4, it no longer shows that link. If I were to use a direct link like https://my.instance/c/[email protected] I'd get the couldnt_find_community error

What I found is that after I search for a community, I can then go to the direct link and I'll see the community and can subscribe as normal. I'm guessing that the entry for the community is created on search and that lets the direct link work.

kigero avatar Jun 15 '23 22:06 kigero

I can concur with @kigero. Totally reproducible.

PragmaticCoding avatar Jun 16 '23 13:06 PragmaticCoding

I'm getting the same issue. It's basically rendering everything useless and broken.

fwgx avatar Jun 18 '23 13:06 fwgx

I have the same issue, I can manually work around to see and interact with the communities I want to. But I feel like no one will ever be able to search and find my server and communities.

conroyke56 avatar Jun 18 '23 20:06 conroyke56

This appears to be an issue with the lemmy docker container not being on an external docker network - or something.

I found https://github.com/LemmyNet/lemmy/issues/2990#issuecomment-1584758375 (or just adding the existing - lemmyexternalproxy to lemmy's networks:) resolved the backend issue for me, though the UI still does show "not found" when I first search the community - but I can then see the community appear in my instance's "All communities" list, and subscribe to it.

Nebual avatar Jun 18 '23 21:06 Nebual

That didn't seem to fix it. But they closed it. Which is fine.

I'll add more detail here:

Can ping 1.1.1.1, 8.8.8.8, google.com.

my instance shows as a linked instance on lemmy.world

if i search in lemmy.world my community "main" - no results. if i go to lemmy.world/c/[email protected] - 404: couldnt_find_community if i search [email protected] - no results

if i then go to lemmy.world/c/[email protected] - the community shows up. i can subscribe.

i can then go back and search main or !main@mydomain on lemmy.world and it shows up.

i need to go through this process for each community that someone creates in my server.

i though the expected behaviour is once federated, the community will just show up by searching main? how else do people organically discover your server and communities?

conroyke56 avatar Jun 20 '23 02:06 conroyke56