element-hq / element-hq/element-ios

TURN support broken for months

Open
#5,354 3 comments 2 reactions 1 assignee Claimed by @gileluard View on GitHub
A-VoIP O-Occasional S-Major T-Defect Z-Ready Z-WTF
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

Try calling a user with Element iOS that is on a mobile connection. Or let them initiate a call, it doesn't matter. It also doesn't matter whether turn.matrix.org is enabled as a fallback or not.

### Outcome

The connection can never be established.

I switched from turn.matrix.org to my own TURN server, thinking this might be the issues (despite this working in the past!), only to see that all the logs contain is this:

```
Jan 7 13:21:12 vps turnserver: 7: : session 001000000000000001: realm user <>: incoming packet BINDING processed, success
Jan 7 13:21:12 vps turnserver: 7: : session 001000000000000001: realm user <>: incoming packet message processed, error 401: Unauthorized
Jan 7 13:21:12 vps turnserver: 7: : IPv4. tcp or tls connected to: MYMOBILECARRIERIP:24758
Jan 7 13:21:12 vps turnserver: 7: : session 001000000000000002: realm user <>: incoming packet message processed, error 401: Unauthorized
Jan 7 13:21:12 vps turnserver: 7: : IPv4. Local relay addr: TURNSERVERIP:62822
Jan 7 13:21:12 vps turnserver: 7: : session 001000000000000001: new, realm=, username=<1641561511:@js:myserver.org>, lifetime=600
Jan 7 13:21:12 vps turnserver: 7: : session 001000000000000001: realm user <1641561511:@js:myserver.org>: incoming packet ALLOCATE processed, success
Jan 7 13:21:12 vps turnserver: 7: : IPv4. Local relay addr: TURNSERVERIP:63075
Jan 7 13:21:12 vps turnserver: 7: : session 001000000000000002: new, realm=, username=<1641561511:@js:myserver.org>, lifetime=600
Jan 7 13:21:12 vps turnserver: 7: : session 001000000000000002: realm user <1641561511:@js:myserver.org>: incoming packet ALLOCATE processed, success
```

This is coturn with verbose logging. Turning it into uppercase verbose only prints context timeouts in addition, nothing else.

I'm not an expert in TURN/STUN/coturn, but it looks to me like Element iOS isn't even attempting to try to use TURN.

Furthermore, if I enable TURN with TLS on my homeserver, Element iOS chokes on the (perfectly valid, as it works in Firefox etc.) cert as well.

Given that I have heard from so many users that video/voice on Element iOS just doesn't work at all and they have switched back to Signal, I wonder: Is this working for anyone at all in environments where you need TURN? (To make it clear, STUN seems to work)

### Your phone model

iPhone 11 Pro Max

### Operating system version

15.2

### Application version

1.6.11

### Homeserver

private

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.