title: "Cannot read property 'load' of undefined"
body: <p>I'm attempting to follow <a href="https://developers.google.com/identity/sign-in/web/devconsole-project" rel="noreferrer">this</a> documentation to integrate with Google sign in, though I'm running into this error in console:</p>
  
  <p><code>Uncaught TypeError: Cannot read property 'load' of undefined</code><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>at script.js:1</code></p>
  
  <p><code>script.js</code>:</p>
  
  <pre><code>window.gapi.load('auth2', function() {
      console.log('Loaded!');
  });
  </code></pre>
  
  <p>I get the error about half of the time, and inspecting the network panel in Chrome, it only happens when the following resource is <strong>not</strong> loaded:</p>
  
  <p><code>https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.d2dliHDvPwE.O/m=auth2/exm=signin2/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AGLTcCNGAKhVlpzmTUpjFgzBXLpLM_oEFg/cb=gapi.loaded_1</code></p>
  
  <p>How can I eliminate this error?</p>
  
  <p>If it's useful, here's my <code>index.html</code>:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Google Sign In Test&lt;/title&gt;
          &lt;meta name="google-signin-client_id" content="*****.apps.googleusercontent.com"&gt;
          &lt;script src="https://apis.google.com/js/platform.js" async defer&gt;&lt;/script&gt;
          &lt;script src="script.js" async defer&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div class="g-signin2" data-onsuccess="onSignIn"&gt;&lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>