dozoisch / dozoisch/react-google-recaptcha
Cannot read property 'style' of null
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
react-google-recaptcha version: 1.0.5
react-async-script version: N/A
This error only seems to happen when recaptcha suspects that I'm a robot and shows me the annoying pictures of cars/buses/etc.
This is the error:
```
Uncaught TypeError: Cannot read property 'style' of null
at B (VM952 recaptcha__en.js:181)
at iC. (VM952 recaptcha__en.js:482)
B @ recaptcha__en.js:181
(anonymous) @ recaptcha__en.js:482
setTimeout (async)
a @ recaptcha__en.js:106
f0 @ recaptcha__en.js:482
BG @ recaptcha__en.js:484
t.NP @ recaptcha__en.js:506
r.W @ recaptcha__en.js:325
(anonymous) @ recaptcha__en.js:325
jN @ recaptcha__en.js:12
next @ recaptcha__en.js:12
G @ recaptcha__en.js:14
Promise.then (async)
w @ recaptcha__en.js:14
(anonymous) @ recaptcha__en.js:14
cs @ recaptcha__en.js:14
$v @ recaptcha__en.js:13
Qa @ recaptcha__en.js:325
(anonymous) @ recaptcha__en.js:322
VA @ recaptcha__en.js:90
A2 @ recaptcha__en.js:92
J2.G @ recaptcha__en.js:89
```
My code:
```js
(this.recaptchaInstance = e)}
sitekey="my-key"
size="invisible"
onChange={this.verifyCaptchaCallback}
onExpired={() => this.recaptchaInstance.reset()}
onErrored={err => console.error(`Recaptcha error: ${err}`)}
/>
executeCaptcha = () => {
this.recaptchaInstance.execute()
}
verifyCaptchaCallback = async response => {
...
}
```
The error doesn't seem to have any negative effect, so it seems to match what's written here (https://github.com/google/google-api-javascript-client/issues/281), i.e, that it can be ignored. But that same issue seems to mention a fix: https://github.com/google/google-api-javascript-client/issues/281#issuecomment-339077537
So maybe this library can use this fix?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.