Video Call - must attach first

132 views
Skip to first unread message

Elvis Yang

unread,
Jul 28, 2022, 11:33:01 AM7/28/22
to Tinode General
Hi

I have learnt from the release notes about the video call function in next branch.
I have successfully configured a coturn server and tested both stun and turn function.
However, every time I tried to use the video call function will get video calls unavailable from android client and "must attach first" error message from server side. Any suggestion?


Elvis

Gene

unread,
Jul 28, 2022, 11:58:17 AM7/28/22
to Tinode General
Make sure you android client is actually connected to your server. If yes, please list exact steps to reproduce. 

Aforge Forgess

unread,
Jul 28, 2022, 12:57:51 PM7/28/22
to tin...@googlegroups.com
Note that your Android client should be built from the next branch as well.

Sent from my iPhone

On Jul 28, 2022, at 18:33, Elvis Yang <tiya...@gmail.com> wrote:

Hi
--
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 on the web visit https://groups.google.com/d/msgid/tinode/f2b08efe-54ee-4c20-be1c-803d1844b517n%40googlegroups.com.

Elvis Yang

unread,
Jul 30, 2022, 1:40:43 AM7/30/22
to Tinode General

### Subject of the issue

"must attach first" error message

### Your environment
#### Server-side
- [x] Your own setup:
  * platform: ubuntu 20
  * version of Tinode server, using release tag 0.20.0.beta3
  * database backend: mysql 8.0.30
  * standalone
- [x] coturn and tested with https://icetest.info/

#### Client-side
- [x] Tindroid: Android app
  * Android API 31 / Android 12
  * App with origin/next brach, commit 7c15a8bc

### Steps to reproduce
1. Launch two android phone, and send message to sure the basic function for both client and server side works.
2. Click on more option (three dots) -> Video calls -> get "video call unavailable" error message
3. server with error message "must attach first"

### Expected behaviour
Should start video call

### Actual behaviour
Get error message

### Server-side log

I2022/07/30 05:36:48 in: '{"note":{"event":"ringing","topic":"usrxGTO9TPOWzA","what":"call"}}' sid='fzdP9COBWoo' uid='UPAB1unv4Qk'

I2022/07/30 05:36:48 in: '{"pub":{"content":{"ent":[{"data":{"incoming":false,"state":"started"},"tp":"VC"}],"fmt":[{"at":0,"key":0,"len":1}],"txt":" "},"head":{"webrtc":"started","mime":"text/x-drafty"},"id":"79413","noecho":true,"topic":"usrxGTO9TPOWzA"}}' sid='fzdP9COBWoo' uid='UPAB1unv4Qk'

W2022/07/30 05:36:48 s.publish[p2pUPAB1unv4QnEZM71M85bMA]: must attach first fzdP9COBWoo


### Client-side log
2022-07-30 13:39:29.779 32307-32370/co.tinode.tindroidx D/OpenGLRenderer: endAllActiveAnimators on 0xb4000076637300a0 (MenuPopupWindow$MenuDropDownListView) with handle 0xb40000757369d900
2022-07-30 13:39:29.878 32307-32631/co.tinode.tindroidx D/Tinode: in: {"ctrl":{"id":"71135","topic":"usrUPAB1unv4Qk","code":409,"text":"must attach first","ts":"2022-07-30T05:39:29.779Z"}}
2022-07-30 13:39:29.887 32307-32631/co.tinode.tindroidx D/PromisedReply: REJECTING promise co.tinode.tinodesdk.PromisedReply@7ffd867
    co.tinode.tinodesdk.ServerResponseException: must attach first (409)
        at co.tinode.tinodesdk.Tinode.dispatchPacket(Tinode.java:648)
        at co.tinode.tinodesdk.Tinode.access$2100(Tinode.java:76)
        at co.tinode.tinodesdk.Tinode$ConnectedWsListener.onMessage(Tinode.java:2530)
        at co.tinode.tinodesdk.Connection.onMessage(Connection.java:243)
        at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:576)
        at org.java_websocket.drafts.Draft_6455.processFrameText(Draft_6455.java:858)
        at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:792)
        at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:379)
        at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:216)
        at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:501)
        at java.lang.Thread.run(Thread.java:1012)
2022-07-30 13:39:29.917 32307-32631/co.tinode.tindroidx D/PromisedReply: REJECTING promise co.tinode.tinodesdk.PromisedReply@327cebd
    co.tinode.tinodesdk.ServerResponseException: must attach first (409)
        at co.tinode.tinodesdk.Tinode.dispatchPacket(Tinode.java:648)
        at co.tinode.tinodesdk.Tinode.access$2100(Tinode.java:76)
        at co.tinode.tinodesdk.Tinode$ConnectedWsListener.onMessage(Tinode.java:2530)
        at co.tinode.tinodesdk.Connection.onMessage(Connection.java:243)
        at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:576)
        at org.java_websocket.drafts.Draft_6455.processFrameText(Draft_6455.java:858)
        at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:792)
        at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:379)
        at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:216)
        at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:501)
        at java.lang.Thread.run(Thread.java:1012)
2022-07-30 13:39:29.980 32307-2907/co.tinode.tindroidx I/org.webrtc.Logging: Camera1Session: Stop done

Gene

unread,
Jul 30, 2022, 12:32:37 PM7/30/22
to Tinode General
I cannot reproduce. It could be a data race dependent on the phone performance and network delays. Is the phone connected over the internet or locally? What is the phone model and Android version?

Gene

unread,
Jul 30, 2022, 12:37:55 PM7/30/22
to Tinode General
Please post the full logs, both server-side and client side.

Gene

unread,
Jul 30, 2022, 3:28:54 PM7/30/22
to Tinode General
I still cannot reproduce but I added a patch which should ensure that the likely data race which causes the problem does not happen again. Please test.

Elvis Yang

unread,
Aug 6, 2022, 11:22:10 AM8/6/22
to Tinode General
still get 

W2022/08/06 15:18:44 s.publish[p2pUPAB1unv4QnEZM71M85bMA]: must attach first xoPUB6TPR4Q


I update the tindroid to e68064f97143a03b72708c5141d711851efe9300

with server release tag v0.20.0-beta3

Is there any combination for me to give another shot?


Elvis

Gene

unread,
Aug 6, 2022, 11:25:09 AM8/6/22
to Tinode General
Please attach the client-side and server-side logs of the entire session with the problem.
Reply all
Reply to author
Forward
0 new messages