[SOLVED] Troubleshooting "There was a problem connecting the video call." errors

Opening a new thread to help troubleshoot “There was a problem connecting the video call.” errors with the new preview of video and audio calls (WebRTC).

If you’re receiving this error after setting up WebRTC, please help answer the following questions:

  1. Did you use Mattermost Docker preview for WebRTC? Or did you set up a Janus for WebRTC gateway? How about Coturn for STUN/TURN? (See documentation for more info).
  2. What distribution and database is your Mattermost instance installed on?
  3. Which browser/desktop app (and version) are the two users using? How about operating system?
  4. Does the issue reproduce with more than one person?
  5. Does the issue reproduce each time, if you try to call the same person 2-3 times? (sometimes we’ve had issues in the past where first try doesn’t connect)

Thanks for testing the early preview feature!

1 Like

If one is using Mattermost 3.5 packaged with GitLab 8.14, should that work the same way? Is a Janus server and a Coturn server still required there too? Can all of this be installed behind an Apache proxy?

Thanks @jurgenhaas for the question.

We recommend installing and configuring a Janus server for WebRTC Gateway. If you need your own STUN and TURN, you should install and configure Coturn.

We do not recommend installing Janus and Coturn behind Apache proxy or any type of proxy as we haven’t tested that configuration. If you find something in the Janus or Coturn projects that can support it, you are welcome to try.

I am able to initiate a call, and get the two screens (one black, and other smaller black on top right corner). It stays like that for a few seconds and then says the call has ended. I couldn’t get any audio or video through. Can we have debug messages for WebRTC stuff going on in the background?

  1. I am running my own Janus WebRTC gateway, with config files used from the vagrant image. I am not running my own STUN/TURN but using google’s and turn from viagenie.ca using my credentials
  2. I’m running Version: 3.5.0 (3.5.1) and Database: postgres
  3. Both using Web Apps in Chrome 55
  4. Not tested
  5. It is repeatable on every call.

Thanks @shantanuthatte for the report.

Do you see any JavaScript errors in the Chrome developer console? (Instructions here how to access it)

  1. i’m using the preview docker image and tried with own coturn server and public stun server
  2. postgresql
  3. os: 2x windows 8.1, browser: chrome + firefox, chrome + desktop app, desktop app + desktop app
  4. yes
  5. each time and the Error in Chrome is:

POST https://xxx.yyy.zz/api/v3/webrtc/token 500 (Internal Server Error) @ client.js:845
method=webrtcToken msg=Beim Verbinden mit dem Server ist ein Fehler aufgetreten detail= rid=wxr7fyhep789fb8mrgk3wypgea client.jsx:196

WebRTC is working for us. I set up Mattermost according to the documentation using PostgreSQL.

I installed Janus using the unofficial Debian repository here: http://ag-projects.com/debian/

Janus/coturn were configured using the configuration files from the Vagrant image: https://github.com/mattermost/mattermost-webrtc

The following ports in the firewall need to be opened:
TCP 443 (HTTPS)
TCP/UDP 3478 (STUN)
TCP 5349 (TURN)
TCP 7089 (Janus)
TCP 8189 (Janus)

Initially we had the same error in Chrome (55) and Firefox (49), but the issue was that we are using self-signed SSL certificates for Janus. By adding our CA certificate to Chrome, we are able to make/receive WebRTC calls via Mattermost.

Ensure if you’re using self-signed certificates, that you’ve created them using a CA and the CA certificate has been added to the browser. If you’re using a certificate from LetsEncrypt or a commercial CA, it shouldn’t be an issue.

can you share your configuration? it seems that you are not able to set the token that is going to be used in Janus to allow the connection

I’m using this docker-image for https://hub.docker.com/r/mattermost/webrtc/ janus.

Question: is it nessessary to install mattermost, janus und coturn at the server? My configuration is:

  • mattermost: installed on vpn-server:8065, reachable from internet via nginx reverseproxy from inet-server:443,
  • janus: also installed on vpn-server:7089|7090|8189|8190 inside vpn, reachable from internet via haproxy from inet-server:7089|7090|8189|8190
  • coturn: installed on inet-server:3478|5349|33478

also if i’m testing the coturn-server with turn(-client) - the connection seems ok and is logged by the coturn server. if i’m using mattermost, there is no connection attempt logged in the coturn server logs.

Hi,
do I need to setup STUN and TURN? Because the Docker install guide suggests it should also work without (https://github.com/mattermost/mattermost-webrtc).

I have Janus running and Mattermost setup. However I get “could not decode [details: body: ]” in the Mattermost log and in the client it states “There was a problem connecting the video call.” Janus says nothing to all of that.

Mattermost Version: 3.6.0 (3.6.1)
Database: postgres
Janus installed on the same server (not the Docker image)
Playing around with Chrome, Firefox and the Windows Desktop App
Trying to call myself - also tried with a colleague to verify that it’s not only because of that.

Just wanted to test the Docker preview. Calling is possible but when accepting the call the message “There was a problem connecting the video call” apears. Checked the network traffic with chrom developer console and saw the problem is related with ssl. Checked the Docker preview certificate and replaced it with our own (because the preview was using a selfsigned certificate). Checked again and https requests to gateway admin are possible but websocket wss requests are not possible. Getting this error message on chrome ERR_SSL_PROTOCOL_ERROR and this one on firefox SSL_ERROR_RX_RECORD_TOO_LONG.

We reproduced this behavior on following machnes: Mac OS X, Windows 10, Android, ISO
We are using the mattermost docker image therefor db is running on postgres and mattermost is version 3.6.0.
The certificate we are using is a letsencrypt certificate.

forgot to writte that we are using chrome, firefox, mattermost android app and desktop app.

Thanks all for trying the WebRTC integration. Much appreciated!

@jurgenhaas Curious if you tried setting up WebRTC for your GitLab installation? If so, was it successful?

@shantanuthatte Are you still having issue getting calls connected? If so, do you see any JavaScript errors in the Chrome developer console (instructions here how to access it)?

@halmartin Glad to hear it’s working for you :slight_smile:

@gvo @Schoaf If you’re using the Docker preview image to test the service, make sure you have the following settings configured:

  • Enable Mattermost WebRTC: true
  • Gateway Websocket URL: wss://dockerhost:8189
  • Gateway Admin URL: https://dockerhost:7089/admin
  • Gateway Admin Secret: janusoverlord

STUN and TURN are optional and not required. If you want to set up STUN and TURN servers, then Coturn is required. The post above from @halmartin might also be useful

@aschmid do you see any JavaScript errors in the Chrome developer console (instructions here how to access it)?

@jasonblais yes we are getting this error message:
WebSocket connection to 'wss://mattermost.domain.com:8189/' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR

Not yet. At the same time I got SpreedMe as part of my Nextcloud installation and didn’t have to go for the Mattermost/GitLab stack for this. However, the communication would be better placed with Mattermost and I’m still planning to get this up and running. Is there an updated guide somewhere for this or is the top most link still state of the art documentation?

Getting errors behind a proxy:

1.- Using Mattermost Docker preview for WebRTC, no Coturn, no STUN, no TURN.
2.- Docker instance of mattermost (3.6.1)
3.- Linux and Windows desktop apps.
4.- Yes, everybody
5.- No chance.

We have a docker instance of mattermost and docker instance of webrtc, everything is behind a corporate proxy (only port 80 and 443 allowed). It’s internal use and working well except webrtc, I can’t run the webrtc instance, throws this error:

webrtc_1 | STUN server to use: stun.l.google.com:19302
webrtc_1 | ICE handles watchdog started
webrtc_1 | Testing STUN server: message is of 20 bytes
webrtc_1 | [FATAL] [ice.c:janus_ice_set_stun_server:770] No response to our STUN BINDING test
webrtc_1 | [FATAL] [janus.c:main:3554] Invalid STUN address stun.l.google.com:19302

Is it possible to run it wihtout connecting a google stun server? If I have to use coturn for a stun server, how can i configure the docker image of webrtc?

1 Like

When I start the docker container, it seems that no service is running. So I try to start janus fomr /opt/janus/bin/janus and get the following error:
[FATAL] [ice.c:janus_ice_set_stun_server:770] No response to our STUN BINDING test
[FATAL] [janus.c:main:3554] Invalid STUN address stun.l.google.com:19302

When I remove the STUN server from the config, the server starts.
When I try to call I get this error in the Mattermost log:
[2017/02/24 19:06:18 CET] [EROR] /api/v3/webrtc/token:WebRTC.Token code=500 rid=owj8ex4x3tr7pg7jm13fwakhww uid=qnuboez45t88bgaj1nb9hcqnbw ip=10.231.163.59 We encountered an error while connecting to the server [details: Post https://dockerhost:7089/admin: dial tcp: lookup dockerhost on 10.231.160.29:53: no such host]

Janus console logs nothing - obviously because it seems that Mattermost cannot find the janus server.

Also the docker image just stops itself after starting when I start with your parameters:

mattermost@mattermost:~$ docker run --name mattermost-webrtc -p 7088:7088 -p 7089:7089 -p 8188:8188 -p 8189:8189 -d mattermost/webrtc:latest
6977a58ad917d03ded04980764a3617b06b414b14420cc60390688b96db1dd1d
mattermost@mattermost:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6977a58ad917 mattermost/webrtc:latest “/bin/sh -c /opt/j…” 4 seconds ago Up 3 seconds > 0.0.0.0:7088-7089->7088-7089/tcp, 0.0.0.0:8188-8189->8188-8189/tcp mattermost-webrtc
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6977a58ad917 mattermost/webrtc:latest “/bin/sh -c /opt/j…” 22 seconds ago Exited (1) 16 seconds ago mattermost-webrtc

Looking into the log of the container, it shows that it is stopping for the very same reason. There is a STUN configured in the config of janus that does not work. But even if I remove it, I cannot get it running with Mattermost (see above).

It all works great with janus and google stun, we’ll probably need more instructions on how to configure the coturn server properly though…

Is there any way of running this on untrusted certificates ? I keep getting cert errors…