Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captcha causes error - Uncaught (in promise): Timeout - Captcha lib bug #7051

Closed
JacobSiegle opened this issue Dec 28, 2018 · 2 comments
Closed

Comments

@JacobSiegle
Copy link
Contributor

JacobSiegle commented Dec 28, 2018

Ongoing issue with recaptcha -
DethAriel/ng-recaptcha#123

I'll leave the issue open for anyone else who stumbles upon it. Maintainer can close if they would like.

Bug reproduce

  1. Swap quickly back and forth between captcha component and another component for a few seconds.
  2. Wait about 10 seconds and see if the error pops up.
  3. If the error does not show up go to step 1.

image

@JacobSiegle JacobSiegle reopened this Mar 20, 2019
@JacobSiegle JacobSiegle changed the title Captcha causes error - Uncaught (in promise): Timeout Captcha causes error - Uncaught (in promise): Timeout - Captcha lib bug Mar 29, 2019
@cagataycivici
Copy link
Member

Seems like an issue with recaptcha.

@benjamin-wilson
Copy link

I was able to fix this issue by removing the <script> tag in index.html and doing this in the component i'm using captcha:

Inject:

private _renderer2: Renderer2,
@Inject(DOCUMENT) private _document: Document

In constructor:

    let script = this._renderer2.createElement('script');
    script.type = 'text/javascript';
    script.src = 'https://www.google.com/recaptcha/api.js?render=explicit&onload=initRecaptcha';
    script.async = true;
    script.defer = true;
    this._renderer2.appendChild(this._document.body, script);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants