ionorg / ion-sfu

Pure Go WebRTC SFU
MIT License
974 stars 241 forks source link

Subscriber connection failed to establish due to empty offer from ion-sfu #426

Closed buriedgod closed 3 years ago

buriedgod commented 3 years ago

Your environment.

What did you do?

When a client is connected to ion-sfu the publishing connection is successfully completed, but for the subscriber connection, an empty offer is sent from the ion-sfu which in turn makes the client (web-browser) make an empty answer, but the same will fail to be set as remote description at the ion-sfu side with an error: SetRemoteDescription error: SetRemoteDescription called with no ice-ufrag

What did you expect?

A proper offer from ion-sfu

What happened?

Offer generated at ion-sfu is empty due to zero data channels:

Offer Generated at ion-sfu: v=0 o=- 2815124328824132612 1613508224 IN IP4 0.0.0.0 s=- t=0 0 a=fingerprint:sha-256 B3:D4:DE:D2:E8:23:B1:42:28:A4:44:42:61:87:51:DA:FA:BD:8A:3C:E7:44:80:93:D0:B3:AC:6C:0D:59:EB:CD a=group:BUNDLE

Answer Generated for the above offer: v=0 o=mozilla...THIS_IS_SDPARTA-85.0.1 3046246048554059324 0 IN IP4 0.0.0.0 s=- t=0 0 a=fingerprint:sha-256 E1:33:84:04:C4:3F:0A:14:B7:E5:3F:01:97:27:AC:70:E2:1F:02:78:FC:B6:94:7E:45:7D:D3:64:AA:43:32:37 a=ice-options:trickle a=msid-semantic:WMS *

ion-sfu tried to set this answer as remote description and got the following error: [2021-02-16 20:43:44.174] [ERROR] [190][peer.go][SetRemoteDescription] => SetRemoteDescription error: SetRemoteDescription called with no ice-ufrag

billylindeman commented 3 years ago

To make this work you need to create a datachannel for the SFU api. https://github.com/pion/ion-sdk-js/blob/master/src/client.ts#L42

buriedgod commented 3 years ago

sorry i missed mentioning i am using ion-sdk-js. I have the publisher peer connection working just fine, the subscriber peer connection is having the empty offer issue due to empty data channels. Any pointers on possible causes?

buriedgod commented 3 years ago

An update: I have forked ion-sfu and added a data channel forcefully at the offer generation, but this resolves the issue of the empty offer from ion-sfu, but the generated offer is being accepted and correctly processed by Firefox only, doesn't work on chrome.

Any idea why this is happening?

tarrencev commented 3 years ago

Were you able to resolve this?

buriedgod commented 3 years ago

Hey @tarrencev , very sorry about the super delayed response. I wasn't able to resolve it the mentioned version, i tried the latest version v 1.9.8 and it's now working. Closing the issue.