title: InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable javascript error
body: <p>I'm trying to follow this answer</p>
  <p><a href="https://stackoverflow.com/a/28213834/632224">https://stackoverflow.com/a/28213834/632224</a></p>
  <p>to get some files hashed in browser, but when i replace</p>
  <pre><code>&quot;importScripts('http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js');&quot;+
  </code></pre>
  <p>with something like <code>&quot;importScripts('path to local copy of md5.js');&quot;+</code> i'm getting error  <code>InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable</code> in blob line 1.</p>
  <p>Here is content of that blob:</p>
  <pre><code>importScripts('path to local copy of md5.js');
  var md5, cryptoType;
  self.onmessage = function webWorkerOnMessage(e){
      function arrayBufferToWordArray(ab) {
          var i8a = new Uint8Array(ab);
          var a = [];
          for (var i = 0; i &lt; i8a.length; i += 4) {
            a.push(i8a[i] &lt;&lt; 24 | i8a[i + 1] &lt;&lt; 16 | i8a[i + 2] &lt;&lt; 8 | i8a[i + 3]);
          }
          return CryptoJS.lib.WordArray.create(a, i8a.length);
      }
      if (e.data.type === &quot;create&quot;) {
          md5 = CryptoJS.algo.MD5.create();
          postMessage({type: &quot;create&quot;});
      } else if (e.data.type === &quot;update&quot;) {
          md5.update(arrayBufferToWordArray(e.data.chunk));
          postMessage({type: &quot;update&quot;});
      } else if (e.data.type === &quot;finish&quot;) {
          postMessage({type: &quot;finish&quot;, hash: &quot;&quot;+md5.finalize()});
      }
  }
  </code></pre>
  <p>UPDATE: FF throws error from question title, when i try code in chrome, i'm getting <code>Uncaught [object DOMException]</code> error.</p>
  <p>I have tried different ways to enter path, both windows and linux style, tried both relative and full path, but it's not working.</p>
  <p>I guess, for some reason, code can't find file on disk, but don't know why.
  Can someone help with this?</p>