element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.34k stars 711 forks source link

Voice calls fail when VPN routes are offered #8740

Open aerusso opened 8 months ago

aerusso commented 8 months ago

Steps to reproduce

  1. Install element (can be from fdroid or app store)
  2. Grant access to a wireguard VPN to element
  3. Log into a matrix.org account
  4. Make a voice call to another matrix.org user
  5. Accept the call from the other matrix.org user
  6. Wait

Outcome

What did you expect?

The call should eventually connect.

What happened instead?

The call gets stuck at "connecting..."

Comments on wireguard

This wireguard network provides no globally routable addresses, only providing fd00::/8 RFC 4193 addresses. Termux, given access to this same VPN is able to ping both globally routable (e.g., google.com) and vpn addresses.

Purpose

This may seem silly: just disconnect element from the VPN. However, I want to be able to access a homeserver that is only available on the VPN. Moreover, notice that I am able to access matrix.org, since I can indeed initiate outgoing calls (and send and receive text messages). I'm guessing the WebRTC code is insisting on using the VPN interface, and refusing to consider non-vpn interfaces.

Your phone model

motox4

Operating system version

Lineage (20-20240112-microG-payton)

Application version and app store

1.6.10 (from fdroid)

Homeserver

matrix.org

Will you send logs?

Yes

Are you willing to provide a PR?

Yes

jiangjiali commented 8 months ago

me too

aerusso commented 8 months ago

What phone model/OS do you have @jiangjiali? I was not able to reproduce this on a Pixel 6, to my surprise.

jiangjiali commented 8 months ago

me too. on a Pixel 6 Pro

jiangjiali commented 8 months ago

Deploying a turnserver on your own can solve the problem。

Source code address: https://github.com/coturn/coturn

aerusso commented 7 months ago

@jiangjiali This bug is unrelated to configuring a matrix home-server and/or setting up a turn server. This problem is with the client, and can be reproduced using the matrix.org homeserver. If you were able to resolve this issue by setting up coturn, you were not experiencing this bug.

An4cl3t0 commented 6 months ago

Possibly related to #2768.