question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] dataChannelDidChangeState crash

See original GitHub issue

Hello, after this PR https://github.com/react-native-webrtc/react-native-webrtc/pull/919 (issue https://github.com/react-native-webrtc/react-native-webrtc/issues/917) I have a crash when a connection is made. Specifically the crash occurs in dataChannelDidChangeState in RTCDataChannel.m : a NSDictionnary is created with the channel id but channel.originDataChannelId can be null. Note that it doesn’t always happen so it looks like a race condition.

Expected behavior

Connecting to a peer should not make the app crash randomly on iOS.

Platform information

  • React Native version: 0.63.4
  • Plugin version: 1.89.1
  • OS: iOS
  • OS version: 14

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
saghulcommented, May 10, 2021

I have a started the refactor for fixing this, hopefully I can have a PR tomorrow.

2reactions
saghulcommented, May 19, 2021

The PR is now ready and the test @ibc posted works just fine. I also fixed some more corner cases when closing datachannels.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - [iOS] dataChannelDidChangeState crash -
Specifically the crash occurs in dataChannelDidChangeState in RTCDataChannel.m : a NSDictionnary is created with the channel id but channel.originDataChannelId ...
Read more >
iOS 16.1.2 has arrived, and it's focused on the crash detection ...
Crash Detection is a newly introduced feature that can notify emergency services when the phone's internal sensors have detected that you've ...
Read more >
didOpenDataChannel never called, RTCDataChannel not ...
If I try to create another data channel with the same identifier the app crashes; so I think it really creates the data...
Read more >
DataChannel Webrtc IOS - Google Groups
The dataChannelDidChangeState method is called. It is called before the ice connection is connected or completed. The data channel state is going from...
Read more >
iOS 15 dyld Crash | Apple Developer Forums
I get a lot of crashlogs in the Xcode organizer on iOS 15 all related to dyld. ... OS Version: iPhone OS 15.0...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found