<?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>61473</bug_id>
          
          <creation_ts>2011-05-25 15:06:55 -0700</creation_ts>
          <short_desc>REGRESSION (r67163): twitter.com doesn&apos;t load properly the first time</short_desc>
          <delta_ts>2012-06-21 15:24:14 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://twitter.com</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, NeedsReduction, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>45310</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andy Estes">aestes</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>aestes</cc>
    
    <cc>eoconnor</cc>
    
    <cc>esprehn</cc>
    
    <cc>tonyg</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>409952</commentid>
    <comment_count>0</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-05-25 15:06:55 -0700</bug_when>
    <thetext>In some cases, twitter.com fails to load the timeline with a cold cache. The black toolbar loads, but a JavaScript error prevents the rest of the page from loading. The error is typically something like:

TypeError: &apos;undefined&apos; is not an object (evaluating &apos;twttr.anywhere.api&apos;)

See the attached screenshot to see what the page looks like when this happens.

The problem seems to be specific to a subset of twitter accounts and usually goes away if you reload the page. Since I am able to see this error, I&apos;ll work on a reduction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>409953</commentid>
    <comment_count>1</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-05-25 15:07:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/9491632&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>409954</commentid>
    <comment_count>2</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-05-25 15:08:51 -0700</bug_when>
    <thetext>This is a regression due to &lt;http://trac.webkit.org/changeset/67163&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>409964</commentid>
    <comment_count>3</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-05-25 15:22:35 -0700</bug_when>
    <thetext>There is a JavaScript function in the main document called initAPI() that calls twttr.anywhere.api.initialize().

twttr.anywhere.api is defined in an external resource that is included earlier in the main document using:
&lt;script type=&quot;text/javascript&quot; async=&quot;&quot; src=&quot;https://si1.twimg.com/a/1306171173/javascripts/api.bundle.js&quot;&gt;&lt;/script&gt;

Since the script tag has the async attribute, it can load after initAPI() executes. Sounds like a race condition.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>409966</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-05-25 15:26:03 -0700</bug_when>
    <thetext>Sounds like we should evangelize them to not use async and rely on script ordering!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>410025</commentid>
    <comment_count>5</comment_count>
    <who name="Theresa O&apos;Connor">eoconnor</who>
    <bug_when>2011-05-25 16:46:54 -0700</bug_when>
    <thetext>I&apos;ve evang&apos;ed; they already knew about this, and have a fix on the way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>410037</commentid>
    <comment_count>6</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-05-25 17:05:29 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; I&apos;ve evang&apos;ed; they already knew about this, and have a fix on the way.

That&apos;s great! Do you have any sense of timeframe so we know when to verify the fix?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>410148</commentid>
    <comment_count>7</comment_count>
    <who name="Theresa O&apos;Connor">eoconnor</who>
    <bug_when>2011-05-25 20:19:37 -0700</bug_when>
    <thetext>I&apos;ll ask.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>654938</commentid>
    <comment_count>8</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2012-06-21 15:24:14 -0700</bug_when>
    <thetext>They don&apos;t even include the referenced script anymore and it appears they&apos;re using async more carefully.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>