VLprojects / mediasoup-client-swift

Swift wrapper for libmediasoupclient
MIT License
46 stars 19 forks source link

libc++abi: terminating with uncaught exception of type MediaSoupClientError: Failed creating data channel #28

Open NSCodeRover opened 8 months ago

NSCodeRover commented 8 months ago

libc++abi: terminating with uncaught exception of type MediaSoupClientError: Failed creating data channel

with m120 while create transport even if sctp parameter set nil.

spencexu commented 8 months ago

I also encountered the same problem

levs42 commented 6 months ago

I have the same issue. Updated from m112 ffbb6f4641db97b89a349a096baaf8163e763fd7 to m120 8a486a2187951dec1dcc68f2f257fdcd2cad812c. The exception is:

libc++abi: terminating due to uncaught exception of type MediaSoupClientError: Failed creating data channel

Triggered from webrtc sdp_offer_answer.cc:2404

observer->OnSetLocalDescriptionComplete(RTCError::OK());

Which doesn't make sense to me because it looks like OK error and should return true from error.ok(). Anyway here's the part of mediasoup that triggers the error:

PeerConnection.cpp ```c++ rtc::scoped_refptr PeerConnection::CreateDataChannel( const std::string& label, const webrtc::DataChannelInit* config) { MSC_TRACE(); const auto result = this->pc->CreateDataChannelOrError(label, config); if (result.ok()) { MSC_DEBUG("Success creating data channel"); } else { MSC_THROW_ERROR("Failed creating data channel"); } return result.value(); } ```

Happens every time I try to create a video producer:

try sendTransport.createProducer(
    for: videoTrack,
    encodings: nil,
    codecOptions: options, // ["videoGoogleStartBitrate": 1000]
    codec: nil,
    appData: nil
    )

Will appreciate any help.

levs42 commented 6 months ago

Found the issue, it's this call. It shouldn't throw because ok() is true. It's fixed in the upstream.

@fedulvtubudul could you please sync libmediasoupclient? Thanks

CWftw commented 5 months ago

Also getting this. Crash on any new consumer.