element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.13k stars 1.98k forks source link

1:1 Call Gives An ICE Error #26168

Open TheDarkula opened 1 year ago

TheDarkula commented 1 year ago

Steps to reproduce

  1. Select microphone and camera in settings
  2. Initiate a voice or video call
  3. Be shown this error message:
    Couldn't start call! Invalid ICE server configuration.: SyntaxError: Failed to construct 'RTCPeerConnection': ICE server parsing failed: Empty uri.

This stems from the original issue here.

Outcome

A call to succeed.

Operating system

Arch Linux

Application version

Element version: 1.11.42 Olm version: 3.2.14

How did you install the app?

Arch Extra

Homeserver

Non-Public homserver running Conduit 0.6.0

Will you send logs?

Yes

t3chguy commented 1 year ago

What does your server return on the https://spec.matrix.org/v1.8/client-server-api/#get_matrixclientv3voipturnserver API?

TheDarkula commented 1 year ago

@t3chguy {"username":"","password":"","uris":[],"ttl":86400}

t3chguy commented 1 year ago

@TheDarkula what settings do you have enabled at the bottom of Voice & Video

image
TheDarkula commented 1 year ago

@t3chguy The default (exactly the same as your image), Allow Peer-to-Peer for 1:1 calls is switched on, Allow fallback call assist server (turn.matrix.org) is switched off.

t3chguy commented 1 year ago

Will you send logs? Yes

Your logs don't appear to have made it

TheDarkula commented 1 year ago

@t3chguy Here you go:

2023-09-14T19:46:28.617Z I Place video call in !vbCe1buotfgnqAjW9b:matrix.domain.com
2023-09-14T19:46:28.617Z D FetchHttpApi: --> GET https://matrix.domain.com/_matrix/client/v3/thirdparty/user/im.vector.protocol.sip_virtual?native_mxid=xxx
2023-09-14T19:46:28.624Z D FetchHttpApi: <-- GET https://matrix.domain.com/_matrix/client/v3/thirdparty/user/im.vector.protocol.sip_virtual?native_mxid=xxx [7ms 404]
2023-09-14T19:46:28.626Z W Failed to query SIP identity for user MatrixError: [404] M_UNRECOGNIZED: Unrecognized request (https://matrix.domain.com/_matrix/client/v3/thirdparty/user/im.vector.protocol.sip_virtual?native_mxid=%40user_1%3Amatrix.domain.com)
M_UNRECOGNIZED: MatrixError: [404] M_UNRECOGNIZED: Unrecognized request (https://matrix.domain.com/_matrix/client/v3/thirdparty/user/im.vector.protocol.sip_virtual?native_mxid=%40user_1%3Amatrix.domain.com)
    at c (vector://vector/webapp/bundles/b63723343c8b51e2f8b0/bundle.js:2:1347012)
    at p.requestOtherUrl (vector://vector/webapp/bundles/b63723343c8b51e2f8b0/bundle.js:2:3635695)
2023-09-14T19:46:28.626Z D Mapped real room !vbCe1buotfgnqAjW9b:matrix.domain.com to room ID !vbCe1buotfgnqAjW9b:matrix.domain.com
2023-09-14T19:46:28.626Z D Current turn creds expire in 61711378 ms
2023-09-14T19:46:28.627Z D setting call for room !vbCe1buotfgnqAjW9b:matrix.domain.com
2023-09-14T19:46:28.628Z I Setting call in room !vbCe1buotfgnqAjW9b:matrix.domain.com active
2023-09-14T19:46:28.629Z D Call state in !vbCe1buotfgnqAjW9b:matrix.domain.com changed to wait_local_media
2023-09-14T19:46:28.810Z D MediaHandler getUserMediaStreamInternal() cloning (oldStreamId=7095c497-98df-4faf-b4ae-2968144493e6 newStreamId=1beb8217-0eae-4289-9108-f32ba52b914b shouldRequestAudio=true shouldRequestVideo=true)
2023-09-14T19:46:28.811Z D TURN creds are valid for another 61711193 ms: not fetching new ones.
2023-09-14T19:46:28.815Z W Call 1694720788627dbY6C3rXidr7m5gr placeCallWithCallFeeds() failed - ending call Failed to construct 'RTCPeerConnection': ICE server parsing failed: Empty uri. (SyntaxError | 12)
2023-09-14T19:46:28.815Z E Call error: Couldn't start call! Invalid ICE server configuration.: SyntaxError: Failed to construct 'RTCPeerConnection': ICE server parsing failed: Empty uri.
Error: Couldn't start call! Invalid ICE server configuration.: SyntaxError: Failed to construct 'RTCPeerConnection': ICE server parsing failed: Empty uri.
    at D.placeCallFailed (vector://vector/webapp/bundles/b63723343c8b51e2f8b0/bundle.js:2:93174)
    at D.placeCall (vector://vector/webapp/bundles/b63723343c8b51e2f8b0/bundle.js:2:134730)
    at async D.placeVideoCall (vector://vector/webapp/bundles/b63723343c8b51e2f8b0/bundle.js:2:98240)
2023-09-14T19:46:28.816Z D Call state in !vbCe1buotfgnqAjW9b:matrix.domain.com changed to ended
2023-09-14T19:46:28.880Z D Removing call for room  !vbCe1buotfgnqAjW9b:matrix.domain.com
2023-09-14T19:46:28.881Z D LegacyCallHandler.play(callendAudio): beginning of function
2023-09-14T19:46:28.882Z D LegacyCallHandler.play(callendAudio): attempting to play audio at volume=1
2023-09-14T19:46:28.882Z D Call completed. Call ID: 1694720788627dbY6C3rXidr7m5gr, virtual room ID: !vbCe1buotfgnqAjW9b:matrix.domain.com, user-facing room ID: !vbCe1buotfgnqAjW9b:matrix.domain.com, direction: outbound, our Party ID: DYplDreikF, hangup party: local, hangup reason: ice_failed
2023-09-14T19:46:28.882Z D Call statistics are undefined. The call has probably failed before a peerConn was established
2023-09-14T19:46:28.882Z D Call 1694720788627dbY6C3rXidr7m5gr stopAllMedia() running
2023-09-14T19:46:28.969Z E LegacyCallHandler: encountered "emptied" event with <audio id="callendAudio"> {"isTrusted":true}
2023-09-14T19:46:28.970Z E LegacyCallHandler: encountered "waiting" event with <audio id="callendAudio"> {"isTrusted":true}
2023-09-14T19:46:28.991Z E LegacyCallHandler: encountered "suspend" event with <audio id="callendAudio"> {"isTrusted":true}
2023-09-14T19:46:28.991Z D LegacyCallHandler.play(callendAudio): playing audio successfully
2023-09-14T19:46:38.157Z D Returning cached capabilities
t3chguy commented 1 year ago

@TheDarkula please use the prescribed mechanism for sending logs so it goes through the appropriate parsers. I don't want to have to manually unpick the stack traces.

image

t3chguy commented 1 year ago

It works fine for me on official Element Desktop on macOS. The call goes through and rings on both sides.

image image

Seems like an issue specific to either the community maintained package which you are using or your setup.

TheDarkula commented 1 year ago

@t3chguy I am happy to send over a rageshake.tar file, as long as you are happy with me anonymising personal information in it.

t3chguy commented 1 year ago

@TheDarkula you're welcome to use the rageshake yourself to figure out the problem, otherwise we only tend to want submissions via the rageshake server as it does additional processing for us which I'd not have the time to do manually.

TheDarkula commented 1 year ago

@t3chguy I understand that you want a parser to read through things for you. Is there a reason why the rageshake mechanism does not anonymise things like usernames and homeserver domains?

t3chguy commented 1 year ago

Presumably because those details can be relevant for correlating 2 sides of a rageshake, or even up to 4 sides if federation is involved