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

Error: reCAPTCHA client has been deleted: 0 #136

Open
1 of 4 tasks
gempain opened this issue Feb 2, 2019 · 14 comments
Open
1 of 4 tasks

Error: reCAPTCHA client has been deleted: 0 #136

gempain opened this issue Feb 2, 2019 · 14 comments
Labels
🔥 fire 🔥 When something truly extraordinary happens

Comments

@gempain
Copy link

gempain commented Feb 2, 2019

Summary

I'm submitting a:

  • bug report
  • feature request
  • question / support request
  • other

Description

I use the forms module and use the recaptcha component as follows:

<re-captcha formControlName="captcha"></re-captcha>

After my form is successfully submitted, I remove it from the DOM using an *ngIf to show a "Thank you" message and a "Start over" button. When I click on the Start over button, the form reappears as I set the ngIf condition to true and reset my form using form.reset(). When this happens, I get the following error:

screen shot 2019-02-02 at 23 42 18

Workaround

In my template:

<re-captcha (resolved)="recaptchaResolved($event)"></re-captcha>

In my component:

recaptchaResolved(response: string) {
    this.form.get('captcha').setValue(response);
  }

Lib versions:

  • ng-recaptcha: 4.2.1
  • Angular: 7.2.0
  • Typescript (tsc --version): 3.2.2
@Bigdeeua
Copy link

I have the same issue with react

@hgrubst
Copy link

hgrubst commented Apr 19, 2019

Same issue here that started happening today for some reason.
The issue happens when I navigate away from the page and the component including the captcha gets reset in the ngOnDestroy.
Not sure why it has started happening only today.

@CIAMoptimist29
Copy link

Same issue here, that started at around 3pm EST.
Affected a major Fortune Company's System that utilized ReCaptcha in Production.
Had to design workaround to get functioning again by bypassing this error.

@miex0r
Copy link

miex0r commented Apr 19, 2019

Same here - work around for me was to update the component which renders ReactGoogleRecaptcha to dispose of the instance before it unmounts.

    // hack fix here to make sure reCaptcha resets before component unmounts
    this.reCaptchaInstance.reset();

    // and then we must unset our widgetId or else ReCAPTCHA.prototype.reset will crash
    this.reCaptchaInstance._widgetId = undefined;
  }

@millerbennett
Copy link

millerbennett commented Apr 19, 2019

We are hitting this as well. Any ideas on what changed to cause this issue? Did google make an update?

Edit: This resolved itself on our side without any changes.

@CIAMoptimist29
Copy link

CIAMoptimist29 commented Apr 19, 2019 via email

@millerbennett
Copy link

Do you happen to have a source on that - was there a post about it?

@CIAMoptimist29
Copy link

We have a contact within Google Engineering, but we will be following up with them to see if there is a public bulletin that will be posted about it. If they do release it, I will be sure to provide it back here. I know this affected many people from their email.

@robframpton
Copy link

Ran into this using a React implementation the same day across multiple projects. Confirmed that it's resolved itself, but very strange that I can't find a changelog anywhere to verify that a change on their side caused the issue. 🤷‍♂️

@DethAriel
Copy link
Owner

@CIAMoptimist29 was there a bulletin by any chance?

@DethAriel DethAriel added the 🔥 fire 🔥 When something truly extraordinary happens label Jun 4, 2019
@ivanff
Copy link

ivanff commented Nov 8, 2019

+1

2 similar comments
@duymon178
Copy link

+1

@willvlad
Copy link

willvlad commented Mar 9, 2021

+1

@MohamedMahsoon97
Copy link

this.reCaptchaInstance.reset();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔥 fire 🔥 When something truly extraordinary happens
Projects
None yet
Development

No branches or pull requests