Cosmo Kramer Posted November 18, 2022 Share Posted November 18, 2022 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 More sharing options...
0 Cosmo Kramer Posted November 18, 2022 Author Share Posted November 18, 2022 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. Link to comment Share on other sites More sharing options...
0 Mohit Posted November 19, 2022 Share Posted November 19, 2022 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 More sharing options...
0 Shin Posted March 30 Share Posted March 30 Hi. I am having the same issue. I followed everything as explained in the sample app. Was anyone able to solve it? Thanks Link to comment Share on other sites More sharing options...
0 frank Posted April 10 Share Posted April 10 (edited) Yes actually I had the same problem too. For me it turned out to be version of react-native-webrtc in my project I initially did npm i react-native-webrtc. Then looking in package.json I could see react-native-webrtc": "^111.0.0In the sample publish application the version of react-native-webrtc is 1.100.1 (completely different). So I simply updated my package.json to react-native-webrtc": "^1.100.1ran npm i again - and the issue has gone away. Hope this helps Edited April 10 by frank spelling errors Link to comment Share on other sites More sharing options...
Question
Cosmo Kramer
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
Top Posters For This Question
2
1
1
1
Popular Days
Nov 18
2
Nov 19
1
Mar 30
1
Apr 10
1
Top Posters For This Question
Cosmo Kramer 2 posts
Mohit 1 post
Shin 1 post
frank 1 post
Popular Days
Nov 18 2022
2 posts
Nov 19 2022
1 post
Mar 30 2023
1 post
Apr 10 2023
1 post
4 answers to this question
Recommended Posts