<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>234088</bug_id>
          
          <creation_ts>2021-12-09 09:18:03 -0800</creation_ts>
          <short_desc>Browser returns &quot;null&quot; for remoteDescription on ontrack event</short_desc>
          <delta_ts>2021-12-13 07:54:18 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebRTC</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jaya Allamsetty">jaya.allamsetty</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1822156</commentid>
    <comment_count>0</comment_count>
    <who name="Jaya Allamsetty">jaya.allamsetty</who>
    <bug_when>2021-12-09 09:18:03 -0800</bug_when>
    <thetext>The browser returns &quot;null&quot; when we query for the remoteDescription on the RTCPeerConnection immediately after the &quot;track&quot; event is fired.

Steps to reproduce:
1. Go to https://jsfiddle.net/fippo/1k5oayqc/1/show and run the fiddle.
2. Examine the output that gets printed. 
3. &apos;remoteDescription&apos;, &apos;currentRemoteDescription&apos; and &apos;pendingRemoteDescription&apos; are all null in the ontrack event handler.

Chrome and Safari 15.0 return valid values for &apos;remoteDescription&apos; whereas Safari 15.1 and STP Release 133 return null.
This breaks Jitsi client&apos;s functionality and no remote tracks can be seen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1822681</commentid>
    <comment_count>1</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2021-12-10 06:51:18 -0800</bug_when>
    <thetext>I tried on STP 136, and in step 3, I got:
ontrack true false true
This seems expected.

I also tried on iOS 15.2 and got the same result.
Can you validate this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1823521</commentid>
    <comment_count>2</comment_count>
    <who name="Jaya Allamsetty">jaya.allamsetty</who>
    <bug_when>2021-12-13 07:22:57 -0800</bug_when>
    <thetext>I just tested this in STP 136 (Release 136 (Safari 15.4, WebKit 16613.1.9.2), it&apos;s working fine there and I see the expected result. 
Does this mean that Safari 15.4 will work as expected ? We need to communicate the fixed version to our customers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1823524</commentid>
    <comment_count>3</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2021-12-13 07:31:01 -0800</bug_when>
    <thetext>I just tried on a recent Safari 15.2 beta and cannot reproduce there either.
Can you have a test there as well?

I am not sure what is going on there since we were not expecting changes in that area in Safari 15.
In recent WebKit/STP, we did improvements to closely align with the spec by copying descriptions at specific times, instead of asking the WebRTC backend for the description.

I&apos;ll mark as configuration changed then since it is working as expected in STP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1823527</commentid>
    <comment_count>4</comment_count>
    <who name="Jaya Allamsetty">jaya.allamsetty</who>
    <bug_when>2021-12-13 07:54:18 -0800</bug_when>
    <thetext>Yes, this seems to be fixed in Safari 15.2 beta 3.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>