In which table is User ID (usr*) stored?

37 views
Skip to first unread message

Yang Lei

unread,
Aug 5, 2025, 11:29:19 AMAug 5
to Tinode General
Hi, 

Could you help me with the following questions:

1. In which table is User ID stored? the unique id prefix with usr. I have done some research with the tables, I didn't find it. I only could find it on the Web App setting page.

2. and another question is about the tags, according to the doc of server api,
"if missing, user will not be discoverable other than by login"
From Web App, when I create new user, I find no where to add tags, and I can only search a user by its User ID (the one prefixed with 'usr'). Does Web App only implement a subset of the functionalities which prevent me from searching a user by its login and creating more tags?
is the "Find" on Web App only used for searching in saved conversations? I try to search a user by "email:itse...@domain.com", it return "internal 500 error", I do have no chat history with this user.
  

Gene

unread,
Aug 5, 2025, 11:39:25 AMAug 5
to Tinode General
On Tuesday, August 5, 2025 at 6:29:19 PM UTC+3 Yang Lei wrote:
Hi, 

Could you help me with the following questions:

1. In which table is User ID stored? the unique id prefix with usr. I have done some research with the tables, I didn't find it. I only could find it on the Web App setting page.

users

2. and another question is about the tags, according to the doc of server api,
"if missing, user will not be discoverable other than by login"
From Web App, when I create new user, I find no where to add tags, and I can only search a user by its User ID (the one prefixed with 'usr'). Does Web App only implement a subset of the functionalities which prevent me from searching a user by its login and creating more tags?

Login, email, and phone can be used in general (could be turned off in config). Also use the new alias feature.
 
is the "Find" on Web App only used for searching in saved conversations?

No
 
I try to search a user by "email:itse...@domain.com", it return "internal 500 error",

No need to enter the email: prefix. I cannot reproduce the 500 internal.   Please provide steps to reproduce.

Yang Lei

unread,
Aug 6, 2025, 12:22:16 AMAug 6
to Tinode General

1. I still didn't find the User ID in users table.

The following is the description about the users table, id is bigint, it is not the one you mean, right? or a conversion is needed from this bigint to "usr*"? 
user-table-description.jpg

2. I just tried again with searching both login and email, neither of them work, both return internal 500 error. after the error, if I switch to "new group" or "by id" tab, a new error "malformed 400" will show.
I just follow the installation guide to start the container with default sample data, and I create 2 new users with email and the verification code "123456", nothing more. I believe you could reproduce easily.

Thanks.

Best regards!
Yang 

Gene

unread,
Aug 6, 2025, 10:06:04 AMAug 6
to Tinode General
On Wednesday, August 6, 2025 at 7:22:16 AM UTC+3 Yang Lei wrote:

1. I still didn't find the User ID in users table.

The following is the description about the users table, id is bigint, it is not the one you mean, right?

It is.
 
or a conversion is needed from this bigint to "usr*"? 

Yes
 
user-table-description.jpg

2. I just tried again with searching both login and email, neither of them work, both return internal 500 error.

Yang Lei

unread,
Aug 7, 2025, 1:53:58 AMAug 7
to Tinode General

Let me get back to you later about the reproduce, I am working on how to let the Tinode SDK work with React Native for now and a while.

At least, it is very easy to reproduce to me, I have two machines, follow the installation guide for docker, with default settings, and create 2 new users, and I try to find each other by login or email, no luck to succeed on any one of the machines. I have only been able to find them via "usr*".

Best regards!
Yang

Gene

unread,
Aug 7, 2025, 3:36:20 AMAug 7
to Tinode General
On Thursday, August 7, 2025 at 8:53:58 AM UTC+3 Yang Lei wrote:

Let me get back to you later about the reproduce,

Here is the sandbox: https://sandbox.tinode.co. Can you reproduce it there? If not, then the problem is likely on your end.

Gene

unread,
Aug 23, 2025, 8:46:35 AMAug 23
to Tinode General
I think I know what you did wrong: you built the server from the 'next' branch. Next is for development, not for users.

Manoj Kumar

unread,
Aug 28, 2025, 6:04:20 AM (12 days ago) Aug 28
to Tinode General
Hi, I am also facing the same issue. The Find tab is throwing "Internal error". I cloned the repo and web client, built manually.

It seems the SQL Query is failing. I am using PostgreSQL

I2025/08/28 15:02:38 in: '{"sub":{"id":"81034","topic":"fnd","get":{"what":"sub"}}}' sid='9LWvOyBR7IU' uid='fvBIGTuEkro'
I2025/08/28 15:02:43 in: '{"set":{"id":"81035","topic":"fnd","desc":{"public":"alias:rakesh,rakesh"}}}' sid='9LWvOyBR7IU' uid='fvBIGTuEkro'
I2025/08/28 15:02:43 in: '{"get":{"id":"81036","topic":"fnd","what":"sub"}}' sid='9LWvOyBR7IU' uid='fvBIGTuEkro'
W2025/08/28 15:02:43 topic[fndfvBIGTuEkro] meta.Get.Sub failed: ERROR: syntax error at or near "ALL" (SQLSTATE 42601)

Gene

unread,
Aug 28, 2025, 6:27:12 AM (12 days ago) Aug 28
to Tinode General
Don't use 'next'. The 'next' is for develpment only, it has bugs.

Yang Lei

unread,
Sep 6, 2025, 2:12:00 AM (3 days ago) Sep 6
to Tinode General

am I using the 'next' branch? I doubt it.

I just following the readme file at https://github.com/tinode/chat/blob/master/docker/README.md, and run the latest version docker file, it is not the 'next' branch, right? 

BTW, I have gotten the js sdk work on React Native/Expo without DB cache currently (I mean connection and authentication works as expected, I didn't test anything further), the js sdk rely on intl.segmenter, which could be resolved by the https://github.com/cometkim/unicode-segmenter

I am going to see how to port the DB cache to React Native/Expo, I am going to try the shim Gene provides or rewrite the DB cache to let it work with sqlite and drizzle

Gene

unread,
Sep 6, 2025, 3:40:16 AM (3 days ago) Sep 6
to Tinode General
On Saturday, September 6, 2025 at 9:12:00 AM UTC+3 Yang Lei wrote:

am I using the 'next' branch? I doubt it.

The bug you described was present in nexthttps://github.com/tinode/chat/commit/d5d388c7204d3a5fc381e2d732e07a2134a0fdaa but not in master or devel.

I just following the readme file at https://github.com/tinode/chat/blob/master/docker/README.md, and run the latest version docker file, it is not the 'next' branch, right? 

BTW, I have gotten the js sdk work on React Native/Expo without DB cache currently (I mean connection and authentication works as expected, I didn't test anything further), the js sdk rely on intl.segmenter, which could be resolved by the https://github.com/cometkim/unicode-segmenter

I am going to see how to port the DB cache to React Native/Expo, I am going to try the shim Gene provides or rewrite the DB cache to let it work with sqlite and drizzle

Great, send a pull request when you are ready.
Reply all
Reply to author
Forward
0 new messages