<?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>216385</bug_id>
          
          <creation_ts>2020-09-10 16:03:54 -0700</creation_ts>
          <short_desc>Web Inspector: Change `InspectorAnimationAgent-&gt;startTracking` to not error on repeated calls</short_desc>
          <delta_ts>2020-09-22 21:47:47 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Local Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Blaze Burg">bburg</reporter>
          <assigned_to name="Patrick Angle">pangle</assigned_to>
          <cc>bburg</cc>
    
    <cc>hi</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>joepeck</cc>
    
    <cc>pangle</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1687582</commentid>
    <comment_count>0</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2020-09-10 16:03:54 -0700</bug_when>
    <thetext>STEPS TO REPRODUCE:
- navigate to brrian.org
- open inspector to Timelines tab, with Media &amp; Animations timeline enabled
- navigate to nfl.com
- Uncaught exception &quot;Animation domain already tracking (at Connection.js:​162:​29)&quot;


seems like animation instrumentation is auto-starting, or has bad initial state upon cross-domain navigation. I wonder if it happens on a same-domain or same-document navigation?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1687585</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-09-10 16:15:25 -0700</bug_when>
    <thetext>&lt;rdar://problem/68670991&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690329</commentid>
    <comment_count>2</comment_count>
    <who name="Patrick Angle">pangle</who>
    <bug_when>2020-09-21 09:48:47 -0700</bug_when>
    <thetext>I&apos;m unable to reproduce this issue on same-domain navigation. It seems to be limited to cross-domain navigation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690488</commentid>
    <comment_count>3</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2020-09-21 13:30:48 -0700</bug_when>
    <thetext>This seems likely to be harmless.

Whenever the Timeline Tab is in the foreground the frontend notifies the backend of the open set of timelines so that the backend can automatically start an appropriate timeline recording on page navigations (`Timeline.setAutoCaptureEnabled` and `Timeline.setInstruments`).

What might happen on cross domain navigation is that both the backend and frontend try to start a recording? It seems the Animation domain errors if startTracking is called multiple times, but most other timelines don&apos;t (Memory, Heap, CPUProfiler, ScriptProfiler, etc.).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690490</commentid>
    <comment_count>4</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2020-09-21 13:39:57 -0700</bug_when>
    <thetext>(In reply to Joseph Pecoraro from comment #3)
&gt; This seems likely to be harmless.
To expand on this further, whenever you see the uncaught exception UI in Web Inspector in an engineering build, it can mean one of two things:
 1) an exception in JavaScript was thrown
 2) some protocol command sent an error payload/message back to the frontend
In the case of (1), that&apos;s definitely a bug and should be fixed.
In the case of (2), most of the commands we invoke do not have error handling cases because we don&apos;t ever expect them to error.  Most of the time the error is harmless and will not affect the user in any negative way (usually if it does affect the user then we&apos;d see an actual JS error like (1) right after the (2) error).  A simple way to tell (most of the time) is to just hit the &quot;close&quot; link to dismiss the uncaught exception UI and try to continue using Web Inspector as normal (if nothing is wrong, then the error is likely harmless)

&gt; What might happen on cross domain navigation is that both the backend and frontend try to start a recording? It seems the Animation domain errors if startTracking is called multiple times, but most other timelines don&apos;t (Memory, Heap, CPUProfiler, ScriptProfiler, etc.).
Yeah I think we should just make `Animation.startTracking` not error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690516</commentid>
    <comment_count>5</comment_count>
    <who name="Patrick Angle">pangle</who>
    <bug_when>2020-09-21 14:21:53 -0700</bug_when>
    <thetext>(In reply to Devin Rousso from comment #4)
&gt; (In reply to Joseph Pecoraro from comment #3)
&gt; &gt; This seems likely to be harmless.
&gt; To expand on this further, whenever you see the uncaught exception UI in Web
&gt; Inspector in an engineering build, it can mean one of two things:
&gt;  1) an exception in JavaScript was thrown
&gt;  2) some protocol command sent an error payload/message back to the frontend
&gt; In the case of (1), that&apos;s definitely a bug and should be fixed.
&gt; In the case of (2), most of the commands we invoke do not have error
&gt; handling cases because we don&apos;t ever expect them to error.  Most of the time
&gt; the error is harmless and will not affect the user in any negative way
&gt; (usually if it does affect the user then we&apos;d see an actual JS error like
&gt; (1) right after the (2) error).  A simple way to tell (most of the time) is
&gt; to just hit the &quot;close&quot; link to dismiss the uncaught exception UI and try to
&gt; continue using Web Inspector as normal (if nothing is wrong, then the error
&gt; is likely harmless)

I understand that most of these are harmless, but the noise makes it difficult to identify what is actually a bug and what is &quot;expected&quot; behavior.

&gt; &gt; What might happen on cross domain navigation is that both the backend and frontend try to start a recording? It seems the Animation domain errors if startTracking is called multiple times, but most other timelines don&apos;t (Memory, Heap, CPUProfiler, ScriptProfiler, etc.).
&gt; Yeah I think we should just make `Animation.startTracking` not error.

This is certainly a relatively quick fix then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690699</commentid>
    <comment_count>6</comment_count>
      <attachid>409360</attachid>
    <who name="Patrick Angle">pangle</who>
    <bug_when>2020-09-22 08:21:23 -0700</bug_when>
    <thetext>Created attachment 409360
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690783</commentid>
    <comment_count>7</comment_count>
      <attachid>409360</attachid>
    <who name="Devin Rousso">hi</who>
    <bug_when>2020-09-22 11:17:05 -0700</bug_when>
    <thetext>Comment on attachment 409360
Patch

r=me :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1691028</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2020-09-22 21:47:46 -0700</bug_when>
    <thetext>Committed r267464: &lt;https://trac.webkit.org/changeset/267464&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 409360.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>409360</attachid>
            <date>2020-09-22 08:21:23 -0700</date>
            <delta_ts>2020-09-22 21:47:47 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-216385-20200922112123.patch</filename>
            <type>text/plain</type>
            <size>1671</size>
            <attacher name="Patrick Angle">pangle</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjY3MzQ0CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNDkzMzU1ODMyODQxOTk5
ZjY1MjAwZGQ0ODQ5MThlMzc3ODhiN2NmYS4uY2ZmMDVlOTdmMzAyM2YyYThlZThmNzFiNzYyMjZj
MThkMDI3Njk1ZCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE2IEBACisyMDIwLTA5LTIyICBQYXRy
aWNrIEFuZ2xlICA8cGFuZ2xlQGFwcGxlLmNvbT4KKworICAgICAgICBXZWIgSW5zcGVjdG9yOiBD
aGFuZ2UgYEluc3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