title: ERROR/Web Console: Uncaught TypeError: Cannot call method 'getItem' of null at http://m.youtube.com/:844
body: <p>The following error comes from Android (WebView) and not directly from my own code:</p>
  
  <pre><code>04-28 12:36:15.174: ERROR/Web Console(7604): 
    Uncaught TypeError: Cannot call method 'getItem' of null at http://m.youtube.com/:844
  </code></pre>
  
  <p>I am really not doing anything special other than loading that URL into WebView. Most of the time I <strong>don't</strong> get this error, so I am assuming this could be pointing to some unreliable network conditions? Perhaps youtube.com too busy?</p>
  
  <p>It's hard to tell. Regardless, I would like to at least have an idea what could be causing this and whether I can catch that error so that I can better handle it.</p>
  
  <p>Again, my own code has no knowledge of what <code>getItem</code> is. On the other hand, when this problem occurs, the YouTube page on my WebView is simply <strong>empty</strong>.</p>
  
  <p>Insights?</p>
  
  <p>EDIT: I have been looking for documentation about the proposed <code>WebSettings.setDomStorageEnabled(true)</code>. The only hint I have been able to find so far was <a href="https://stackoverflow.com/questions/4157184/android-making-webview-domstorage-persistant-after-app-closed">in this SO thread</a>: As I mentioned earlier, this problem occurs very rarely and haven't occurred since I posted my question. So I must understand a little more about the connection between this and "DOM storage" before I can devise a way to test/verify whether this solves the problem.</p>
  
  <p>Also, I just encountered another error message (with benign results, so it seems):</p>
  
  <pre><code>05-02 00:44:45.823: ERROR/Web Console(1595): 
    dojo.back.init() must be called before the DOM has loaded. 
    If using xdomain loading or djConfig.debugAtAllCosts, 
    include dojo.back in a build layer. 
    at http://sj.example.com/ncscript/subsect/j_gs/version/20110428191502.js:164
  </code></pre>
  
  <p>I can now see some connection to DOM, so it looks like @Brian O'Dell is in the right direction. I just need to understand what <code>WebSettings.setDomStorageEnabled(true)</code> does.</p>