Tinode with Quarkus GRPC

52 views
Skip to first unread message

Duc Mai

unread,
Mar 24, 2022, 5:53:02 AM3/24/22
to Tinode General
I tried to connect Tinode via Quarkus GRPC
But when i send login msg, there is no response from server
Here is my example project
Can you help me?


2.jpg

3.jpg

Gene

unread,
Mar 24, 2022, 12:23:12 PM3/24/22
to Tinode General
What do you see in the see in the server logs?

Duc Mai

unread,
Mar 24, 2022, 1:00:16 PM3/24/22
to Tinode General
just push my code
how can i see tinode server log in docker?

Duc Mai

unread,
Mar 24, 2022, 1:06:28 PM3/24/22
to Tinode General
I2022/03/24 17:05:28 grpc in: login:{id:"a776bd15-2129-4230-ab18-c0cea6f6eecb"  scheme:"basic"  secret:"ZHVjbWFtaToxMjM0NTY="} XvtnTtYmrQQ
W2022/03/24 17:05:28 s.dispatch: {hi} is missing XvtnTtYmrQQ

Duc Mai

unread,
Mar 24, 2022, 1:10:46 PM3/24/22
to Tinode General
I2022/03/24 17:09:14 grpc in: hi:{id:"d9e9dc06-bd51-412e-945d-7dff64b1b147"  platform:"quarkus-grpc"} vk3Cfo-X3OA
W2022/03/24 17:09:14 s.hello: failed to parse version vk3Cfo-X3OA

Gene

unread,
Mar 24, 2022, 1:12:33 PM3/24/22
to Tinode General
On Thursday, March 24, 2022 at 10:06:28 AM UTC-7 Duc Mai wrote:
I2022/03/24 17:05:28 grpc in: login:{id:"a776bd15-2129-4230-ab18-c0cea6f6eecb"  scheme:"basic"  secret:"ZHVjbWFtaToxMjM0NTY="} XvtnTtYmrQQ
W2022/03/24 17:05:28 s.dispatch: {hi} is missing XvtnTtYmrQQ

The error message is quite clear: you are sending {login} without sending {hi} first.

Gene

unread,
Mar 24, 2022, 1:13:30 PM3/24/22
to Tinode General
On Thursday, March 24, 2022 at 10:10:46 AM UTC-7 Duc Mai wrote:
I2022/03/24 17:09:14 grpc in: hi:{id:"d9e9dc06-bd51-412e-945d-7dff64b1b147"  platform:"quarkus-grpc"} vk3Cfo-X3OA
W2022/03/24 17:09:14 s.hello: failed to parse version vk3Cfo-X3OA

The error message is clear: you should follow instructions on formatting the version.

Duc Mai

unread,
Mar 24, 2022, 1:19:54 PM3/24/22
to Tinode General
still no response from server

I2022/03/24 17:13:44 grpc: session started WnJ7M4d_E7s 172.18.0.1:54440 1
I2022/03/24 17:13:44 grpc in: hi:{id:"b0fb2e63-a03a-43c8-80ca-d0fed3520c0c"  ver:"v1.45.0"  platform:"quarkus-grpc"} WnJ7M4d_E7s
I2022/03/24 17:13:44 grpc in: login:{id:"71e2ff8e-9888-4bc5-8321-ddd616b43cab"  scheme:"basic"  secret:"ZHVjbWFtaToxMjM0NTY="} WnJ7M4d_E7s
I2022/03/24 17:14:25 grpc: session started pz_CU8gbkD0 172.18.0.1:54440 1
I2022/03/24 17:14:25 grpc in: hi:{id:"f2efb6c1-8c34-4278-b1d5-4f02c25f059a"  ver:"v1.45.0"  platform:"quarkus-grpc"} pz_CU8gbkD0
I2022/03/24 17:14:25 grpc in: login:{id:"0305af53-7db3-4bb8-a18e-813a3ce61f15"  scheme:"basic"  secret:"ZHVjbWFtaToxMjM0NTY="} pz_CU8gbkD0
I2022/03/24 17:17:06 grpc: session started -jnB9lxJtJE 172.18.0.1:54442 1
I2022/03/24 17:17:06 grpc in: hi:{id:"dec36768-d5b9-4f87-9b0a-42b7b76dc4ef"  ver:"v1.45.0"  platform:"quarkus-grpc"} -jnB9lxJtJE
I2022/03/24 17:17:12 grpc: session started hADv6c04M74 172.18.0.1:54442 1
I2022/03/24 17:17:12 grpc in: hi:{id:"00281c47-a0a9-4904-bc93-75888b9fdfdc"  ver:"v1.45.0"  platform:"quarkus-grpc"} hADv6c04M74
I2022/03/24 17:18:47 grpc: session started ZiX67rp4rmY 172.18.0.1:54444 1
I2022/03/24 17:18:47 grpc in: hi:{id:"0d027f0f-63f7-4444-b952-fa1432b78564"  ver:"1.45.0"  platform:"quarkus-grpc"} ZiX67rp4rmY

Gene Sokolov

unread,
Mar 24, 2022, 1:52:17 PM3/24/22
to tin...@googlegroups.com
The server is responding, you are not reading the response. Make sure you open a bi-directional gRPC session.

--
You received this message because you are subscribed to a topic in the Google Groups "Tinode General" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tinode/iYMR5yhbZFk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tinode+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tinode/1486eaa3-6ea8-4d21-83a9-1bd6d1ed2854n%40googlegroups.com.

Duc Mai

unread,
Mar 25, 2022, 10:28:55 PM3/25/22
to Tinode General
1.PNG
MicrosoftTeams-image.png


I discovered that, apparently, the connection was closed right after submitting to the server, and i did not receive a response.
I tried to sleep thread 1 second after sending a message to the server, and I got a response

But there is another error, it seems that the message content is encoded the wrong way, and the server is not understanding

I2022/03/26 02:20:05 grpc in: login:{id:"ca4d9199-b415-4baa-ac57-ea7adbe365151"  scheme:"basic"  secret:"ducmami:123456"} pCGUjaupBtc
I2022/03/26 02:20:06 grpc in: sub:{id:"ca4d9199-b415-4baa-ac57-ea7adbe365152"  topic:"grpN2f2eIxUihs"  get_query:{what:"sub desc"}} pCGUjaupBtc
I2022/03/26 02:20:07 grpc in: pub:{id:"ca4d9199-b415-4baa-ac57-ea7adbe365153"  topic:"grpN2f2eIxUihs"  no_echo:true  content:"Send from Quarkus"} pCGUjaupBtc
W2022/03/26 02:20:07 pbx: failed to parse bytes Send from Quarkus invalid character 'S' looking for beginning of value
I2022/03/26 02:20:13 in: '{"note":{"topic":"grpN2f2eIxUihs","what":"read","seq":6}}' sid='lLA1XL5ymaw' uid='yXBhrjmR9O0'

Gene

unread,
Mar 25, 2022, 10:36:22 PM3/25/22
to Tinode General
> I tried to sleep thread 1 second after sending a message to the server, and I got a response

This is a wrong approach. You should use bi-directional streaming gRPC.

> But there is another error

content:"\"Send from Quarkus\""
Reply all
Reply to author
Forward
0 new messages