Closed abdulsamad closed 3 years ago
I have the same error but only when I pass query params in my URL and with Gatsby too
I am not able to reproduce this issue. Please share a more detailed scenario and the versions of hcaptcha
, gatsby
etc. @abdulsamad
The error "[hCaptcha] render: invalid container 'null'".
happens probably because of some sort of gatsby encapsulation of the hcaptcha
dom element and document.findElementById
cannot find it.
I have this error with Gatsby v2.30.3 and hcaptcha/react-hcaptcha 0.3.0
My scenario is :
But if I come from an internal link to my register page (without query parameter) everything is fine and it doesn't work only in "build" mode but it works in "dev" mode
I am not able to reproduce this issue. Please share a more detailed scenario and the versions of
hcaptcha
,gatsby
etc. @abdulsamadThe error
"[hCaptcha] render: invalid container 'null'".
happens probably because of some sort of gatsby encapsulation of thehcaptcha
dom element anddocument.findElementById
cannot find it.
chrome - 88.0.4324.96 gatsby - 2.26.1 styled-components - 1.12.0 @hcaptcha/react-hcaptcha - 0.2.2 react & react-dom - 16.12.0 yarn - 1.22.10
Please try version 0.3.2
and let me know if it solves your issue.
npm install -S @hcaptcha/react-hcaptcha@0.3.2
@abdulsamad @Johann-S
It's working in @hcaptcha/react-hcaptcha@0.3.2 Thank you so much @DSergiu
it's working thanks @DSergiu 👍
Super. I will close this as it seems to be resolved.
hCaptcha is not a rendering giving an error "[hCaptcha] render: invalid container 'null'".
Browser - Chrome (v87.0.4280.141) Technologies - Gatsby Styled-components
it only works after wrapping it in a form tag without any sibling. The nesting of the form tag is also not valid I guess.