recaptcha
recaptcha copied to clipboard
Thousands of "Cannot read property `get` of undefined" errors
Issue description
At work we're seeing thousands of errors reported through Sentry that say "Cannot read property get of undefined"
Environment
- OS name and version: Windows and Mac
- PHP version: N/A
- Web server name and version: Which web server?
google/recaptchaversion: Latest as served by https://www.recaptcha.net/recaptcha/api.js- Browser name and version:
56.70% | Chrome 89.0.4389 14.43% | Chrome 75.0.3770 7.22% | Chrome 86.0.4240 6.19% | Sogou Explorer 1.0 3.09% | Chrome 78.0.3904 3.09% | Chrome 88.0.4324 3.09% | Chrome 81.0.4044 2.06% | Chrome 85.0.4183 1.03% | Chrome 79.0.3945 1.03% | Chrome 91.0.4442 1.03% | Chrome 80.0.3987 1.03% | Chrome 87.0.4280
Reproducing the issue All of the error messages are like the following, but sometimes it's k.get, j.get, etc.
TypeError: Cannot read property 'get' of undefined
arguments: [{"message":"Cannot read property 'get' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'get' of undefined\n at Array.<anonymous> (https://www.gstatic.com/recaptcha/releases/bfvuz6tShG5aoZp4K4zPVf5t/recaptcha__zh_tw.js:106:312)\n at https://www.gstatic.com/recaptcha/releases/bfvuz6tShG5aoZp4K4zPVf5t/recaptcha__zh_tw.js:215:83\n at t.<anonymous>
Sometimes I see this: Sometimes I just see: TypeError: J is undefined.
{"message":"J is undefined","name":"TypeError","stack":"K</<@https://www.gstatic.cn/recaptcha/releases/539Evs44yecoSf-lkJBQzKKj/recaptcha__zh_cn.js:354:1\nK</<@https://www.gstatic.cn/recaptcha/releases/539Evs44yecoSf-lkJBQzKKj/recaptcha__zh_cn.js:380:80\nb3e0/o</t.prototype.execute/
User steps Unfortunately I cannot provide this information. I work for a private SAAS company.
I having similar errors too, for me it it's happen for some user and for all browser For chromium, error is
Uncaught TypeError: Cannot read property 'get' of undefined
at Array.<anonymous> (recaptcha__en.js:formatted:2149)
at recaptcha__en.js:formatted:5794
For firefox, the error message is difference
Uncaught TypeError: K is undefined
B https://www.gstatic.com/recaptcha/releases/npGaewopg1UaB8CNtYfx-y1j/recaptcha__en.js:96
l https://www.gstatic.com/recaptcha/releases/npGaewopg1UaB8CNtYfx-y1j/recaptcha__en.js:251
start {my_website}/js/gg-recaptcha.js?v=ocbDaVYLtLn5U4sEPX_QlVIi9Bv4Bu-5GSHxwjSMDMY:84
For IE11
SCRIPT5007: Unable to get property 'get' of undefined or null reference
recaptcha__en.js (168,31)
I try CTRL + F5 for few times and this error is gone.
For more infomation, I implement v3 and V2 invisible in same page, load js like this
<script src="https://www.recaptcha.net/recaptcha/api.js?onload=recaptchaV2Onload&render=explicit" async defer></script>
<script src="https://www.recaptcha.net/recaptcha/api.js?onload=recaptchaV3Onload&render=@siteKeyV3"></script>