Skip to content
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

Failed to set remote answer sdp: Called in wrong state: STATE_INPROGRESS #30

Closed
adammw opened this issue Jul 6, 2015 · 5 comments
Closed

Comments

@adammw
Copy link

adammw commented Jul 6, 2015

When Trickle ICE is enabled, I get the following error when trying to establish a peer connection between two Chrome browsers on the same machine:

Failed to set remote answer sdp: Called in wrong state: STATE_INPROGRESS

Disabling Trickle ICE, everything works smoothly.

The code I'm testing with is in a gist: https://gist.github.com/adammw/d9bf021c395835427aa0

@feross
Copy link
Owner

feross commented Jul 6, 2015

What version of node, simple-peer, and which browser are you using? Your example works fine for me.

Make sure you're using the latest simple-peer, version 5.11.3.

@feross
Copy link
Owner

feross commented Jul 6, 2015

Btw, you shouldn't add a new set of event listeners in socket.on('receivePeerSignal', function(data) { because that will get called multiple times with each bit of signaling data and you'll end up handling the 'connec't and 'data' events multiple times.

@feross
Copy link
Owner

feross commented Jul 8, 2015

I'm closing this, as I can't reproduce it. It works for me. If you have new information you can provide to help narrow this down, please comment or open a new issue. Thanks!

@feross feross closed this as completed Jul 8, 2015
@adammw
Copy link
Author

adammw commented Jul 10, 2015

@feross yep, I believe my mis-signalling was to blame here. thanks!
For reference I've updated my gist and and confirm it works correctly.

@mayeaux
Copy link

mayeaux commented Dec 26, 2017

Thanks that actually helped save me on another project I was working on :)

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

No branches or pull requests

3 participants