# Possible Unhandled Promise Rejection Android

**URL:** <https://react-native-webrtc.discourse.group/t/possible-unhandled-promise-rejection-android/1888>\
**Category:** Android\
**Created:** [November 4, 2023, 2:30pm UTC](https://react-native-webrtc.discourse.group/t/possible-unhandled-promise-rejection-android/1888 "2023-11-04T14:30:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xepobopa](https://avatars.discourse-cdn.com/v4/letter/x/5f8ce5/32.png) [@Xepobopa](https://react-native-webrtc.discourse.group/u/Xepobopa)\
**Post date:** [November 4, 2023, 2:30pm UTC](https://react-native-webrtc.discourse.group/t/possible-unhandled-promise-rejection-android/1888/1 "2023-11-04T14:30:52Z")

</div>

Hello! I’m new in webrtrc. I try to make a text messanger by webrtc. It seems everything goes well, but i get this errors:

```auto
Possible Unhandled Promise Rejection (id: 20):
TypeError: `sdpMLineIndex` and `sdpMid` must not null
TypeError: `sdpMLineIndex` and `sdpMid` must not null

```

and

```auto
Possible Unhandled Promise Rejection (id: 21):
Error: Failed to set local answer sdp: Called in wrong state: stable
Error: Failed to set local answer sdp: Called in wrong state: stable

```

The problem is that is have `sdpMLineIndex` and `sdpMid` not null:  
candidate:

```auto
candidate: {
    candidate: 'candidate:3313900500 1 udp 2122056191 fec0::31f2:2509:baf9:ebb1 42098 typ host generation 0 ufrag PXQq network-id 2 network-cost 900',
    sdpMLineIndex: 0,
    sdpMid: '0'
}

```

Also i’d appriciate if someone will tell how to start webrtc logs on Android

Also my code: [GitHub - Xepobopa/chat-webrtc](https://github.com/Xepobopa/chat-webrtc.git)
