Peerjs: Failed to set local offer sdp: Called in wrong state: STATE_RECEIVEDINITIATE

Created on 6 May 2015  Â·  23Comments  Â·  Source: peers/peerjs

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.

Most helpful comment

+1, have kHaveRemoteOffer error, any solutions?

All 23 comments

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

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

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

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.

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 ?

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)

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

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

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

in android Native Develpment

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

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

in android native WebChromeClient. Any solution?

+1, have kHaveRemoteOffer error, any solutions?

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?

https://gitlab.com/zkry.akgul/peerjs

Use this instead of orginal lib. I made little touchs to lib files and

seems like problem solved.

Zekeriya AKGÜL

Sreekanthp74 notifications@github.com, 16 Tem 2018 Pzt, 09:49 tarihinde
şunu yazdı:

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?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/peers/peerjs/issues/286#issuecomment-405161144, or mute
the thread
https://github.com/notifications/unsubscribe-auth/APa-mKrHOdYzFnPTgsufeySFuT_v5MSdks5uHDd-gaJpZM4EQ5df
.

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

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

Nope i couldn't. I work on it couple months ago and use it my small range
project. It was worked for me.

16 Tem 2018 Pzt 10:49 tarihinde Jairo Caro-Accino Viciana <
[email protected]> ÅŸunu yazdı:

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

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/peers/peerjs/issues/286#issuecomment-405170944, or mute
the thread
https://github.com/notifications/unsubscribe-auth/APa-mCcM4rP4UlXRkoWKR53JZbiTY4ZRks5uHEV9gaJpZM4EQ5df
.

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

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.

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?

Which PeerJS are you using?

@kidandcat 0.3.14

Update it, latest is 0.3.16

@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) { //... }); });

Was this page helpful?
0 / 5 - 0 ratings

Related issues

l2aelba picture l2aelba  Â·  3Comments

Kitanga picture Kitanga  Â·  5Comments

bilo1967 picture bilo1967  Â·  7Comments

afrokick picture afrokick  Â·  5Comments

geraldsamosir picture geraldsamosir  Â·  6Comments