New issue
Advanced search Search tips

Issue 779917 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 740501
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

the onnegotiationneeded was triggered twice when removestream from a peerconnection in chrome 62&63beta

Reported by xp...@grandstream.cn, Oct 31 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. removestream from peerconnection

What is the expected behavior?
the fucntion onnegotiationneeded was triggered once

What went wrong?
the fucntion onnegotiationneeded was triggered twice

Did this work before? N/A 

Chrome version: 62 & 63 beta  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 27.0 r0

the fucntion onnegotiationneeded was triggered once before chrome 62,
 
Cc: hbos@chromium.org
Components: -Blink Blink>WebRTC>PeerConnection
Labels: Needs-Triage-M62 Needs-Feedback
xpeng@  Could you please provide sample Test file to triage the Issue from Test team end and if possible please provide screencast for further assistance.

Thanks..!!

Comment 2 by hbos@chromium.org, Nov 1 2017

Yes please provide a testfile or http://jsfiddle.net/. Are you using adapter.js or not?
we will provide a demo to reproduce the issue . we are using adpater.js
Project Member

Comment 4 by sheriffbot@chromium.org, Nov 2 2017

Cc: mmanchala@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "mmanchala@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
I have build a test demo : https://pencil240.github.io/pc1
click the  button "start"  -> "call"  -> "remove stream"   and F12 to see the logs
you will find onNegotiationNeeded  been called twice when remove stream , in chrome 62 & chrome63
Cc: -hbos@chromium.org
Owner: hbos@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 7 by hbos@chromium.org, Nov 13 2017

I was going to try to repro with https://jsfiddle.net/70ktyxkL/ but there is an issue with permissions atm so I can't do getUserMedia from jsfiddle on tip of tree.
"AudioCapture permission has been blocked because of a Feature Policy applied to the current document. See https://goo.gl/EuHzyv for more details."

I can try to test this with a browser test but I think this is adapter.js related.

Comment 8 by hbos@chromium.org, Nov 13 2017

Status: WontFix (was: Assigned)
In Chrome 62 (current stable), according to that jsfiddle onnegotiationneeded only fires once.

Have you tried with the latest version of adapter.js? If you have the same problem with latest adapter.js, can you file a bug on https://github.com/webrtc/adapter/issues ?

Closing as WontFix atm due to not able to repro without adapter.js. Please comment if this is wrong.
the onnegotiationneeded fires twice when removing stream not adding stream.

you can use the following code to reproduce the issue.

pc.onnegotiationneeded = () => {
  console.log('onnegotiationneeded fired!');
};

let stream;
navigator.mediaDevices.getUserMedia({
    audio: true,
    video: false
  })
  .then((s) => {
    stream = s;
    pc.addStream(s);
    setTimeout(function() {
        console.log('remove stream ...!');
        pc.removeStream(stream);
      },
      5000);
  });
you can reproduce the issue using the demo :
https://jsfiddle.net/xpeng/wmgkffvL/

Comment 11 by hbos@chromium.org, Nov 14 2017

Labels: -Pri-2 Pri-3
Status: Assigned (was: WontFix)
I'm sorry, I had a lot on my mind and issues came up so I forgot to remove it.
On Chrome 62 it is fired once for adding the stream and once for removing the stream:
https://jsfiddle.net/Lj9g762c/

This is not a regression, but it is a bug that the event is fired even though no renegotiation occurred between the first and second time the pc's streams changed. According to spec it should only fire when it negotiation needed goes from false to true, not from true to true.
https://w3c.github.io/webrtc-pc/#updating-the-negotiation-needed-flag

Comment 12 by hbos@chromium.org, Feb 15 2018

Labels: -Arch-x86_64 -Needs-Triage-M62
Mergedinto: 740501
Status: Duplicate (was: Assigned)

Sign in to add a comment