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 local offer sdp: Called in wrong state: STATE_RECEIVEDINITIATE #286

Closed
oooookk7 opened this issue May 6, 2015 · 23 comments
Closed

Comments

@oooookk7
Copy link

oooookk7 commented May 6, 2015

This issue occurs at times when Firefox v38 makes an attempt to call Chrome v42 and with Temasys AdapterJS integration when IE v11 is the one starting the call with Chrome v42.

@semigroupoid
Copy link

This might be a duplicate of #269. Does the error actually cause peerjs to stop working?

@oooookk7
Copy link
Author

oooookk7 commented May 7, 2015

Hi @semigroupoid, yes it does. I cannot have an established video call connection.

@Ashwinkrishna
Copy link

Hi I also got the same exception . Can anyone help me in fixing it .

@chynonm
Copy link

chynonm commented Jul 17, 2015

Just had this happen now.
Using a slightly altered version of peerjs (adding a few things outside the peerconnection or mediastream)
Both computers were connecting fine. Then by accident one of em was unplugged mid call. From then on haven't been able to get the 2 computers to share mediastream again, even after restarting peerjs server and having them refresh ids.

@khandelwaludit
Copy link

Hi,
This issue is happening to me as well
Failed to setLocalDescription, Failed to set local offer sdp.
called in wrong state STATE_RECEIVED_INITIATE. Is there a workaround for this ?

@chynonm
Copy link

chynonm commented Aug 3, 2015

When it happens the way I fix it is restarting the computer that didn't crash, my understanding is it's probably storing some ice candidates and trying to connect the fastest way possible while the other side isn't prepared yet.

Didn't try a simple browser restart though (simple page refresh doesn't work)

@carterbryden
Copy link

I'm getting this as well, but on Chrome to Chrome connections. Doesn't seem to prevent the clients from connecting OK however.

@W0lfEagle
Copy link

Getting the same problem Chrome to Chrome. Any solutions yet?

@vikrantkjain
Copy link

vikrantkjain commented May 31, 2016

## Failed to set local offer sdp: Called in wrong state: STATE_RECEIVEDOFFER

in android Native Develpment

@mikkelking
Copy link

Restarting the (chrome) browser made the problem go away for me, and I was able to make calls again

@zkryakgul
Copy link

zkryakgul commented May 3, 2018

## Failed to set local offer sdp: Called in wrong state: kHaveRemoteOffer

in android native WebChromeClient. Any solution?

@AntonLebiodkin
Copy link

+1, have kHaveRemoteOffer error, any solutions?

@Sreekanthp74
Copy link

Am also getting the same error

peer.min.js:1 PeerJS: ERROR Error: (OperationError) Failed to set local offer sdp: Called in wrong state: kHaveRemoteOffer
peer.min.js:1 PeerJS: Failed to setLocalDescription, (OperationError) Failed to set local offer sdp: Called in wrong state: kHaveRemoteOffer

Any solution for this?

@zkryakgul
Copy link

zkryakgul commented Jul 16, 2018 via email

@kidandcat
Copy link
Member

kidandcat commented Jul 16, 2018

Could you test with the latest build from master branch? in "dist" folder.

https://raw.githubusercontent.com/peers/peerjs/master/dist/peer.min.js

@zkryakgul
Copy link

zkryakgul commented Jul 16, 2018 via email

@Sreekanthp74
Copy link

Sreekanthp74 commented Jul 19, 2018

Thanks
I checkout the latest peer.mim.js file and its working fine now.

but , @kidandcat
the package you have given have the same issue.

Took it from the master git repo of peer js , it is working fine
https://github.com/peers/peerjs

@kidandcat
Copy link
Member

Mmm, it should be the same file, maybe your browser is catching it with an older version.

Anyway, feel free to reopen if you get the error again. Also I published the changes to NPM so you can use latest version from NPM now.

@fibin
Copy link

fibin commented Aug 20, 2018

Now I have this issue: "OperationError: Failed to set local offer sdp: Called in wrong state: kHaveRemoteOffer". Trying to make connection between two browsers on one computer. @kidandcat can you help me with this?

@kidandcat
Copy link
Member

Which PeerJS are you using?

@fibin
Copy link

fibin commented Aug 20, 2018

@kidandcat 0.3.14

@kidandcat
Copy link
Member

Update it, latest is 0.3.16

@fibin
Copy link

fibin commented Aug 20, 2018

@kidandcat the error has gone! but still no audio.
here is how I make call:
navigator.getUserMedia({audio: true, video: true}, function(stream){ var call = this.peer.call(this.idToConnect, stream); call.on('stream', function(stream) { console.log('STREAM'); console.log(stream); }) }, err => console.log(err));

and this is how I revieve it:
this.peer.on('call', function(call) { navigator.getUserMedia({ audio: true, video: true }, function(stream) { call.answer(stream); call.on('stream', function(stream) { console.log('RESPONED CALL'); console.log(stream) }); }, function(error) { //... }); });

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

No branches or pull requests