mattermost / mattermost-plugin-calls

https://www.mattermost.com
Other
95 stars 49 forks source link

Calls broken in v0.5.0 on macOS #73

Closed florius0 closed 2 years ago

florius0 commented 2 years ago

Hey, I've just updated my MM server to 6.6, and it turned out that now both in safari and mattermost desktop on macOS there is no sound. I can't hear anyone, and no one can hear me

florius0 commented 2 years ago

Turned out it was broken since v0.4.9

streamer45 commented 2 years ago

Hey @florius0, are you able to share console logs from either browser or desktop app when connecting to a call? I'd expect to see some errors if you are unable to communicate. Also, does the call drop for you after a few seconds?

florius0 commented 2 years ago

Also, does the call drop for you after a few seconds?

Yep, drops after ~60 secs Should I collect client logs just from electron dev tools console?

streamer45 commented 2 years ago

Yep, drops after ~60 secs Should I collect client logs just from electron dev tools console?

Yes, logs for the current tab you are connecting from:

image

florius0 commented 2 years ago

v0.4.8 – Works

Logs for calls v0.4.8 on macOS 12.3.1

Mattermost Desktop App v5.0.4

Preload initialized
VM5:431 ignored message of type: user-activity-update
index.js:151 Loading plugin focalboard, version 0.14.0
index.js:151 Loading plugin com.github.matterpoll.matterpoll, version 1.4.0
index.js:151 Loading plugin com.mattermost.calls, version 0.4.8
index.js:151 Loading plugin playbooks, version 1.23.1
index.js:151 Loading plugin com.mattermost.draw-plugin, version 0.0.4
index.js:151 Loading plugin github, version 2.0.1
VM5:431 ignored message of type: browser-history-push-return
index.js:137 Loaded plugin github, version 2.0.1
index.js:137 Loaded plugin com.mattermost.draw-plugin, version 0.0.4
index.js:137 Loaded plugin com.mattermost.calls, version 0.4.8
index.js:137 Loaded plugin com.github.matterpoll.matterpoll, version 1.4.0
index.js:137 Loaded plugin playbooks, version 1.23.1
focalboard_4a199baa8c2c1a58_bundle.js:2 [1652791778.39] OctoClient baseURL: https://mattermost.ninsar.pro/plugins/focalboard
index.js:137 Loaded plugin focalboard, version 0.14.0
VM5:428 ignoring message of undefined type:
VM5:429 
websocket_client.tsx:62 websocket connecting to wss://mattermost.ninsar.pro/api/v4/websocket
VM5:381 registering Mattermost v5.0.4 with the server
Metropolis-SemiBold.woff2:1 Failed to load resource: the server responded with a status of 404 ()
Metropolis-SemiBoldItalic.woff2:1 Failed to load resource: the server responded with a status of 404 ()
websocket_client.tsx:148 got connection id  axoywzex778sxx7s1zmhpr6nfw
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: browser-history-push-return
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: browser-history-push-return
VM5:431 ignored message of type: browser-history-push-return
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update
needs_team.tsx:106 computer woke up - fetching latest
VM5:431 ignored message of type: user-activity-update
/api/v4/trial-license/prev:1 Failed to load resource: the server responded with a status of 403 ()
VM5:431 ignored message of type: browser-history-push-return
websocket_client.tsx:210 websocket closed
websocket_client.tsx:62 websocket connecting to wss://mattermost.ninsar.pro/api/v4/websocket
VM5:381 registering Mattermost v5.0.4 with the server
/api/v4/channels/:1 Failed to load resource: the server responded with a status of 404 ()
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'type')
    at U (com.mattermost.calls_f88f22d80119a3d4_bundle.js:2)
    at E (com.mattermost.calls_f88f22d80119a3d4_bundle.js:2)
VM5:431 ignored message of type: browser-history-push-return
VM5:431 ignored message of type: browser-history-push-return
websocket_client.tsx:210 websocket closed
websocket_client.tsx:62 websocket connecting to wss://mattermost.ninsar.pro/api/v4/websocket
VM5:381 registering Mattermost v5.0.4 with the server
/api/v4/trial-license/prev:1 Failed to load resource: the server responded with a status of 403 ()
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: browser-history-push-return
VM5:431 ignored message of type: browser-history-push-return
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 found default audio output device to use: Default - MacBook Pro Speakers (Built-in)
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 [Deprecation] The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)
V @ com.mattermost.calls_f88f22d80119a3d4_bundle.js:2
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 ws open, sending join msg
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 join ack received, initializing connection
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 signal Object
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 signal Object
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 ws {"candidate":{"candidate":"candidate:3824584842 1 udp 2130706431 83.220.175.8 8443 typ host","sdpMid":"","sdpMLineIndex":0,"usernameFragment":null},"type":"candidate"}
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 ws {"type":"answer","sdp":"v=0\r\no=- 5748994079938152225 1652792723 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=fingerprint:sha-256 78:63:20:72:38:4C:0B:FB:F8:C2:1A:E6:CC:3F:7B:31:E1:C6:17:7D:14:38:7A:4A:A1:A2:D9:4A:C3:96:4A:A7\r\na=group:BUNDLE 0\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=setup:active\r\na=mid:0\r\na=sendrecv\r\na=sctp-port:5000\r\na=ice-ufrag:tXiAOWQAbSlKvHUp\r\na=ice-pwd:aJHkumbyZfXBdfItPBCfgvLRcjGMVeLP\r\n"}
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 signal Object
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 vad: noise avg 20 21.355000000000004
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 ws {"candidate":{"candidate":"candidate:3667929165 1 udp 1694498815 83.220.175.8 54119 typ srflx raddr 0.0.0.0 rport 54119","sdpMid":"","sdpMLineIndex":0,"usernameFragment":null},"type":"candidate"}
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 rtc connected
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 signal Objectsdp: "v=0\r\no=- 5523214389242154318 3 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS MpuB0K9EOJJS2IAtn7ncPRMpNpjeRRYAgDgi\r\nm=application 63874 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 172.20.10.2\r\na=candidate:328666875 1 udp 2122260223 172.20.10.2 63874 typ host generation 0 network-id 1 network-cost 10\r\na=candidate:1561653771 1 tcp 1518280447 172.20.10.2 9 typ host tcptype active generation 0 network-id 1 network-cost 10\r\na=ice-ufrag:wngt\r\na=ice-pwd:yk9ymaDsY/TTT2bVrZ/ch03m\r\na=ice-options:trickle\r\na=fingerprint:sha-256 D4:50:2B:9B:A9:9D:91:20:25:8D:3B:50:16:18:26:7F:48:7E:E8:80:FD:3A:D1:12:CB:12:9C:86:62:2E:4D:CB\r\na=setup:actpass\r\na=mid:0\r\na=sctp-port:5000\r\na=max-message-size:262144\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:wngt\r\na=ice-pwd:yk9ymaDsY/TTT2bVrZ/ch03m\r\na=ice-options:trickle\r\na=fingerprint:sha-256 D4:50:2B:9B:A9:9D:91:20:25:8D:3B:50:16:18:26:7F:48:7E:E8:80:FD:3A:D1:12:CB:12:9C:86:62:2E:4D:CB\r\na=setup:actpass\r\na=mid:1\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendrecv\r\na=msid:MpuB0K9EOJJS2IAtn7ncPRMpNpjeRRYAgDgi 0c63c387-86ef-4c9c-a057-536493e4e953\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:2542343810 cname:awyevjrCLr5PtuuI\r\na=ssrc:2542343810 msid:MpuB0K9EOJJS2IAtn7ncPRMpNpjeRRYAgDgi 0c63c387-86ef-4c9c-a057-536493e4e953\r\na=ssrc:2542343810 mslabel:MpuB0K9EOJJS2IAtn7ncPRMpNpjeRRYAgDgi\r\na=ssrc:2542343810 label:0c63c387-86ef-4c9c-a057-536493e4e953\r\n"type: "offer"[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 signal Objectcandidate: {candidate: 'candidate:328666875 1 udp 2122260223 172.20.10.2 5…eration 0 ufrag wngt network-id 1 network-cost 10', sdpMLineIndex: 1, sdpMid: '1'}type: "candidate"[[Prototype]]: Object
com.mattermost.calls_f88f22d80119a3d4_bundle.js:2 ws {"type":"answer","sdp":"v=0\r\no=- 5748994079938152225 1652792724 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=fingerprint:sha-256 78:63:20:72:38:4C:0B:FB:F8:C2:1A:E6:CC:3F:7B:31:E1:C6:17:7D:14:38:7A:4A:A1:A2:D9:4A:C3:96:4A:A7\r\na=group:BUNDLE 0 1\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=setup:active\r\na=mid:0\r\na=sendrecv\r\na=sctp-port:5000\r\na=ice-ufrag:tXiAOWQAbSlKvHUp\r\na=ice-pwd:aJHkumbyZfXBdfItPBCfgvLRcjGMVeLP\r\na=candidate:3824584842 1 udp 2130706431 83.220.175.8 8443 typ host\r\na=candidate:3824584842 2 udp 2130706431 83.220.175.8 8443 typ host\r\na=candidate:3667929165 1 udp 1694498815 83.220.175.8 54119 typ srflx raddr 0.0.0.0 rport 54119\r\na=candidate:3667929165 2 udp 1694498815 83.220.175.8 54119 typ srflx raddr 0.0.0.0 rport 54119\r\na=end-of-candidates\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=setup:active\r\na=mid:1\r\na=ice-ufrag:tXiAOWQAbSlKvHUp\r\na=ice-pwd:aJHkumbyZfXBdfItPBCfgvLRcjGMVeLP\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtcp-fb:111 transport-cc \r\na=recvonly\r\n"}
VM5:431 ignored message of type: user-activity-update
VM5:431 ignored message of type: user-activity-update

Mattermost v6.7

{"timestamp":"2022-05-17 16:04:11.023 +03:00","level":"warn","msg":"Unrecognized config permissions tag value.","caller":"api4/config.go:394","tag_value":"sysconsole_write_*_read"}
{"timestamp":"2022-05-17 16:04:11.042 +03:00","level":"info","msg":"Failed to fetch license twice. May incorrectly default to on-prem mode.","caller":"app/plugin_api.go:937","plugin_id":"com.mattermost.apps"}
streamer45 commented 2 years ago

Thanks. Logs suggest you are connected to the call but you said it drops after a few seconds? Do any more logs appear when that happens?

florius0 commented 2 years ago

v0.5.0 – Does not work

Logs for calls v0.5.0 on macOS 12.3.1

Mattermost Desktop App v5.0.4

VM5:295 Preload initialized
VM5:431 ignored message of type: user-activity-update
index.js:151 Loading plugin focalboard, version 0.14.0
index.js:151 Loading plugin github, version 2.0.1
index.js:151 Loading plugin com.github.matterpoll.matterpoll, version 1.4.0
index.js:151 Loading plugin com.mattermost.calls, version 0.5.0
index.js:151 Loading plugin playbooks, version 1.23.1
index.js:151 Loading plugin com.mattermost.draw-plugin, version 0.0.4
index.js:137 Loaded plugin github, version 2.0.1
index.js:137 Loaded plugin com.github.matterpoll.matterpoll, version 1.4.0
index.js:137 Loaded plugin com.mattermost.calls, version 0.5.0
VM5:431 ignored message of type: browser-history-push-return
index.js:137 Loaded plugin com.mattermost.draw-plugin, version 0.0.4
focalboard_4a199baa8c2c1a58_bundle.js:2 [1652793267.89] OctoClient baseURL: https://mattermost.ninsar.pro/plugins/focalboard
index.js:137 Loaded plugin focalboard, version 0.14.0
VM5:428 ignoring message of undefined type:
VM5:429 
index.js:137 Loaded plugin playbooks, version 1.23.1
websocket_client.tsx:62 websocket connecting to wss://mattermost.ninsar.pro/api/v4/websocket
Metropolis-SemiBold.woff2:1 Failed to load resource: the server responded with a status of 404 ()
VM5:381 registering Mattermost v5.0.4 with the server
Metropolis-SemiBoldItalic.woff2:1 Failed to load resource: the server responded with a status of 404 ()
websocket_client.tsx:148 got connection id  9woh9pncatyfzkrwo55uihxcjh
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 found default audio output device to use: Default - MacBook Pro Speakers (Built-in)
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 [Deprecation] The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)
V @ com.mattermost.calls_76ad6c2456b569b2_bundle.js:2
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 ws open, sending join msg
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 join ack received, initializing connection
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 signal Object
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 signal Object
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 ws {"type":"answer","sdp":"v=0\r\no=- 1525884565711022808 1652793274 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=fingerprint:sha-256 6D:94:D8:38:9F:77:1C:A2:41:F6:9C:3B:DC:84:6D:FB:63:DD:B3:63:C3:F1:6B:2D:70:1A:74:C0:3B:E6:62:18\r\na=group:BUNDLE 0\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=setup:active\r\na=mid:0\r\na=sendrecv\r\na=sctp-port:5000\r\na=ice-ufrag:zIdmVfBwIyqOcZZv\r\na=ice-pwd:ShNOQSLiYgnSbdoRLrnopiaQlkssuDuf\r\n"}
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 ws {"candidate":{"candidate":"candidate:3824584842 1 udp 2130706431 83.220.175.8 8443 typ host","sdpMid":"","sdpMLineIndex":0,"usernameFragment":null},"type":"candidate"}
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 signal Object
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 vad: noise avg 22 62.89090909090908
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 signal {type: 'offer', sdp: 'v=0\r\no=- 7991207118723820725 3 IN IP4 127.0.0.1\r\ns…3540 label:f7428b96-145b-4545-ad59-d80b46bc9fe0\r\n'}
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 signal {type: 'candidate', candidate: {…}}
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 ws {"type":"answer","sdp":"v=0\r\no=- 1525884565711022808 1652793275 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=fingerprint:sha-256 6D:94:D8:38:9F:77:1C:A2:41:F6:9C:3B:DC:84:6D:FB:63:DD:B3:63:C3:F1:6B:2D:70:1A:74:C0:3B:E6:62:18\r\na=group:BUNDLE 0 1\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=setup:active\r\na=mid:0\r\na=sendrecv\r\na=sctp-port:5000\r\na=ice-ufrag:zIdmVfBwIyqOcZZv\r\na=ice-pwd:ShNOQSLiYgnSbdoRLrnopiaQlkssuDuf\r\na=candidate:3824584842 1 udp 2130706431 83.220.175.8 8443 typ host\r\na=candidate:3824584842 2 udp 2130706431 83.220.175.8 8443 typ host\r\na=end-of-candidates\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=setup:active\r\na=mid:1\r\na=ice-ufrag:zIdmVfBwIyqOcZZv\r\na=ice-pwd:ShNOQSLiYgnSbdoRLrnopiaQlkssuDuf\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtcp-fb:111 transport-cc \r\na=recvonly\r\n"}
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 peer error Error: Connection failed.
    at _onConnectionStateChange (com.mattermost.calls_76ad6c2456b569b2_bundle.js:2)
    at RTCPeerConnection._pc.onconnectionstatechange (com.mattermost.calls_76ad6c2456b569b2_bundle.js:2)
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 disconnect
com.mattermost.calls_76ad6c2456b569b2_bundle.js:2 ws close: 1005

Mattermost v6.7

{"timestamp":"2022-05-17 16:11:06.098 +03:00","level":"error","msg":"Failed to upgrade websocket connection.","caller":"web/context.go:105","path":"/api/v4/websocket","request_id":"pd8erzsxbffutmiz9udt81irar","ip_addr":"216.99.127.196","user_id":"","method":"GET","err_where":"connect","http_code":500,"err_details":"websocket: the client is not using the websocket protocol: 'websocket' token not found in 'Upgrade' header"}
{"timestamp":"2022-05-17 16:11:52.497 +03:00","level":"error","msg":"EOF","caller":"app/plugin_api.go:940","plugin_id":"com.mattermost.calls","origin":"main.(*Plugin).initRTCConn.func5 sfu.go:403"}
{"timestamp":"2022-05-17 16:13:19.665 +03:00","level":"info","msg":"Failed to fetch license twice. May incorrectly default to on-prem mode.","caller":"app/plugin_api.go:937","plugin_id":"com.mattermost.apps"}
{"timestamp":"2022-05-17 16:14:17.854 +03:00","level":"info","msg":"got public IP address","caller":"app/plugin_api.go:937","plugin_id":"com.mattermost.calls","origin":"main.(*logger).Info log.go:81","addr":"83.220.175.8"}
{"timestamp":"2022-05-17 16:14:17.856 +03:00","level":"info","msg":"rtc: server is listening on udp 8443","caller":"app/plugin_api.go:937","plugin_id":"com.mattermost.calls","origin":"main.(*logger).Info log.go:81"}
{"timestamp":"2022-05-17 16:14:17.872 +03:00","level":"info","msg":"Failed to fetch license twice. May incorrectly default to on-prem mode.","caller":"app/plugin_api.go:937","plugin_id":"com.mattermost.apps"}
florius0 commented 2 years ago

Thanks. Logs suggest you are connected to the call but you said it drops after a few seconds? Do any more logs appear when that happens?

Yes, I said that it drops on version > v0.4.8

florius0 commented 2 years ago

I added headers to avoid confusion)

PS There is also high cpu usage of Mattermost Helper (Renderer) during call (both v0.4.8 and v0.5.0)

streamer45 commented 2 years ago

Thanks @florius0 , let's focus on the disconnect here. Happy to discuss any performance issue on a separate issue.

You mentioned v0.4.9 wasn't working either, is that right?

florius0 commented 2 years ago

let's focus on the disconnect here. Happy to discuss any performance issue on a separate issue

Yep.

You mentioned v0.4.9 wasn't working either, is that right?

Yes Judging by releases' descriptions, it could be broken in v0.4.9

streamer45 commented 2 years ago

Okay, had a good look and this is likely an issue with the STUN urls that are not passed properly down to the client. That said the core issue is probably that your instance is not accepting UDP traffic on port 8443 so your client tries to fallback to STUN which broke in 0.4.9

I'll send a fix for this but beware the proper solution is to allow direct UDP connectivity to the instance.

florius0 commented 2 years ago

probably that your instance is not accepting UDP traffic on port 8443

Hmm thats strange because I have my firewall open on 8443/udp and port forwarding in docker-compose.yml is also set up.

How do I test that UPD is properly set up?

$ ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
8065                       ALLOW       Anywhere
8443/udp                   ALLOW       Anywhere
22/tcp (v6)                ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)
8065 (v6)                  ALLOW       Anywhere (v6)
8443/udp (v6)              ALLOW       Anywhere (v6)
  mattermost:
    depends_on:
      - postgres
    container_name: mattermost
    image: mattermost/${MATTERMOST_IMAGE}:${MATTERMOST_IMAGE_TAG}
    restart: ${RESTART_POLICY}
    security_opt:
      - no-new-privileges:true
    pids_limit: 200
    read_only: ${MATTERMOST_CONTAINER_READONLY}
    tmpfs:
      - /tmp
    volumes:
      - ${MATTERMOST_CONFIG_PATH}:/mattermost/config:rw
      - ${MATTERMOST_DATA_PATH}:/mattermost/data:rw
      - ${MATTERMOST_LOGS_PATH}:/mattermost/logs:rw
      - ${MATTERMOST_PLUGINS_PATH}:/mattermost/plugins:rw
      - ${MATTERMOST_CLIENT_PLUGINS_PATH}:/mattermost/client/plugins:rw
      - ${MATTERMOST_BLEVE_INDEXES_PATH}:/mattermost/bleve-indexes:rw
    environment:
      # timezone inside container
      - TZ

      # necessary Mattermost options/variables (see env.example)
      - MM_SQLSETTINGS_DRIVERNAME
      - MM_SQLSETTINGS_DATASOURCE

      # necessary for bleve
      - MM_BLEVESETTINGS_INDEXDIR

      # additional settings
      - MM_SERVICESETTINGS_SITEURL
    ports:
      - 8443:8443/udp
streamer45 commented 2 years ago

Is your MM server running locally or on some hosting provider (e.g. AWS)?

florius0 commented 2 years ago

On VPS

streamer45 commented 2 years ago

Okay good, so I assume it has a publicly reachable IP. Is there any firewall/NAT on top that you may have to open up perhaps or does the network go straight into the box? There are ways to check if the UDP port is reachable, e.g. using netcat.

streamer45 commented 2 years ago

@florius0 Changes are in the latest release. Were you able to get this to work?

florius0 commented 2 years ago

I'll check it in an hour or two

florius0 commented 2 years ago

@florius0 Changes are in the latest release. Were you able to get this to work?

It works!