Skip to content

get ice-lite returning nil #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2025
Merged

Conversation

OctopusRage
Copy link
Contributor

fix get ice lite not recognized sdp offer that has "a=ice-lite"

@mickel8
Copy link
Member

mickel8 commented May 27, 2025

Hi @OctopusRage! Thanks for the catch! I think that we could even get rid of the first getter i.e. always look for :ice_lite, not for "ice-lite". Could you do that as well?

@mickel8
Copy link
Member

mickel8 commented May 27, 2025

And see if it works for you?

@OctopusRage
Copy link
Contributor Author

sure, updated

@mickel8 mickel8 merged commit 9d0ac74 into elixir-webrtc:master May 27, 2025
@mickel8
Copy link
Member

mickel8 commented May 27, 2025

Thanks! Btw. can I ask what's your use-case for ice-lite?

@OctopusRage
Copy link
Contributor Author

Whatsapp call uses ice lite on their side

@mickel8
Copy link
Member

mickel8 commented May 27, 2025

But even without this fix, everything should work, I believe? The worst case scenario is that there will be ICE role conflict that should be automatically resolved

@OctopusRage
Copy link
Contributor Author

OctopusRage commented May 27, 2025

Yea actually it still doesnt fix problems on my server .
Somehow i got disconnected 1 minutes after call established and i got tls error. I still couldnt figured it out whether its from ice check or something else

@mickel8
Copy link
Member

mickel8 commented May 27, 2025

Can you share this TLS error? How do you observe it? Also is Whatsapp WebRTC API somewhere available?

@OctopusRage
Copy link
Contributor Author

TLS :client: In state :connection received SERVER ALERT: Fatal - Close Notify
Seems like it came from erlangside?

Im sorry whatsap rtc docs still not available for public yet

@mickel8
Copy link
Member

mickel8 commented May 27, 2025

close notify is an alert sent by a side that is closing the connection in a graceful way. When you close a tab in a web browser it should also send DTLS close notify. So this error might not tell anything specific. See here: https://datatracker.ietf.org/doc/html/rfc5246#section-7.2.1

Can you confirm that you are receiving any packets? Also, are you sure you are sending any packets? Some services may close the connection when they don't receive any traffic.

@OctopusRage
Copy link
Contributor Author

Youre right, they immediately close connection after 20 sec if thereis no packet sent
I think i alr send packet to others peers using PeerConnection.send_rtp
I managed to estabilished call and i can hear it both on my browser and my mobile, but it still closed after 1 minutes of call.

Do i probably need to setup turn server on my local as well?

@mickel8
Copy link
Member

mickel8 commented May 27, 2025

I don't think so. If you are able to establish the connection, TURN shouldn't be needed. I would make sure you don't duplicate any actions. E.g. you don't send two the same HTTP requests to their API gateway as this may also be treated as an error

@OctopusRage
Copy link
Contributor Author

i dont think so, all http request done before call estabilished
maybe you can figured this out @mickel8 ?

image
on my ss above, i started to get get rtcp msg {nil, %ExRTCP.Packet.SourceDescription{} then as soon as im getting those msg i always get TLS error
does it mean i disconnected from their side?

@mickel8
Copy link
Member

mickel8 commented May 28, 2025

Hmm, not sure why there is nil but I actually wonder what this close notify come from. This does not look like our library

@OctopusRage
Copy link
Contributor Author

i guess ill try to ask meta team too

@OctopusRage
Copy link
Contributor Author

OctopusRage commented May 28, 2025

seems like your guess was right
i can get rid of close notify by not using pooling on my http library
but problem still occurs, even without close notify

@mickel8
Copy link
Member

mickel8 commented May 28, 2025

You can check against {:ex_webrtc, _pid, {:connection_state_change, conn_state}, this is the message emitted by ex_webrtc. Also, you can try to enable debug logs and see if there are any ICE-related errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants