Bug: Using ng-recaptcha in different components on the same page navigated by router-outlet
See original GitHub issueHello,
I use router-outlet for navigation of some pages, each of them has a form using your invisible recaptcha. When I get into one of these pages, and then move to another, I get this exception in my web browser’s console:
Uncaught TypeError: Cannot read property 'render' of null
at Vp (recaptcha__en.js:380)
at Np.Hk (recaptcha__en.js:381)
at ZoneDelegate.webpackJsonp.606.ZoneDelegate.invokeTask (zone.js:414)
at Zone.webpackJsonp.606.Zone.runTask (zone.js:181)
at ZoneTask.invoke (zone.js:476)
at timer (zone.js:1491)
As far as I understand, it happens since the captcha tries to render itself again on the same page, and fails to do that in that previous element since it’s not there anymore, because we just routed to a different page. Since there is no bug in recaptcha itself, I assume this issue should be taken care of in your component.
It sounds similar to this #35 issue, however I get a different exception.
Hopefully you can take a look into it and get it fixed and/or suggest me please I can go around it til then.
Thanks in advance!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Angular 6 - Problems when doing same page navigation from ...
I'm using Angular 6.0.3 and I have a top navigation bar with a search bar in it. The searchService only holds the searchQuery...
Read more >Frequently Asked Questions | reCAPTCHA - Google Developers
Can I run reCAPTCHA v2 and v3 on the same page? To do this, load the v3 site key as documented, and then...
Read more >ng-recaptcha - npm
Start using ng-recaptcha in your project by running `npm i ng-recaptcha`. ... Configuring the component globally; Specifying a different ...
Read more >The ng-recaptcha from DethAriel - GithubHelp
Angular component for Google reCAPTCHA from GithubHelp. ... Bug: Using ng-recaptcha in different components on the same page navigated by router-outlet.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems that this issue has resolved itself due to a new release of recaptcha from google. Version r20170515x was the one causing issues. This morning i checked and it is now version r20170524165316.
This also happens to me.