title: Unable to reproduce TypeError: 'undefined' is not an object
body: <p>Google Analytics shows that ~12% of our total users are affected by a Javascript bug of:</p>
  
  <p><code>TypeError: 'undefined' is not an object</code></p>
  
  <p>90% of the browsers are Safari 7534.48.3, 10% are Mozilla compatible agent.  75% of the errors come from iPhones, 23% from iPads.  1% from Macintosh, the other 2% is from iPod etc.  None of the devices run Linux or Windows.</p>
  
  <p>I have tried enabling debug mode in safari on both an iPhone and iPad but not able to reproduce the bug.</p>
  
  <p><a href="http://myschoolholidays.com/Birmingham" rel="noreferrer">Here is a link to a page Google Analytics claims is showing the error</a>.  If anyone can consistently reproduce the error here I will be super happy because just a line number would be enough to get me started debugging.</p>
  
  <p>Can anyone think of any other ways I can try to debug this?  Thanks all</p>
  
  <p>For the curious among us I'm using <a href="http://mclear.co.uk/2012/04/09/send-javascript-client-errors-to-google-analytics/" rel="noreferrer">this code to send errors to GA</a> -- <b>Warning</b>: Possible self promotion.</p>
  
  <p><strong>Update:</strong>  TypeError: 'undefined' is not an object (evaluating 'safari.self.tab.canLoad')</p>
  
  <p>Managed to get that out of it once when clicking around, mostly on an iphone whilst clicking "Change country.."</p>
  
  <p><strong>Update:</strong> Solved this by making sure the element was available in the dom.  Turns out the ajax call on success was trying to write to an element that wasn't available.  </p>
  
  <p>I have kept a solid record of <a href="http://mclear.co.uk/2012/04/13/unable-to-reproduce-typeerror-undefined-is-not-an-object/" rel="noreferrer">Unable to reproduce TypeError: 'undefined' is not an object here</a></p>