Track event never gets called

I am implementing RTCPeerConnection in React Native app using plain WebSocket

I am registering the following events inside the “onmessage” callback of Web Socket
addEventListener( ‘icegatheringstatechange’)
addEventListener(‘track’)

‘icegatheringstatechange’ state successfully changes to ‘complete’ status and I am able to set the localDescription and also send back an answer to the remote server.

Remote Server receives the answer, validates it successfully and provided back an event.

But my ‘track’ event listener never gets called . No idea why. Is ‘track’ event listner not implemented in react-native-webrtc@1.106.1 ?

What could be the reasons that ‘track’ event listener doesn’t get called ?

This is my npm list result

±- @babel/core@7.25.2
±- @babel/runtime@7.25.6
±- @react-native-community/eslint-config@3.2.0
±- babel-jest@29.7.0
±- eslint@8.57.0
±- jest@29.7.0
±- metro-react-native-babel-preset@0.74.1
±- react-native-incall-manager@4.0.1
±- react-native-svg@13.14.1
±- react-native-webrtc@1.106.1
±- react-native@0.68.2
±- react-test-renderer@17.0.2
±- react@17.0.2
`-- socket.io-client@4.7.5

I was able to solve this problem by starting from scratch and installing a latest Native React App and moving all my code to there. Track event is implemented in react-native-webrtc@124.0.4