react-native-webrtc icon indicating copy to clipboard operation
react-native-webrtc copied to clipboard

RN 0.73+ hidden compatibility issue: "Property 'addEventListener' does not exist on type 'RTCPeerConnection'"

Open dprevost-LMI opened this issue 8 months ago • 4 comments

The issue was first raised with this issue, but it was closed following a workaround using tsc change config, silencing the problem instead of fixing the root cause.

User @IanMolldrem in this comment reproduces the issue and provides a patch-alternative here that is scoped to the rn-webrtc package instead of relying on the tcs config change that affects your entire project.

Here is a copy of the post since it is the heart of this issue:

saghul Here's the sample project: https://github.com/IanMolldrem/WebRTCRepro

Just created a new RN project and installed this package and it is occurring as described.

Repro is evident through the TS errors here: https://github.com/IanMolldrem/WebRTCRepro/blob/main/App.tsx

The workaround detailed in my original issue description still works by uncommenting this: https://github.com/IanMolldrem/WebRTCRepro/blob/f6cb28305dbf0534259c43254ff3b80fc0f88ba7/tsconfig.json#L4

There was a mention about revisiting this issue as a potential fix, but I have no clue if it is the right approach!

dprevost-LMI avatar May 04 '25 15:05 dprevost-LMI

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 08 '25 03:07 stale[bot]

Please keep open

dprevost-LMI avatar Jul 08 '25 10:07 dprevost-LMI

this is a tough issue. Happily add @ts-ignore, but that took quite a bit of extra time to get going on this lib, when things are already complicated trying to figure it out.

AustinCase avatar Sep 05 '25 22:09 AustinCase

Will be addressed in a future update but you aren't wrong. Some things could be better and some issues can be annoying to resolve gracefully.

8BallBomBom avatar Sep 06 '25 22:09 8BallBomBom