Error when publishing video

Hello

We are trying to upgrade our client implementation to use openvidu 2.20. It is using Microsoft WebRTC library in Unity.
There is an exception raised when publishing a video, could you tell from the log if there is something obvious missing?

Best regards,
Nicolas

[INFO] 2021-10-06 12:36:41,302 [http-nio-0.0.0.0-5443-exec-5] io.openvidu.server.rest.SessionRestController - REST API: GET /openvidu/api/sessions
[INFO] 2021-10-06 12:39:16,140 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.rest.SessionRestController - REST API: GET /openvidu/api/sessions
[INFO] 2021-10-06 12:43:47,554 [http-nio-0.0.0.0-5443-exec-6] io.openvidu.server.rest.SessionRestController - REST API: GET /openvidu/api/sessions
[INFO] 2021-10-06 12:43:52,131 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.config.HttpHandshakeInterceptor - New HttpSession A2DF6CE56F2D403B369E6F8FFF4642E5
[INFO] 2021-10-06 12:47:25,572 [Timer-0] io.openvidu.server.core.SessionManager - Running non active sessions garbage collector...
[INFO] 2021-10-06 12:50:52,905 [http-nio-0.0.0.0-5443-exec-10] io.openvidu.server.rest.SessionRestController - REST API: GET /openvidu/api/sessions
[INFO] 2021-10-06 12:51:00,796 [http-nio-0.0.0.0-5443-exec-1] io.openvidu.server.config.HttpHandshakeInterceptor - New HttpSession EEFC85E12FC558F1BBA6468FBE1A73B3
[INFO] 2021-10-06 12:51:57,728 [http-nio-0.0.0.0-5443-exec-3] io.openvidu.server.rest.SessionRestController - REST API: GET /openvidu/api/sessions
[INFO] 2021-10-06 12:52:04,633 [http-nio-0.0.0.0-5443-exec-4] io.openvidu.server.config.HttpHandshakeInterceptor - New HttpSession 92B37FEFBC239A3D032CDC3E5E17090C
[INFO] 2021-10-06 12:54:13,479 [http-nio-0.0.0.0-5443-exec-7] io.openvidu.server.rest.SessionRestController - REST API: GET /openvidu/api/sessions
[INFO] 2021-10-06 12:54:16,785 [http-nio-0.0.0.0-5443-exec-6] io.openvidu.server.rest.SessionRestController - REST API: POST /openvidu/api/sessions {customSessionId=TestWebcam}
[INFO] 2021-10-06 12:54:16,786 [http-nio-0.0.0.0-5443-exec-6] io.openvidu.server.rest.SessionRestController - New session TestWebcam created [TestWebcam]
[INFO] 2021-10-06 12:54:20,717 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.rest.SessionRestController - REST API: POST /openvidu/api/sessions/TestWebcam/connection {type=WEBRTC, role=PUBLISHER}
[INFO] 2021-10-06 12:54:20,717 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.coturn.CoturnCredentialsService - Creating COTURN user
[INFO] 2021-10-06 12:54:20,776 [http-nio-0.0.0.0-5443-exec-8] io.openvidu.server.coturn.CoturnCredentialsService - COTURN user created: true
[INFO] 2021-10-06 12:54:24,400 [http-nio-0.0.0.0-5443-exec-9] io.openvidu.server.config.HttpHandshakeInterceptor - New HttpSession CF3D6297710EB213D89BB9B8461EC0E6
[INFO] 2021-10-06 12:54:24,579 [http-nio-0.0.0.0-5443-exec-10] io.openvidu.server.rpc.RpcHandler - After connection established for WebSocket session: 7q4ll84b2vc592kftps19bcq9n
[INFO] 2021-10-06 12:54:24,584 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.coturn.CoturnCredentialsService - Creating COTURN user
[INFO] 2021-10-06 12:54:24,626 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.coturn.CoturnCredentialsService - COTURN user created: true
[INFO] 2021-10-06 12:54:24,627 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.core.SessionManager - Participant con_EhL1pBZFCt of session TestWebcam is a final user connecting to this session for the first time
[INFO] 2021-10-06 12:54:24,627 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - New Connection con_EhL1pBZFCt in Session TestWebcam with IP 189.194.177.64 and platform Chrome 76.0.3809.132 on Linux 64-bit
[INFO] 2021-10-06 12:54:24,627 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.kurento.core.KurentoSessionManager - KMS less loaded is ws://localhost:8888/kurento with a load of 1.0
[INFO] 2021-10-06 12:54:24,627 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.kurento.core.KurentoSessionManager - No session 'TestWebcam' exists yet. Created one on KMS 'media_IwbJsIw9' with ip 'localhost'
[INFO] 2021-10-06 12:54:24,628 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.kurento.core.KurentoSession - SESSION TestWebcam: Creating MediaPipeline
[INFO] 2021-10-06 12:54:24,633 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.kurento.core.KurentoSession - SESSION TestWebcam: Added participant [participantPrivateId=7q4ll84b2vc592kftps19bcq9n, participantPublicId=con_EhL1pBZFCt, streaming=false]
[INFO] 2021-10-06 12:54:26,705 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - Participant con_EhL1pBZFCt is calling method 'publish' in session TestWebcam
[INFO] 2021-10-06 12:54:26,706 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.core.SessionManager - The user with private id 7q4ll84b2vc592kftps19bcq9n is an INSECURE user
[INFO] 2021-10-06 12:54:26,706 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.utils.SDPMunging - [setCodecPreference] codec: VP8
[INFO] 2021-10-06 12:54:26,794 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.kurento.core.KurentoParticipant - PARTICIPANT con_EhL1pBZFCt: Request to publish video in room TestWebcam)
[INFO] 2021-10-06 12:54:26,808 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.kurento.core.KurentoParticipant - PARTICIPANT con_EhL1pBZFCt: Is now publishing video in room TestWebcam
[ERROR] 2021-10-06 12:54:26,811 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] org.kurento.jsonrpc.internal.JsonRpcHandlerManager - Exception while processing request {"id":3,"method":"publishVideo","params":{"sdpOffer":"v=0\r\no=- 5444391047458814203 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=msid-semantic: WMS\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 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:xkKy\r\na=ice-pwd:4wzjj+/UndU3aFkxevL9yABS\r\na=ice-options:trickle\r\na=fingerprint:sha-256 38:F4:04:56:70:F4:37:6D:8F:27:D5:60:13:A0:0A:5D:F8:00:B5:DE:C1:48:6E:F9:15:27:79:63:9A:5C:11:65\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendrecv\r\na=msid:- 14fb2b86-b59a-47bf-a39f-9c80d7b75dbf\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:102 ILBC/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:2940006186 cname:acdmoEv+fCzUybJy\r\na=ssrc:2940006186 msid: 14fb2b86-b59a-47bf-a39f-9c80d7b75dbf\r\na=ssrc:2940006186 mslabel:\r\na=ssrc:2940006186 label:14fb2b86-b59a-47bf-a39f-9c80d7b75dbf\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:xkKy\r\na=ice-pwd:4wzjj+/UndU3aFkxevL9yABS\r\na=ice-options:trickle\r\na=fingerprint:sha-256 38:F4:04:56:70:F4:37:6D:8F:27:D5:60:13:A0:0A:5D:F8:00:B5:DE:C1:48:6E:F9:15:27:79:63:9A:5C:11:65\r\na=setup:actpass\r\na=mid:1\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07\r\na=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendrecv\r\na=msid:- dea9b039-e12e-4234-92c2-de4902293fb9\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 x-google-profile-id=0\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:100 multiplex/90000\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=fmtp:100 acn=VP9;x-google-profile-id=0\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:127 red/90000\r\na=rtpmap:124 rtx/90000\r\na=fmtp:124 apt=127\r\na=rtpmap:125 ulpfec/90000\r\na=ssrc-group:FID 4089599385 286718638\r\na=ssrc:4089599385 cname:acdmoEv+fCzUybJy\r\na=ssrc:4089599385 msid: dea9b039-e12e-4234-92c2-de4902293fb9\r\na=ssrc:4089599385 mslabel:\r\na=ssrc:4089599385 label:dea9b039-e12e-4234-92c2-de4902293fb9\r\na=ssrc:286718638 cname:acdmoEv+fCzUybJy\r\na=ssrc:286718638 msid: dea9b039-e12e-4234-92c2-de4902293fb9\r\na=ssrc:286718638 mslabel:\r\na=ssrc:286718638 label:dea9b039-e12e-4234-92c2-de4902293fb9\r\n","doLoopback":false,"hasAudio":false,"hasVideo":true,"audioActive":false,"videoActive":true,"typeOfVideo":"CAMERA","frameRate":30,"videoDimensions":"{\"width\":640,\"height\":480}"},"jsonrpc":"2.0"}
java.lang.NullPointerException: null
	at io.openvidu.server.core.Session.registerPublisher(Session.java:156)
	at io.openvidu.server.kurento.core.KurentoSession.newPublisher(KurentoSession.java:96)
	at io.openvidu.server.kurento.core.KurentoSessionManager.publishVideo(KurentoSessionManager.java:495)
	at io.openvidu.server.rpc.RpcHandler.publishVideo(RpcHandler.java:343)
	at io.openvidu.server.rpc.RpcHandler.handleRequest(RpcHandler.java:125)
	at org.kurento.jsonrpc.internal.JsonRpcHandlerManager.handleRequest(JsonRpcHandlerManager.java:142)
	at org.kurento.jsonrpc.internal.server.ProtocolManager$3.run(ProtocolManager.java:218)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
[INFO] 2021-10-06 12:54:26,889 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t14] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChange]: -> endpoint: str_CAM_Raxg_con_EhL1pBZFCt (publisher) | state: GATHERING | componentId: 1 | streamId: 1 | timestamp: 1633524866823
[INFO] 2021-10-06 12:54:26,906 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t18] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChange]: -> endpoint: str_CAM_Raxg_con_EhL1pBZFCt (publisher) | state: GATHERING | componentId: 2 | streamId: 1 | timestamp: 1633524866836
[INFO] 2021-10-06 12:54:27,568 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - Participant con_EhL1pBZFCt is calling method 'onIceCandidate' in session TestWebcam
[INFO] 2021-10-06 12:54:27,568 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_EhL1pBZFCt: {connectionId: "con_EhL1pBZFCt", sdpMid: 0, sdpMLineIndex: 0, candidate: "candidate:1035424534 1 udp 2122260223 192.168.15.201 57687 typ host generation 0 ufrag xkKy network-id 1"}
[INFO] 2021-10-06 12:54:27,572 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t18] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChange]: -> endpoint: str_CAM_Raxg_con_EhL1pBZFCt (publisher) | state: CONNECTING | componentId: 1 | streamId: 1 | timestamp: 1633524867571
[INFO] 2021-10-06 12:54:28,328 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - Participant con_EhL1pBZFCt is calling method 'onIceCandidate' in session TestWebcam
[INFO] 2021-10-06 12:54:28,328 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_EhL1pBZFCt: {connectionId: "con_EhL1pBZFCt", sdpMid: 1, sdpMLineIndex: 1, candidate: "candidate:1035424534 1 udp 2122260223 192.168.15.201 57688 typ host generation 0 ufrag xkKy network-id 1"}
[INFO] 2021-10-06 12:54:28,524 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - Participant con_EhL1pBZFCt is calling method 'onIceCandidate' in session TestWebcam
[INFO] 2021-10-06 12:54:28,524 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_EhL1pBZFCt: {connectionId: "con_EhL1pBZFCt", sdpMid: 0, sdpMLineIndex: 0, candidate: "candidate:4047137925 1 udp 1686052607 189.194.177.64 57687 typ srflx raddr 192.168.15.201 rport 57687 generation 0 ufrag xkKy network-id 1"}
[INFO] 2021-10-06 12:54:28,732 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - Participant con_EhL1pBZFCt is calling method 'onIceCandidate' in session TestWebcam
[INFO] 2021-10-06 12:54:28,732 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_EhL1pBZFCt: {connectionId: "con_EhL1pBZFCt", sdpMid: 1, sdpMLineIndex: 1, candidate: "candidate:4047137925 1 udp 1686052607 189.194.177.64 57688 typ srflx raddr 192.168.15.201 rport 57688 generation 0 ufrag xkKy network-id 1"}
[INFO] 2021-10-06 12:54:28,859 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t18] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceGatheringDone] -> endpoint: str_CAM_Raxg_con_EhL1pBZFCt (publisher) | timestamp: 1633524868858
[INFO] 2021-10-06 12:54:28,892 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - Participant con_EhL1pBZFCt is calling method 'onIceCandidate' in session TestWebcam
[INFO] 2021-10-06 12:54:28,892 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_EhL1pBZFCt: {connectionId: "con_EhL1pBZFCt", sdpMid: 0, sdpMLineIndex: 0, candidate: "candidate:1932832742 1 tcp 1518280447 192.168.15.201 59074 typ host tcptype passive generation 0 ufrag xkKy network-id 1"}
[INFO] 2021-10-06 12:54:28,911 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - Participant con_EhL1pBZFCt is calling method 'onIceCandidate' in session TestWebcam
[INFO] 2021-10-06 12:54:28,911 [SessionHandler-7q4ll84b2vc592kftps19bcq9n-e6-t0] io.openvidu.server.rpc.RpcHandler - New candidate received from participant con_EhL1pBZFCt: {connectionId: "con_EhL1pBZFCt", sdpMid: 1, sdpMLineIndex: 1, candidate: "candidate:1932832742 1 tcp 1518280447 192.168.15.201 59075 typ host tcptype passive generation 0 ufrag xkKy network-id 1"}
[INFO] 2021-10-06 12:54:35,957 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t18] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChange]: -> endpoint: str_CAM_Raxg_con_EhL1pBZFCt (publisher) | state: FAILED | componentId: 1 | streamId: 1 | timestamp: 1633524875955
[INFO] 2021-10-06 12:54:38,975 [jsonrpcTaskScheduler-1] io.openvidu.server.rpc.RpcHandler - After connection closed for WebSocket session: 7q4ll84b2vc592kftps19bcq9n - Status: null
[INFO] 2021-10-06 12:54:38,975 [jsonrpcTaskScheduler-1] io.openvidu.server.rpc.RpcNotificationService - Closed rpc session for participant with private id 7q4ll84b2vc592kftps19bcq9n
[INFO] 2021-10-06 12:54:38,975 [jsonrpcTaskScheduler-1] io.openvidu.server.rpc.RpcNotificationService - <PRIVATE_ID, RPC_CONNECTION>: {}
[INFO] 2021-10-06 12:54:38,975 [jsonrpcTaskScheduler-1] io.openvidu.server.rpc.RpcHandler - Evicting participant with private id 7q4ll84b2vc592kftps19bcq9n because its websocket unexpectedly closed in the client side
[INFO] 2021-10-06 12:54:38,976 [jsonrpcTaskScheduler-1] io.openvidu.server.kurento.core.KurentoSessionManager - Request [LEAVE_ROOM] for participant con_EhL1pBZFCt of session TestWebcam with reason networkDisconnect
[INFO] 2021-10-06 12:54:38,976 [jsonrpcTaskScheduler-1] io.openvidu.server.kurento.core.KurentoSession - PARTICIPANT con_EhL1pBZFCt: Leaving session TestWebcam
[ERROR] 2021-10-06 12:54:38,976 [jsonrpcTaskScheduler-1] io.openvidu.server.rpc.RpcHandler - Uncaught exception for WebSocket session: 7q4ll84b2vc592kftps19bcq9n - Exception: {}
java.lang.NullPointerException: null
	at io.openvidu.server.core.Session.deregisterPublisher(Session.java:163)
	at io.openvidu.server.kurento.core.KurentoParticipant.releasePublisherEndpointAux(KurentoParticipant.java:529)
	at io.openvidu.server.kurento.core.KurentoParticipant.releasePublisherEndpoint(KurentoParticipant.java:506)
	at io.openvidu.server.kurento.core.KurentoParticipant.close(KurentoParticipant.java:393)
	at io.openvidu.server.kurento.core.KurentoSession.leave(KurentoSession.java:130)
	at io.openvidu.server.kurento.core.KurentoSessionManager.leaveRoom(KurentoSessionManager.java:226)
	at io.openvidu.server.kurento.core.KurentoSessionManager.evictParticipant(KurentoSessionManager.java:807)
	at io.openvidu.server.rpc.RpcHandler.leaveRoomAfterConnClosed(RpcHandler.java:699)
	at io.openvidu.server.rpc.RpcHandler.afterConnectionClosed(RpcHandler.java:752)
	at org.kurento.jsonrpc.internal.JsonRpcHandlerManager.afterConnectionClosed(JsonRpcHandlerManager.java:65)
	at org.kurento.jsonrpc.internal.server.ProtocolManager.closeSession(ProtocolManager.java:446)
	at org.kurento.jsonrpc.internal.server.ProtocolManager$4.run(ProtocolManager.java:421)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

You have a NullPointer exactly at https://github.com/OpenVidu/openvidu/blob/v2.20.0/openvidu-server/src/main/java/io/openvidu/server/core/Session.java#L156

Make sure property record is available. That property was added time ago. It is defined at ConnectionProperties (https://github.com/OpenVidu/openvidu/blob/3634a5c8e3dc5079baadc03ae170962fc0beaf6a/openvidu-java-client/src/main/java/io/openvidu/java/client/ConnectionProperties.java#L15)

That’s the response of the joinroom :

{"id":1,"result":{"id":"con_FDUcKH023P",
"finalUserId":"B898B0B03CD252C4",
"createdAt":1633536857363,
"metadata":"{clientData: TestClient}",
"value":],
"session":"TestWebcam","version":"2.20.0","mediaServer":"kurento","coturnIp":"23.97.200.7","turnUsername":"F1G1CI","turnCredential":"9yjsbm","sessionId":"luecllou7jo50nd49a15576d14"},
"jsonrpc":"2.0"}

Should it contain the record property?

Yes, as the RPC documentation states: OpenVidu Server RPC protocol - OpenVidu Docs

Thank you for your support, I guess we are missing something then. Here are the steps that we are following:

  • Get the sessions
  • If our Session does not exist, create it
post  https://demos.openvidu.io/openvidu/api/sessions {"customSessionId": "TestWebcam"}
  • server answers something like
{
	"id": "TestWebcam",
	"object": "session",
	"sessionId": "TestWebcam",
	"createdAt": 1633597931131,
	"mediaMode": "ROUTED",
	"recordingMode": "MANUAL",
	"defaultRecordingProperties": {
		"name": "",
		"hasAudio": true,
		"hasVideo": true,
		"outputMode": "COMPOSED",
		"recordingLayout": "BEST_FIT",
		"resolution": "1280x720",
		"frameRate": 25,
		"shmSize": 536870912
	},
	"customSessionId": "TestWebcam",
	"connections": {
		"numberOfElements": 0,
		"content": []
	},
	"recording": false,
	"forcedVideoCodec": "VP8",
	"allowTranscoding": false
}
  • Create a connection
post https://demos.openvidu.io/openvidu/api/sessions/TestWebcam/connection
{
	"type": "WEBRTC",
	"data": "My Server Data",
	"record": true,
	"role": "PUBLISHER",
	"kurentoOptions": {
		"videoMaxRecvBandwidth": 1000,
		"videoMinRecvBandwidth": 300,
		"videoMaxSendBandwidth": 1000,
		"videoMinSendBandwidth": 300,
		"allowedFilters": [
			"GStreamerFilter",
			"ZBarFilter"
		]
	}
}
  • server answers (apparently record field is present)
{
	"id": "con_Vjq28EJR4X",
	"object": "connection",
	"status": "pending",
	"connectionId": "con_Vjq28EJR4X",
	"sessionId": "TestWebcam",
	"createdAt": 1633598290077,
	"type": "WEBRTC",
	"record": true,
	"role": "PUBLISHER",
	"kurentoOptions": {
		"videoMaxRecvBandwidth": 1000,
		"videoMinRecvBandwidth": 300,
		"videoMaxSendBandwidth": 1000,
		"videoMinSendBandwidth": 300,
		"allowedFilters": [
			"GStreamerFilter",
			"ZBarFilter"
		]
	},
	"rtspUri": null,
	"adaptativeBitrate": null,
	"onlyPlayWithSubscribers": null,
	"networkCache": null,
	"serverData": "My Server Data",
	"token": "wss://demos.openvidu.io?sessionId=TestWebcam&token=tok_NtdNCbRg8KdPQ6vm&webrtcStatsInterval=30&sendBrowserLogs=debug_app",
	"activeAt": null,
	"location": null,
	"ip": null,
	"platform": null,
	"clientData": null,
	"publishers": null,
	"subscribers": null
}
  • create the web socket on wss://demos.openvidu.io/openvidu
  • start pinging to maintain the web socket
  • join room on rpc
{"jsonrpc": "2.0", "method": "joinRoom", "params": {"token": "wss://demos.openvidu.io?sessionId=TestWebcam&token=tok_NtdNCbRg8KdPQ6vm&webrtcStatsInterval=30&sendBrowserLogs=debug_app", "session": "TestWebcam", "platform": "Chrome 76.0.3809.132 on Linux 64-bit", "metadata": "{clientData: TestClient}", "secret": "MY_SECRET", "recorder": false}, "id": 1 }
  • servers answers on rpc
{"jsonrpc": "2.0", "method": "joinRoom", "params": {"token": "wss://demos.openvidu.io?sessionId=TestWebcam&token=tok_NtdNCbRg8KdPQ6vm&webrtcStatsInterval=30&sendBrowserLogs=debug_app", "session": "TestWebcam", "platform": "Chrome 76.0.3809.132 on Linux 64-bit", "metadata": "{clientData: TestClient}", "secret": "MY_SECRET", "recorder": false}, "id": 1 }
  • publish video
{"jsonrpc": "2.0","method": "publishVideo", "params": { "sdpOffer": "v=0
o=- 727590848858995954 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:IYV6
a=ice-pwd:V2hXQ5qAEuzeidx1McpsEF1E
a=ice-options:trickle
a=fingerprint:sha-256 5A:04:D3:FB:36:47:68:3C:45:B3:9F:03:2D:F7:88:4B:9D:BD:BF:0D:D1:07:E3:FA:5A:8E:27:CF:12:D1:45:9F
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:- 8bc48983-0339-4652-b961-7a9e54ec29b7
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:1631688989 cname:vVVDVpkdy7aic68y
a=ssrc:1631688989 msid: 8bc48983-0339-4652-b961-7a9e54ec29b7
a=ssrc:1631688989 mslabel:
a=ssrc:1631688989 label:8bc48983-0339-4652-b961-7a9e54ec29b7
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:IYV6
a=ice-pwd:V2hXQ5qAEuzeidx1McpsEF1E
a=ice-options:trickle
a=fingerprint:sha-256 5A:04:D3:FB:36:47:68:3C:45:B3:9F:03:2D:F7:88:4B:9D:BD:BF:0D:D1:07:E3:FA:5A:8E:27:CF:12:D1:45:9F
a=setup:actpass
a=mid:1
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:- 7d8ba6dd-0069-459a-8b85-e252c43f64c7
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 x-google-profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 multiplex/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 acn=VP9;x-google-profile-id=0
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 red/90000
a=rtpmap:124 rtx/90000
a=fmtp:124 apt=127
a=rtpmap:125 ulpfec/90000
a=ssrc-group:FID 1182672008 4014815930
a=ssrc:1182672008 cname:vVVDVpkdy7aic68y
a=ssrc:1182672008 msid: 7d8ba6dd-0069-459a-8b85-e252c43f64c7
a=ssrc:1182672008 mslabel:
a=ssrc:1182672008 label:7d8ba6dd-0069-459a-8b85-e252c43f64c7
a=ssrc:4014815930 cname:vVVDVpkdy7aic68y
a=ssrc:4014815930 msid: 7d8ba6dd-0069-459a-8b85-e252c43f64c7
a=ssrc:4014815930 mslabel:
a=ssrc:4014815930 label:7d8ba6dd-0069-459a-8b85-e252c43f64c7
","doLoopback": false,"hasAudio": false,"hasVideo": true,"audioActive": false,"videoActive": true,"typeOfVideo": "CAMERA","frameRate": 30,"videoDimensions": "{\"width\":640,\"height\":480}"}, "id": 3 }
  • sending some iceCandidate messages (I may provide them if necessary)
  • and that’s where we’re getting the publish video error notification
{"id":3,"error":{"code":-1,"message":"java.lang.NullPointerException:null","data":"java.lang.NullPointerException\n\tat io.openvidu.server.core.Session.registerPublisher(Session.java:156)\n\tat io.openvidu.server.kurento.core.KurentoSession.newPublisher(KurentoSession.java:96)\n\tat io.openvidu.server.kurento.core.KurentoSessionManager.publishVideo(KurentoSessionManager.java:495)\n\tat io.openvidu.server.rpc.RpcHandler.publishVideo(RpcHandler.java:343)\n\tat io.openvidu.server.rpc.RpcHandler.handleRequest(RpcHandler.java:125)\n\tat org.kurento.jsonrpc.internal.JsonRpcHandlerManager.handleRequest(JsonRpcHandlerManager.java:142)\n\tat org.kurento.jsonrpc.internal.server.ProtocolManager$3.run(ProtocolManager.java:218)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\n"},"jsonrpc":"2.0"}

We are hitting the wall there, any idea of what we are doing wrong?

Ok, with the discourse formatter I’ve seen a typing error in the publish video message on the videoDimensions object. So the error is not ocurring any more, but the local video is not published yet.

That’s moving forward :slight_smile:

Hello,

I seem to have a similar problem as I can’t seem to access the record property in the answer to my rpc join room message. When I use the body provided in https://docs.openvidu.io/en/stable/developing/rpc/#joinroom in my rpc join room message, regardless of whether I set the recorder property in the body to true, false or if I omit it entirely, I can’t get the record property in the answer. There is however some peculiar behaviour when I set the recorder property to true : the finalUserId property is no longer accessible in the answer and the result id becomes “RECODER”.

I have included below the answer from the join room message in all three cases. I would appreciate if you could shed some light on what exactly is happening here.

recorder property set to false
"{\"id\":1,\"result\":{\"id\":\"con_PM0uATiB1g\",\"finalUserId\":\"543EE6F4FF03E1F0\",\"createdAt\":1633944516705,\"metadata\":\"{clientData: TestClient}\",\"value\":[],\"session\":\"TestWebcam\",\"version\":\"2.20.0\",\"mediaServer\":\"kurento\",\"coturnIp\":\"13.77.218.47\",\"turnUsername\":\"116EEN\",\"turnCredential\":\"7vi9qz\",\"sessionId\":\"d7mil4j42mod8drslaalla8rqg\"},\"jsonrpc\":\"2.0\"}"

recorder property set to true
"{\"id\":1,\"result\":{\"id\":\"RECORDER\",\"createdAt\":1633944584685,\"metadata\":\"{clientData: TestClient}\",\"value\":[],\"session\":\"TestWebcam\",\"version\":\"2.20.0\",\"mediaServer\":\"kurento\",\"coturnIp\":\"13.77.218.47\",\"turnUsername\":\"XVMZAV\",\"turnCredential\":\"n8ibbh\",\"sessionId\":\"b74d5vqthk009e04u8oblv31un\"},\"jsonrpc\":\"2.0\"}"

recorder omitted
"{\"id\":1,\"result\":{\"id\":\"con_GjU4Qvt5wP\",\"finalUserId\":\"841338B244F4364B\",\"createdAt\":1633944737104,\"metadata\":\"{clientData: TestClient}\",\"value\":[],\"session\":\"TestWebcam\",\"version\":\"2.20.0\",\"mediaServer\":\"kurento\",\"coturnIp\":\"13.77.218.47\",\"turnUsername\":\"2TRHFL\",\"turnCredential\":\"rqstya\",\"sessionId\":\"knkh2cgkp66g8gvqkejkhjob\"},\"jsonrpc\":\"2.0\"}"

Thank you for your help.