# Track event never gets called

**URL:** <https://react-native-webrtc.discourse.group/t/track-event-never-gets-called/2048>\
**Category:** Help\
**Created:** [September 3, 2024, 2:46pm UTC](https://react-native-webrtc.discourse.group/t/track-event-never-gets-called/2048 "2024-09-03T14:46:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nagaK](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/nagak/32/847_2.png) [@nagaK](https://react-native-webrtc.discourse.group/u/nagaK)\
**Post date:** [September 3, 2024, 2:46pm UTC](https://react-native-webrtc.discourse.group/t/track-event-never-gets-called/2048/1 "2024-09-03T14:46:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nagaK](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/nagak/32/847_2.png) [@nagaK](https://react-native-webrtc.discourse.group/u/nagaK)\
**Post date:** [September 3, 2024, 7:12pm UTC](https://react-native-webrtc.discourse.group/t/track-event-never-gets-called/2048/2 "2024-09-03T19:12:09Z")

</div>

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`
