t49tran / react-google-recaptcha-v3

Google Recaptcha V3 integration for React
MIT License
435 stars 91 forks source link

No ReCaptcha client exists #96

Closed phatNfqAsia closed 3 years ago

phatNfqAsia commented 3 years ago

I set up ReCatpcha using Provider and hook as instructed, it does allow the form to be submitted but from the recaptcha_en.js it catch an error like this. I have enabled/disabled the ReCaptcha component but this problem still persist. And the recaptcha_en.js is also minified so I can not get any further info from there.

image

t49tran commented 3 years ago

Hi @phatNfqAsia, without code example there is nothing I can help. Also, please don't spam opening the issues. recaptcha_en.js is Google provided script and I couldn't help with debugging it.

phatNfqAsia commented 3 years ago

Oh very sorry @t49tran, I got a tired mind after a long day and does not investigate the problem thoroughly myself. it is because I use v2 method window.grecaptcha.reset() method which is not available in v3 use case. I remove that line of code and problem disappear. Just note this down in case anyone have trouble migrating v2 to v3 can see :grin: