# WebRTC examples not working (anymore)?

**URL:** <https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145>\
**Category:** Wowza Streaming Engine\
**Tags:** webrtc\
**Created:** [April 10, 2019, 3:45pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145 "2019-04-10T15:45:46Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stef\_van\_der\_Ziel](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@Stef\_van\_der\_Ziel](https://community.wowza.com/u/Stef_van_der_Ziel)\
**Post date:** [April 10, 2019, 3:45pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/1 "2019-04-10T15:45:46Z")

</div>

Hi,

we have done tests with Wowza and the WebRTC (preview) about 6 months ago. And that worked well. Now we want to implement this in the new Wowza 4.7.7 version, and the examples for publishing is not working anymore. I do get errors in Firefox and Chrome either running on Ubuntu or Windows 10.

So I have setup a **clean** Wowza from version 4.7.7 (So no upgrade from the preview version). Then I have configured WebRTC according to:

[https://www.wowza.com/docs/how-to-use-webrtc-with-wowza-streaming-engine](https://www.wowza.com/docs/how-to-use-webrtc-with-wowza-streaming-engine)

and that all works fine. Wowza is starting, and we are able to get the publish page in the browser. We are using the provided examples in the Wowza installation (so again, not the old preview examples)

There we fill out the form with the right values and press publish. And then the problems starts.

With firefox, we get a DOM exception like the following:

```auto
DOMException: "Failed to parse SDP: SDP Parse Error on line 19: Warning: Invalid token ordering detected, token b= found after token a=
SDP Parse Error on line 24: Warning: Invalid named events specified for fmtp attribute.
SDP Parse Error on line 37: Warning: Invalid token ordering detected, token b= found after token a=
SDP Parse Error on line 51: Warning: Invalid named events specified for fmtp attribute.
SDP Parse Error on line 53: Warning: Invalid named events specified for fmtp attribute.
SDP Parse Error on line 5: Only one token in fingerprint attribute
"

```

Followed by another error:

```auto
InvalidStateError: Cannot add ICE candidate in state have-local-offer

```

The second error is a result of the first, because the SDP parsing is failing, and therefore missing data or not yet ready to update ICE candidates.

With Chrome we get the following error on the same page:

```auto
Uncaught (in promise) DOMException: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Error processing ICE candidate

```

So it looks like both browsers are failing with almost the same error, so it looks like there is something not working.

While the examples with Wowza 4.7.5 and 4.7.6 did work. So with the WebRTC preview, I got it working. With the released version it is not working. And I have debugged now straight for three days and I can’t find why it is not working any more. We have not touched the code. We are running it as provided.

My question, do the example pages still work? Are there changes that are not reflected in the example pages. ([https://www.wowza.com/downloads/webrtc/webrtcexamplepages.zip](https://www.wowza.com/downloads/webrtc/webrtcexamplepages.zip))

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [April 10, 2019, 3:48pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/2 "2019-04-10T15:48:58Z")

</div>

Hello @Stef van der Ziel, sorry you have been trying to figure this out for 3 days. Let me find some assistance for you. I’ll have one our engineers look at this post. We may need a support ticket, I’ll let you know very soon.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [April 10, 2019, 4:44pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/3 "2019-04-10T16:44:24Z")

</div>

There are no reported issues with the recent WebRTC examples @Stef van der Ziel. Our engineers are suggesting you use these examples found here:

[https://www.wowza.com/\_private/webrtc/](https://www.wowza.com/_private/webrtc/)

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [April 10, 2019, 4:45pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/4 "2019-04-10T16:45:53Z")

</div>

Your config in the Application xml file should look something like this:

```auto
<WebRTC>
            <!-- Enable WebRTC publishing to this application -->
            <EnablePublish>true</EnablePublish>
            <!-- Enable WebRTC playback from this application -->
            <EnablePlay>true</EnablePlay>
            <!-- Enable query of published stream names for this application -->
            <EnableQuery>true</EnableQuery>
            <!-- IP address, transport, and port used for WebRTC streaming. -->
            <!--TCP format: [wowza-streaming-engine-external-ip-address],tcp,[port] -->
            <!--UDP format: [wowza-streaming-engine-external-ip-address],udp -->
            <IceCandidateIpAddresses>192.168.0.16,udp</IceCandidateIpAddresses>
            <!-- <IceCandidateIpAddresses>[Wowza-IP-Address],tcp,1935</IceCandidateIpAddresses> -->
            <!-- Local IP address of the network card you want to use for WebRTC UDP traffic -->
            <UDPBindAddress>0.0.0.0</UDPBindAddress>
            <!-- Comma-deliniated list of audio codecs, in order of preference, for stream ingestion. Codecs not included will not be ingested. -->
            <PreferredCodecsAudio>opus,vorbis,pcmu,pcma</PreferredCodecsAudio>
            <!-- Comma-deliniated list of video codecs, in order of preference, for stream ingestion. Codecs not included will not be ingested.-->
            <PreferredCodecsVideo>h264,vp8,vp9</PreferredCodecsVideo>
            <!-- Enable WebRTC debug logging -->
            <DebugLog>false</DebugLog>
            <!-- Properties for WebRTC -->
            <Properties>
            </Properties>
        </WebRTC>

```

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [April 10, 2019, 4:47pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/5 "2019-04-10T16:47:24Z")

</div>

You’ll need to replace [Wowza-IP-Address] in the IceCandidateIpAddresses which appears to be where it’s failing.

If you still run into issues, please submit a support ticket and the engineers can view all of your files to find the problem. Hope this helps you.

[https://www.wowza.com/support/open-ticket](https://www.wowza.com/support/open-ticket)

---

<div class="post-metadata">

**Author:** ![Stef\_van\_der\_Ziel](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@Stef\_van\_der\_Ziel](https://community.wowza.com/u/Stef_van_der_Ziel)\
**Post date:** [May 1, 2019, 7:41am UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/6 "2019-05-01T07:41:15Z")

</div>

Ok, we found the issue. We where using the **DomainToKeyStoreMapPath** setting in the VHost instead of a single JKS file for SSL. This caused the WebRTC part not to function properly.

So the support department has asked around internally and there is a fix in a future version. So for now, this is solved for us.

---

<div class="post-metadata">

**Author:** ![Mikhail\_Shershnyov](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@Mikhail\_Shershnyov](https://community.wowza.com/u/Mikhail_Shershnyov)\
**Post date:** [July 22, 2019, 6:25pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/7 "2019-07-22T18:25:10Z")

</div>

Hello!

Why does not it work?

---

<div class="post-metadata">

**Author:** ![Mikhail\_Shershnyov](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@Mikhail\_Shershnyov](https://community.wowza.com/u/Mikhail_Shershnyov)\
**Post date:** [July 22, 2019, 6:25pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/8 "2019-07-22T18:25:38Z")

</div>

Screenshots

[https://yadi.sk/i/pg40uPyJsADe3g](https://yadi.sk/i/pg40uPyJsADe3g)

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [July 22, 2019, 11:38pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/9 "2019-07-22T23:38:35Z")

</div>

Can you confirm that you’re using the default `HTTPWebRTCExchangeSessionInfo`

HTTP Provider and this has not been modified?

We suspect @Mikhail Shershnyov that this is a UDP port issue or firewall blocking the protocol.

Can you check if your firewall is allowing this connection? Some firewalls in addition to filtering on TCP/UDP ports, are also filtering the protocol being used. It is possible that the firewall is allowing UDP connections, and TCP connections using HTTP protocol, but not allowing TCP.

---

<div class="post-metadata">

**Author:** ![Mikhail\_Shershnyov](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@Mikhail\_Shershnyov](https://community.wowza.com/u/Mikhail_Shershnyov)\
**Post date:** [July 23, 2019, 4:07pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/10 "2019-07-23T16:07:33Z")

</div>

I have a development server 192.168.1.240  
On the development server launched Wowza Streaming Engine 4.7.7

From your WebRTC example, took Application.xml and pointed out the IP of my development server there.

```auto
<IceCandidateIpAddresses> 192.168.1.240, tcp, 1935 </ IceCandidateIpAddresses><UDPBindAddress> 192.168.1.240 </ UDPBindAddress>

```

I took VHost.xml from your example and changed the port there to my 83.

I use your webrtc.js

---

<div class="post-metadata">

**Author:** ![Mikhail\_Shershnyov](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@Mikhail\_Shershnyov](https://community.wowza.com/u/Mikhail_Shershnyov)\
**Post date:** [July 23, 2019, 4:07pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/11 "2019-07-23T16:07:44Z")

</div>

Connecting to ws: [//192.168.1.240](https://192.168.1.240): 83 / webrtc-session.json  
I do not use SSL. Everything is successful, I get the following data from the server 192.168.1.240:

[https://yadi.sk/i/ShhmeEUhphme5g](https://yadi.sk/i/ShhmeEUhphme5g)

The problem is that the SDP response comes with local IP (127.0.0.1)!

[https://yadi.sk/i/x5pB031XsbOAyA](https://yadi.sk/i/x5pB031XsbOAyA)

And I expect that the SDP response that came from the Wowza Streaming Engine will be IP 192.168.1.240.

At the address [http://192.168.1.240:1935/](http://192.168.1.240:1935/) I see this

[https://yadi.sk/i/nGngPIoAbJi9nQ](https://yadi.sk/i/nGngPIoAbJi9nQ)

---

<div class="post-metadata">

**Author:** ![Mikhail\_Shershnyov](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@Mikhail\_Shershnyov](https://community.wowza.com/u/Mikhail_Shershnyov)\
**Post date:** [July 24, 2019, 5:51am UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/12 "2019-07-24T05:51:56Z")

</div>

HTTP Provider and this has not been modified?

I using original provider.

---

<div class="post-metadata">

**Author:** ![Mikhail\_Shershnyov](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@Mikhail\_Shershnyov](https://community.wowza.com/u/Mikhail_Shershnyov)\
**Post date:** [July 25, 2019, 6:56pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/13 "2019-07-25T18:56:10Z")

</div>

Need your answers, please!

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [July 25, 2019, 8:00pm UTC](https://community.wowza.com/t/webrtc-examples-not-working-anymore/53145/14 "2019-07-25T20:00:36Z")

</div>

Hello @Mikhail Shershnyov, you may have missed my previous response where the engineers requested a support ticket for this as they cannot determine this from what you have shared. Because WebRTC is a complicated workflow and they do not debug in the forums, they need a ticket in order to view your full configuration and see your log files. They can then run tests to replicate the issue and very quickly find the issue for you.

[https://www.wowza.com/support/open-ticket](https://www.wowza.com/support/open-ticket)
