question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Using ng-recaptcha in different components on the same page navigated by router-outlet

See original GitHub issue

Hello,

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:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Rob-Shnaydercommented, May 26, 2017

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.

2reactions
cihy2commented, May 23, 2017

This also happens to me.

Uncaught TypeError: Cannot read property 'render' of null
    at Vp (recaptcha__pl.js:394)
    at Np.Hk (recaptcha__pl.js:395)
    at ZoneDelegate.invokeTask (zone.js:414)
    at Zone.runTask (zone.js:181)
    at ZoneTask.invoke (zone.js:476)
    at timer (zone.js:1491)
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found