Open maltfield opened 1 year ago
It doesn't matter which Type
I supply, I never get back results when searching for communities. I'm running the latest arm64 images for lemmy and lemmy-ui on my Raspberry Pi 4. I have the following error logs from my lemmy container when I search for !selfhosted@lemmy.world
:
lemmy_1 | 2023-06-14T13:07:43.390679Z ERROR HTTP request{http.method=GET http.scheme="http" http.host=REDACTED_MY_LEMMY_DOMAIN http.target=/api/v3/ws otel.kind="server" request_id=9d892bee-f387-4358-8eac-742c3f69e397 http.status_code=101 otel.status_code="OK"}: lemmy_server::api_routes_websocket: couldnt_find_object: Request error: error sending request for url (https://lemmy.world/.well-known/webfinger?resource=acct:selfhosted@lemmy.world): operation timed out
lemmy_1 | 0: lemmy_apub::fetcher::search::search_query_to_object_id
lemmy_1 | at crates/apub/src/fetcher/search.rs:17
lemmy_1 | 1: lemmy_apub::api::resolve_object::perform
lemmy_1 | with self=ResolveObject { q: "!selfhosted@lemmy.world", auth: Some(Sensitive) }
lemmy_1 | at crates/apub/src/api/resolve_object.rs:21
lemmy_1 | 2: lemmy_server::root_span_builder::HTTP request
lemmy_1 | with http.method=GET http.scheme="http" http.host=REDACTED_MY_LEMMY_DOMAIN http.target=/api/v3/ws otel.kind="server" request_id=9d892bee-f387-4358-8eac-742c3f69e397 http.status_code=101 otel.status_code="OK"
lemmy_1 | at src/root_span_builder.rs:16
Edit: It looks like this post contains a solution. I'll try it out. https://github.com/LemmyNet/lemmy/issues/2990
Edit: And that fixed my issue. Woot!
@Nutomic My issue was resolved, but I don't know if the issue that @maltfield is experiencing has been resolved.
@Nutomic was this actually fixed? Or was the issue accidentally closed?
This issue still appears to be present for me on lemmy.ml running v0.17.4 (for example when searching for !open_source_ecology@slrpnk.net
with filter set to Type
= Communities
).
Note that this bug is not just another "instance can't find remote instances" due to a server misconfiguration or known async lag. This occurs when the instance does know about the other instance, but the filter just doesn't include them.
I see the same issue still present - searching for e.g. !biology@mander.xyz with "type_"="Community" doesn't produce any results:
$ curl 'https://discuss.tchncs.de/api/v3/search?q=!biology%40mander.xyz&listing_type=All&limit=3&type_=Communities' | jq
{
"type_": "Communities",
"comments": [],
"posts": [],
"communities": [],
"users": []
}
However "resolve_object" endpoint returns the result correctly
$ curl 'https://discuss.tchncs.de/api/v3/resolve_object?q=!biology%40mander.xyz' | jq
{
"comment": null,
"post": null,
"community": {
"community": {
"id": 875,
"name": "biology",
...
Same with "post/list" working just fine:
$ curl 'https://discuss.tchncs.de/api/v3/post/list?community_name=biology%40mander.xyz&sort=Active&limit=1' | jq
{
"posts": [
{
"post": {
"id": 58397,
...
"ap_id": "https://mander.xyz/post/196780",
},
To be honest I do not understand the search api, I tried search in various ways with no avail. For example this request gives me ocaml community 🤷
$ curl 'https://discuss.tchncs.de/api/v3/search?q=&community_name=biology%40mander.xyz&listing_type=All&limit=3&type_=Communities' | jq
{
"type_": "Communities",
"comments": [],
"posts": [],
"communities": [
{
"community": {
"id": 2029,
"name": "ocaml",
...
"actor_id": "https://discuss.tchncs.de/c/ocaml",
...
Seems like its a frontend issue then.
Ah, sorry I opened it in the wrong repo :(
Is it a frontend issue if it can be reproduced using REST api? I assumed lemmy-ui proxies REST api to Lemmy itself. Disclaimer: I am only days old in Lemmy world, still trying to grasp the concepts here.
I'm having the same issue on FF for Android & Windows. I'm also using lemmy.nz, not sure if that's just a coincidence. Some things I've noticed about the bug that might help:
no.lastname.nz
), part of an instance name (e.g. .nz
), the name of a community with an ! (e.g. !trees
), or the community and instance without an ! (e.g. trees@no.lastname.nz
)!trees@no.lastname.nz
, I still get no results, but the "No results" text doesn't showtrees
)Every single instance I tried (lemmy.ml, lemmy.world, lemmy.one, etc.) seems to be affected. Searching for a remote community, whether that community is already known to that server or not, returns zero results: Example: https://lemmy.ml/search?q=ukraine%40sopuli.xyz&type=Communities&listingType=All&page=1&sort=TopAll
This might actually be a backend issue, this is the URL that lemmy.ml (v0.18.0) uses to retrieve the results in the example above: https://lemmy.ml/api/v3/search?q=ukraine%40sopuli.xyz&type_=Communities&sort=TopAll&listing_type=All&page=1&limit=40
Note that this only happens when searching, and lemmy.ml already knows about that community. This request returns the expected result: https://lemmy.ml/api/v3/community?name=ukraine@sopuli.xyz
I just opened https://github.com/LemmyNet/lemmy/issues/3498 for what seems to be a backend issue.
Issue Summary
If you search for a new community (not yet known to a server) using its shorthand identifier (eg
!support@lemmy.nz
) while filtering theType
of results toCommunites
, then the community will not appear in the results.Note that if you do the "wait a minute and search again" workaround for the known async bug, the results still won't show. But if you remove the filter (change
Type = Communities
toType = All
), then the result will showSteps to Reproduce
/search
Type
fromAll
toCommunites
!support@lemmy.nz
)Search
again (to confirm this is not an already-known bug)Type
fromCommunities
toAll
Search
Type
again back fromAll
toCommunites
Search
Technical details
I'm using Firefox v102.11.0esr on Debian 11