Jump to content
  • 0

React Native SDK - Errors with sample code: WebRTC ingest is not started, undefined is not a function at addStream


Cosmo Kramer
 Share

Question

Hi, I'm using the sample code from https://github.com/ant-media/WebRTC-React-Native-SDK/blob/main/samples/publish/src/App.tsx

When I try to start publishing, I get this error:

startPublishing error undefined is not a function TypeError: undefined is not a function at addStream

Here's the server logs using AMS EE

2022-11-18 19:19:27,671 [https-jsse-nio2-0.0.0.0-5443-exec-6] INFO  i.a.e.s.WebSocketLocalHandler - Web Socket opened session:66 user-agent:[okhttp/4.9.2]
2022-11-18 19:23:04,268 [vert.x-eventloop-thread-0] INFO  i.antmedia.statistic.StatsCollector - System cpu load:0 process cpu load:0 available memory: 6897900 KB used memory(RSS): 772868 KB
2022-11-18 19:23:04,268 [vert.x-eventloop-thread-0] INFO  i.antmedia.statistic.StatsCollector - Vertx worker queue size:0 WebRTCVertx worker queue size:0
2022-11-18 19:23:09,020 [https-jsse-nio2-0.0.0.0-5443-exec-4] INFO  i.a.e.w.c.VirtualVideoEncoderFactory - Adding H264 Encoder to the supported codecs
2022-11-18 19:23:09,021 [https-jsse-nio2-0.0.0.0-5443-exec-4] INFO  io.antmedia.muxer.MuxAdaptor - serverSettings exist io.antmedia.settings.ServerSettings@76d0dcdb
2022-11-18 19:23:19,031 [vert.x-eventloop-thread-3] WARN  i.a.e.adaptive.WebRTCEncoderAdaptor - WebRTC ingest is not started. So publish timeout is firing for stream: streamTest1
2022-11-18 19:23:19,031 [vert.x-eventloop-thread-3] ERROR i.a.e.w.WebRTCPublishStreamInfoListener - Publish timeout error for stream:streamTest1
2022-11-18 19:23:19,032 [vert.x-eventloop-thread-3] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - entering stop() for streamTest1 stopCompetely:true
2022-11-18 19:23:19,032 [vert.x-eventloop-thread-3] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - Entering the releasing resources for streamId: streamTest1
2022-11-18 19:23:19,032 [vert.x-eventloop-thread-3] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - shutdownInternalPeerConnection for stream: streamTest1 
2022-11-18 19:23:19,032 [vert.x-eventloop-thread-3] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - running stop operations in executor for stream: streamTest1 Received audio frame: 0  Processed audio frame: 0Received video frame: 0  Processed video frame: 0
2022-11-18 19:23:19,032 [vert.x-eventloop-thread-3] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - Publish Stats StreamId: streamTest1 TransferedByte: 0 Stream Duration: 1668799399032 Bitrate: 0 Source IP: null User-Agent: [okhttp/4.9.2]
2022-11-18 19:23:19,032 [vert.x-eventloop-thread-3] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - leaving stop() for streamTest1
2022-11-18 19:23:19,032 [vert.x-eventloop-thread-3] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - WebRTCEncoderAdaptor recording is already stopped for stream:streamTest1
2022-11-18 19:23:19,032 [vert.x-eventloop-thread-3] INFO  i.a.AntMediaApplicationAdapter - Closing broadcast stream id: streamTest1

If it matters, I am using a virtual Android device to develop.

Link to comment
Share on other sites

  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

2 answers to this question

Recommended Posts

  • 0
17 hours ago, Cosmo Kramer said:

I believe my AWS Application Load Balancer is not forwarding the UDP traffic to my EC2 target group.

I will configure rules to forward traffic on those ports and see if it works.

Hi @Cosmo Kramer,

How are you?

Thank you for posting this issue here.

Can you please check if the UDP port range 50000-60000 is open on the AWS security group.

 

Thank you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...