mediasoup-client-swift icon indicating copy to clipboard operation
mediasoup-client-swift copied to clipboard

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

Open NSCodeRover opened this issue 1 year ago • 6 comments

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

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

NSCodeRover avatar Mar 15 '24 03:03 NSCodeRover

I also encountered the same problem

spencexu avatar Apr 02 '24 01:04 spencexu

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
rtc::scoped_refptr<webrtc::DataChannelInterface> 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 avatar May 21 '24 23:05 levs42

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

levs42 avatar May 22 '24 21:05 levs42

Also getting this. Crash on any new consumer.

CWftw avatar Jun 05 '24 20:06 CWftw

Getting this error on call of onProduce when sctpParameters are set to nil Also onConnectionStateChange(transport: Transport, connectionState: TransportConnectionState) is never returning anything?

sharukmsd avatar Dec 11 '24 11:12 sharukmsd

Also getting this. Crash on any new consumer.

Did you find any solution?

sharukmsd avatar Dec 11 '24 11:12 sharukmsd