EricssonResearch / bowser

A WebRTC browser for iOS developed in the open
BSD 2-Clause "Simplified" License
208 stars 65 forks source link

Failed to set remote offer sdp: Called with SDP without DTLS fingerprint. #56

Closed pearcetm closed 8 years ago

pearcetm commented 9 years ago

I've been developing a webapp (entirely in the browser, no native app build) and have been using Bowser to test on iOS. A couple of months ago I had a connection working between Bowser and Chrome, but am returning to it now and failing. Chrome is throwing an error when processing an offer coming from Bowser: "Failed to set remote offer sdp: Called with SDP without DTLS fingerprint." I'm using the simplepeer library (https://github.com/feross/simple-peer) as a javascript wrapper. I'm not sure if there is a config option I'm missing or if Chrome has moved on to a newer protocol and Bowser's offers haven't caught up... anyone have advice?

Firegarden commented 9 years ago

I have seen this before because I had the same issue. I believe I solved it by checking if the connection was stable before creating the offer. Eg.

pc.onnegotiationneeded = function () { if (pc.signalingState === STABLE) { trace('CreateOffer: ' + toUser); pc.createOffer(function (offer) {

stefhak commented 9 years ago

Bowser has the bug that the offer created by createOffer does not have any fingerprint in it. A workaround is to do setLocal, and then send off the pc.localDescription (which is an SDP with fingerprint info) to the other side.

There is a PR to fix this bug, https://github.com/EricssonResearch/openwebrtc/pull/427, it seems I need some help to get it reviewed and (hopefully) merged - perhaps you can say you'd want this merged?

On Tue, Sep 22, 2015 at 5:17 AM, Robert Sherrill notifications@github.com wrote:

I have seen this before because I had the same issue. I believe I solved it by checking if the connection was stable before creating the offer. Eg.

pc.onnegotiationneeded = function () { if (pc.signalingState === STABLE) { trace('CreateOffer: ' + toUser); pc.createOffer(function (offer) {

— Reply to this email directly or view it on GitHub https://github.com/EricssonResearch/bowser/issues/56#issuecomment-142168503 .

Firegarden commented 9 years ago

I just can't remember how I resolved this. Now that you say that I feel like I had to make sure I didn't actually use the offer or answer in my signaling rather I used the pc.localdescription

pc.createOffer(function (offer) { pc.setLocalDescription(offer, function () {

_signalChannel.server.signalOffer(toUser, _userName, _connectionId, JSON.stringify({ 'data': pc.localDescription })); // NOTE I am NOT passing the offer.

pc.setRemoteDescription(new RTCSessionDescription(offer.data), function () { pc.createAnswer(function (answer) { pc.setLocalDescription(answer, function () {

_signalChannel.server.signalAnswer(fromUser, _userName, _connectionId, JSON.stringify({ 'data': pc.localDescription })); // I am NOT using the answer again pc.localDescription

On Mon, Sep 21, 2015 at 7:34 PM, stefan hakansson notifications@github.com wrote:

Bowser has the bug that the offer created by createOffer does not have any fingerprint in it. A workaround is to do setLocal, and then send off the pc.localDescription (which is an SDP with fingerprint info) to the other side.

There is a PR to fix this bug, https://github.com/EricssonResearch/openwebrtc/pull/427, it seems I need some help to get it reviewed and (hopefully) merged - perhaps you can say you'd want this merged?

On Tue, Sep 22, 2015 at 5:17 AM, Robert Sherrill <notifications@github.com

wrote:

I have seen this before because I had the same issue. I believe I solved it by checking if the connection was stable before creating the offer. Eg.

pc.onnegotiationneeded = function () { if (pc.signalingState === STABLE) { trace('CreateOffer: ' + toUser); pc.createOffer(function (offer) {

— Reply to this email directly or view it on GitHub < https://github.com/EricssonResearch/bowser/issues/56#issuecomment-142168503

.

— Reply to this email directly or view it on GitHub https://github.com/EricssonResearch/bowser/issues/56#issuecomment-142185330 .

FIREGARDEN https://www.google.com/?q=firegarden 1877.222.7818

pearcetm commented 9 years ago

stefhak - I commented on the pull request. Is there any other place I should post to show support?

stefanalund commented 8 years ago

This should be fixed now. Please report back if the problem persists. Thanks.