title: ReCaptcha V3 Invisible: Uncaught (in promise) Request timed out
body: <p>The following bit of JavaScript is giving me errors about 50% of the time.</p>
  
  <pre><code>grecaptcha.ready(() =&gt; {
      grecaptcha.execute('XXXXXXXX_XXXXXXXX_XXXXXXX', {action: 'XXXXXXXX'}).then(token =&gt; {
          this.rootNode.insertAdjacentHTML('afterbegin', '&lt;input type="hidden" name="g-recaptcha-response" value="' + token + '"&gt;');
          this.onRecaptchaKeyAdded(token);
      });
  });
  </code></pre>
  
  <p>It's being called on pageload, and then submitted later with the form. This error is occurring a little while after the page loads (suggesting what the error says, the request timed out).</p>
  
  <p><a href="https://i.stack.imgur.com/mi9qz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mi9qz.png" alt="Recaptcha Error"></a></p>
  
  <p>Tried a lot of different solutions. No .catch method is available on the promise returned from google, so there's no way to catch the error and simply retry.</p>