title: JSZip file isn't working:"'Error: The data of 'the loaded zip file' is in an unsupported format !"
body: <p>This error messages comes up:</p>
  
  <pre><code>"Error: The data of 'the loaded zip file' is in an unsupported format !".
  </code></pre>
  
  <p>I am using Google Chrome - latest version.</p>
  
  <p>Here is a pastebin of the code: <a href="https://pastebin.com/svFjr2Jq" rel="nofollow noreferrer">https://pastebin.com/svFjr2Jq</a> (it is too long for stackoverflow).</p>
  
  <p>You can see a template here:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html lang="en" xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;script&gt;
          (jszip)
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      Loading...&lt;br /&gt;
      &lt;progress id="pBar"&gt;&lt;/progress&gt;
      &lt;script&gt;
          var pBar = document.getElementById('pBar');
          var content = atob('(base64 zip)');
          var zipFile = new JSZip();
          main();
          async function loadFile(toLoad, base64) {{
              return await zipFile.file(toLoad + (base64 ? ".txt" : "")).async(base64 ? "text" : "base64");
          }}
          async function loadScript(toLoad) {{
              var content = await loadFile(toLoad, false);
              var script = document.createElement('script');
              script.src = 'data:text/javascript;base64,' + v;
              document.head.appendChild(script);
              await new Promise(callback =&gt; script.onload = callback);
          }}
          async function main()
          {{
              await zipFile.loadAsync(content);
              var content = await zipFile.file('load.txt').async("string");
              var files = arg0.replace(/\r/g, '').split('\n');
              pBar.max = files.length;
              for (var fileName of files)
              {{
                  (pBar ? pBar.value++ : void 0);
                  await loadScript(fileName);
              }}
          }}
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>