Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App fails to place a call and throws authorization error after configured turn_user_lifetime expires. #7422

Open
askilashvili opened this issue Mar 13, 2023 · 1 comment
Labels
A-VoIP O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@askilashvili
Copy link

askilashvili commented Mar 13, 2023

Hello. I have matrix server deployed with https://github.com/spantaleev/matrix-docker-ansible-deploy Ansible playbook and it is working as expected. From android devices chat and call functionality works without any major issues, but from ios devices call fails as soon as "turn_user_lifetime" (synapse configuration option) time interval expires. Federation is disabled and all users are local. That happens to several connected ios devices at same time and only way to fix from client side is to kill application or reboot the phone. I assume on fresh start client application manages to refresh newly generated credentials thus it starts working till time expires again.

Steps to reproduce

To reproduce this issue deploy matrix server with Ansible script from above URL. By default "turn_user_lifetime" option is not set in config file, thus according to synapse wiki it is set to one hour interval by default. For testing purpose add that setting with 5min value like so - "turn_user_lifetime: 5m" and restart synapse server - "service matrix-synapse restart". Register user (https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/registering-users.md) and sign in from ios device (to replicate issue exactly better to have another device with another account). Assuming server is setup correctly first call should go without issue, but do not close application (you can put it in background or minimize but not kill) wait 5+ minute in this example and try to place call again.

I see these error lines in coturn log when ios clients fail in above scenario (homeserver url is edited):

Mar 11 17:44:54 matrixsrv matrix-coturn[402350]: 1498: : ERROR: check_stun_auth: Cannot find credentials of user <1678541453:@user2:matrixdomain>
Mar 11 17:44:54 matrixsrv matrix-coturn[402350]: 1498: : ERROR: check_stun_auth: Cannot find credentials of user <1678541453:@user2:matrixdomain>
Mar 11 17:45:00 matrixsrv matrix-coturn[402350]: 1504: : ERROR: check_stun_auth: Cannot find credentials of user <1678541563:@user1:matrixdomain>
Mar 11 17:45:00 matrixsrv matrix-coturn[402350]: 1504: : ERROR: check_stun_auth: Cannot find credentials of user <1678541563:@user1:matrixdomain>
Mar 11 17:45:15 matrixsrv matrix-coturn[402350]: 1519: : ERROR: check_stun_auth: Cannot find credentials of user <1678541563:@user1:matrixdomain>
Mar 11 17:45:15 matrixsrv matrix-coturn[402350]: 1519: : ERROR: check_stun_auth: Cannot find credentials of user <1678541563:@user1:matrixdomain>
Mar 11 17:45:26 matrixsrv matrix-coturn[402350]: 1530: : ERROR: check_stun_auth: Cannot find credentials of user <1678541453:@user2:matrixdomain>
Mar 11 17:45:26 matrixsrv matrix-coturn[402350]: 1530: : ERROR: check_stun_auth: Cannot find credentials of user <1678541453:@user2:matrixdomain>
Mar 11 17:45:34 matrixsrv matrix-coturn[402350]: 1538: : ERROR: check_stun_auth: Cannot find credentials of user <1678541453:@user2:matrixdomain>
Mar 11 17:45:34 matrixsrv matrix-coturn[402350]: 1538: : ERROR: check_stun_auth: Cannot find credentials of user <1678541453:@user2:matrixdomain>
Mar 11 17:45:38 matrixsrv matrix-coturn[402350]: 1542: : ERROR: check_stun_auth: Cannot find credentials of user <1678541563:@user1:matrixdomain>
Mar 11 17:45:38 matrixsrv matrix-coturn[402350]: 1542: : ERROR: check_stun_auth: Cannot find credentials of user <1678541563:@user1:matrixdomain>
Mar 11 17:45:47 matrixsrv matrix-coturn[402350]: 1551: : ERROR: check_stun_auth: Cannot find credentials of user <1678541453:@user2:matrixdomain>
Mar 11 17:45:47 matrixsrv matrix-coturn[402350]: 1551: : ERROR: check_stun_auth: Cannot find credentials of user <1678541453:@user2:matrixdomain>
Mar 11 17:45:50 matrixsrv matrix-coturn[402350]: 1555: : ERROR: check_stun_auth: Cannot find credentials of user <1678541563:@user1:matrixdomain>
Mar 11 17:45:50 matrixsrv matrix-coturn[402350]: 1555: : ERROR: check_stun_auth: Cannot find credentials of user <1678541563:@user1:matrixdomain>
Mar 11 17:45:56 matrixsrv matrix-coturn[402350]: 1560: : ERROR: check_stun_auth: Cannot find credentials of user <1678541563:@user1:matrixdomain>
Mar 11 17:45:56 matrixsrv matrix-coturn[402350]: 1560: : ERROR: check_stun_auth: Cannot find credentials of user <1678541563:@user1:matrixdomain>
Mar 11 17:46:00 matrixsrv matrix-coturn[402350]: 1565: : ERROR: check_stun_auth: Cannot find credentials of user <1678541453:@user2:matrixdomain>
Mar 11 17:46:00 matrixsrv matrix-coturn[402350]: 1565: : ERROR: check_stun_auth: Cannot find credentials of user <1678541453:@user2:matrixdomain>

Test was done on iphone13, ios 16.3.1, element version 1.10.3

Outcome

What did you expect?

I expect that ios client application will refresh credentials automatically and not fail to place call.

What happened instead?

Application stuck on "ringing" on caller side and on responder either you can not hear voice or client is stuck with connection to call message.

Your phone model

iphone13

Operating system version

ios 16.3.1

Application version

element version 1.10.3

Homeserver

synapse:v1.78.0

Will you send logs?

No

@askilashvili askilashvili added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Mar 13, 2023
@Velin92 Velin92 added S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Mar 20, 2023
@Velin92 Velin92 added the A-VoIP label Mar 20, 2023
@barpaw
Copy link
Contributor

barpaw commented Apr 18, 2023

I have the same problem, a temporary solution is to extend the validity period of the turn credentials and hope that before the end of this period, the user will open the application and renew the validity of the credentials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-VoIP O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

No branches or pull requests

3 participants