Public group search (fnd) always returns "no content" even though groups exist

33 views
Skip to first unread message

Alix Devermeille

unread,
Sep 12, 2025, 1:06:28 PMSep 12
to Tinode General

Hello,

I am using Tinode server (version v0.24.2, postgres backend) and I have an issue with public group discovery:

I can successfully create group topics (name starts with "grp", tags include "grp", public contains {"fn": ...}).
The groups are present in the database and have the correct structure.
When I try to search for public groups using the fnd topic (via WebSocket), the server always returns {"code":204,"text":"no content"}.
I have tested with both my app and with wscat, following the correct handshake and authentication sequence (hi, login, sub fnd, set fnd, get fnd).
Example sequence:
{"id":"hi1","hi":{"ver":"0.24","ua":"wscat"}}
{"id":"login1","login":{"scheme":"token","secret":"...my token..."}}
{"id":"subfnd1","sub":{"topic":"fnd","get":{"what":"desc"}}}
{"id":"setfnd1","set":{"topic":"fnd","desc":{"public":{"fn":""}}}}
{"id":"getfnd1","get":{"topic":"fnd","what":"sub"}}
The response to the last command is always: {"ctrl":{"topic":"fnd","params":{"what":"sub"},"code":204,"text":"no content"}}
I have checked the database: the topics are present, have the correct tags and public fields, and are recent.
Is there a known issue with public group search in this version?
Is there a configuration or migration step required to enable public group discovery?
How can I debug or fix this so that public groups are returned by the fnd search?

Thank you for your help!

Gene

unread,
Sep 12, 2025, 1:20:57 PMSep 12
to Tinode General
On Friday, September 12, 2025 at 8:06:28 PM UTC+3 Alix Devermeille wrote:

Hello,

I am using Tinode server (version v0.24.2, postgres backend) and I have an issue with public group discovery:

I can successfully create group topics (name starts with "grp", tags include "grp", public contains {"fn": ...}).
The groups are present in the database and have the correct structure.
When I try to search for public groups using the fnd topic (via WebSocket), the server always returns {"code":204,"text":"no content"}.
I have tested with both my app and with wscat, following the correct handshake and authentication sequence (hi, login, sub fnd, set fnd, get fnd).
Example sequence:
{"id":"hi1","hi":{"ver":"0.24","ua":"wscat"}}

This "{"id":"hi1"," is invalid. Basically it's a noop.
 
{"id":"login1","login":{"scheme":"token","secret":"...my token..."}}
{"id":"subfnd1","sub":{"topic":"fnd","get":{"what":"desc"}}}
{"id":"setfnd1","set":{"topic":"fnd","desc":{"public":{"fn":""}}}}

^^^ This makes no sense

out: {"set":{"id":"128057","topic":"fnd","desc":{"public":"alias:flowers,flowers"}}}
in: {"ctrl":{"id":"128057","topic":"fnd","code":200,"text":"ok","ts":"2025-09-12T17:17:20.033Z"}}
out: {"get":{"id":"128058","topic":"fnd","what":"sub"}}
in: {"meta":{"id":"128058","topic":"fnd","ts":"2025-09-12T17:17:20.035Z","sub":[{"updated":"2025-08-18T05:47:48.048Z","acs":{"mode":"JRWPS"},"public":{"fn":"Let's talk about flowers","photo":{"data":"<7968, bytes: /9j/4AAQSkZJ...o6Ij49X/2Q==>","type":"jpg"}},"private":["flowers"],"topic":"grpznK1TkuIhNk"}]}}
 
You can do it yourself by running a webapp and looking at browser console.

It may also be helpful to you if you read the manual.

Alix Devermeille

unread,
Sep 12, 2025, 4:53:45 PMSep 12
to Tinode General


What I did:

All my group topics (name starting with grp) have a public JSON field like:
{"fn": "test", "description": "fff", "alias": "public"}
The special topic fnd exists in my topics table with access set to {"Auth":"RWP","Anon":"N"}.
All group topics have access set to {"Auth":"RJWP","Anon":"N"}.
My search sequence in wscat:

{"hi":{"ver":"0.24","ua":"wscat"}}

{"id":"login1","login":{"scheme":"token","secret":"..."}}
{"id":"subfnd1","sub":{"topic":"fnd"}}
{"id":"setfnd1","set":{"topic":"fnd","desc":{"public":"alias:public"}}}

{"id":"getfnd1","get":{"topic":"fnd","what":"sub"}}


1 vulnerability
What happens:

The set command returns {"code":200,"text":"ok"}.
The get command returns {"code":500,"text":"internal error"}.
On the server logs, I see:

topic[fndwOv0vFiVbwk] meta.Get.Sub failed: ERROR: syntax error at or near "COUNT" (SQLSTATE 42601)

What I expect:

I should receive a meta.sub response with the list of all public group topics having "alias": "public" in their public field.
What I tried:

I verified all access rights and the structure of the public field.
I tried with different filters (desc.public: "", desc.public: "test", etc).
I tried with and without tags.
I restarted the server after every change.
Question:

Is this a known bug in Tinode (laster, PostgreSQL)?
Is there a workaround or a patch for this SQL error?
What is the correct way to structure the public field and the search filter for reliable public group discovery?


In fact, I want to display the entire list of topics.

Gene Sokolov

unread,
Sep 13, 2025, 1:32:06 AMSep 13
to tin...@googlegroups.com
As I stated in my previous message, you are not implementing the Tinode API. 

I will check what could possibly cause the 'ERROR: syntax error at or near "COUNT" (SQLSTATE 42601)'
But regardless of the error above, the "{"id":"setfnd1","set":{"topic":"fnd","desc":{"public":"alias:public"}}}" is invalid and will not work. 

--
You received this message because you are subscribed to the Google Groups "Tinode General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tinode+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/tinode/af7ec810-7d49-4742-b709-49d17adccc55n%40googlegroups.com.

Gene

unread,
Sep 14, 2025, 2:03:28 AMSep 14
to Tinode General
On Saturday, September 13, 2025 at 8:32:06 AM UTC+3 Gene wrote:
As I stated in my previous message, you are not implementing the Tinode API. 

I will check what could possibly cause the 'ERROR: syntax error at or near "COUNT" (SQLSTATE 42601)'

Reply all
Reply to author
Forward
0 new messages