React native + lib-jitsi-meet - audio/video tracks not getting added to the conference

Firstly, thanks to the entire Jitsi team and the community for such an awesome project.

We are trying to create a react native mobile app for Jitsi from scratch using lib-jitsi-meet api and we have a self-hosted jitsi-meet on AWS server and we followed quick-install guide. For the purpose of this post, the URL is https://jitsimeet.example.com.

In the react native app, we are able to join a conference called test1 using JitsiMeetJS.initJitsiConference. Once joined, the user is visible as “Fellow Jitster” on the browser at jitsimeet.example.com/test1 but the tracks(video/audio) we are adding to the conference(from react native mobile app) are not visible and in the browser and it just says “Participant has stopped the camera” and “Participant is muted”.

We have tried meet.jit.si & beta.meet.jit.si in our react native app to see if the problem is related to our backend installation. But these were also not working.

We have also tried the same conference jitsimeet.example.com/test1 on the browser and in jitsi-meet mobile app and they are both working fine without any issues.

We have also set up jitsi-meet repository locally. On running the react-native part on android emulator, it is working fine(both joining the conference & rendering the audio/video tracks).

From the above observations, it seems to be that the issue is coming from our implementation of react native app.

Our code for the component that initiates the conference can be found here. Here you can find the link to our repo. To run it, just do npm i and npx react-native run-android. We are using polyfills in our react-native code as given in the jitsi-meet repository.

In the logs of jicofo on our server,

We were able to see that when users join via web or jitsi-meet mobile app, we are getting

org.jitsi.jicofo.ParticipantChannelAllocator.log() Sending session-initiate to: test1@conference.jitsimeet.example.com/2502e6ad
org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Got session-accept from: test1@conference.jitsimeet.example.com/2502e6ad
org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Received session-accept from test1@conference.jitsimeet.example.com/2502e6ad with accepted sources:Sources{ video: [ssrc=467278592 ssrc=2301072636 ssrc=839807103 ssrc=3616291734 ssrc=2331517151 ssrc=3181098946 ] audio: [ssrc=2795704819 ] }@2129717334

whereas when we join via our react native app, we are only getting

org.jitsi.jicofo.ParticipantChannelAllocator.log() Sending session-initiate to: test1@conference.jitsimeet.example.com/946022e6

Just to provide more information which might be relevant

On the client side, we are adding tracks after CONFERENCE_JOINED event is fired, then, we are getting the following logs

[JitsiConference.js] _doReplaceTrack - no JVB JingleSession
[JitsiConference.js] _doReplaceTrack - no P2P JingleSession

As mentioned above, we can join the conference from our react native app and we are getting CONFERENCE_JOINED, USER_JOINED, USER_LEFT events.

The TRACK_ADDED event is also firing locally right after adding local tracks. But it is not firing for any video/desktop-sharing/audio changes occurring on other remote clients(web browser or jitsi-meet mobile app).

We have spent a week trying to fix this issue without any breakthroughs so far. Any guidance on this is greatly appreciated.

Thank you.

1 Like

@damencho @saghul

After further investigation, we found that there is an issue occurring when jingle session is being initialized in lib-jitsi-meet.

After Jicofo sends session-initiate, in the file JitsiConference.js, in the function JitsiConference.prototype._acceptJvbIncomingCall, when jingleSession.initialize is being called, is throwing the following error:

{
    "error": [TypeError: undefined is not an object (evaluating 'eventTarget[LISTENERS][type]')],
    "message": "undefined is not an object (evaluating 'eventTarget[LISTENERS][type]')",
    "name": "TypeError",
    "stack": "setAttributeListener@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:110008:38
set@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:110051:31
_RTCPeerConnection@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:111610:9
R@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:183673:687
createPeerConnection@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:167562:30
doInitialize@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:172093:105
initialize@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:182236:79
_acceptJvbIncomingCall@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:176712:30
onIncomingCall@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:176694:40
[native code]
emit@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:168799:38
onJingle@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:181297:216
onJingle@[native code]
run@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:164553:33
http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:164807:78
forEachChild@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:164255:88
_dataRecv@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:164799:33
_dataRecv@[native code]
_onRequestStateChange@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:165337:285
_onRequestStateChange@[native code]
bound _onRequestStateChange@[native code]
dispatchEvent@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:34489:31
setReadyState@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:33558:27
__didCompleteResponse@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:33400:29
emit@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3702:42
__callFunction@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3030:49
http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:2752:31
__guard@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:2984:15
callFunctionReturnFlushedQueue@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:2751:21
callFunctionReturnFlushedQueue@[native code]"}

We don’t know if this is an issue that we are somehow causing because in the jitsi-meet official react native app, jingle session is being initialized without any problem.

We are also including the entire frontend log here. The log also has the parameters that were used by jingleSession.initialize.

If you have some time, please guide us on what needs to be done to resolve this issue.