VividCortex / angular-recaptcha

AngularJS directive to add a reCaptcha widget to your form
http://vividcortex.github.io/angular-recaptcha/
MIT License
496 stars 257 forks source link

Recaptcha doesn't show in chrome #182

Closed AlanNasario closed 7 years ago

AlanNasario commented 7 years ago

I am currently using version 4.0.1, it works fine in edge and explorer, but the widget doesn't show in chrome. I also tried the demo on http://vividcortex.github.io/angular-recaptcha/ which seems to work fine except for chrome.

TheSharpieOne commented 7 years ago

Reinstall Chrome and/or Windows and try again. Also, consider reporting this to the Google reCaptcha team https://groups.google.com/forum/#!forum/recaptcha as this library wraps reCatpcha, any rendering issues would be reCaptcha itself.

AlanNasario commented 7 years ago

I retested http://vividcortex.github.io/angular-recaptcha/ in Chrome, Firefox, Edge and Explorer on multiple computers, and the widget only appeared using Explorer.

Cossens commented 7 years ago

I have observed the same behaviour as AlanNasario accessing the demo site in Chrome 56.0.2924.76

AlanNasario commented 7 years ago

Cossens was it just the demo site? In my project, I can't get the widget to appear without putting the recaptcha api call in the head

Cossens commented 7 years ago

No sorry, I haven't been able to get the demo site going in chrome. I'm just investigating this library as an option for a project. I haven't tried it on my site yet.

TheSharpieOne commented 7 years ago

Can you send a screenshot, browser frame and all? There may be a blocked script. Since Chrome is more secure than Internet Explorer / edge, it may be blocking some assets. Also are there any errors in the developer tools?

AlanNasario commented 7 years ago

Both look similar, firefox and both have an error

TypeError: $document.get is not a function
    at Constructor.provider.$get (angular-recaptcha.js:152)

no errors show in my project, but neither does the widget.

I have tired adding the api call , which has the widget appearing but disappearing after refresh

TheSharpieOne commented 7 years ago

It's interesting that I don't get that, but it appears to be related to jquery not being on the page when angular is loaded. It's already fixed but need to be released. Once it's released, give it another try.

AlanNasario commented 7 years ago

On my project the widget appears when the api call is in the head, but as soon as the page is refreshed it fails to reload the widget

Cossens commented 7 years ago

Hey @AlanNasario, I used v4.0.0 (previous release) in my project and it's working in chrome. You could consider this solution until this issue is resolved.

iambrosi commented 7 years ago

@AlanNasario The latest version(v4.0.2) has been released, which includes the fix mentioned by @TheSharpieOne. Can you please try with the new version and see if the error was resolved?

@AlanNasario @Cossens I haven't been able to reproduce the error you mentioned with the demo site. Maybe your browser is loading a cached version of the previous v4.0.1?

iambrosi commented 7 years ago

I forgot to build the release for v4.0.2 😠 A new version v4.0.3 has been released

Cossens commented 7 years ago

@iambrosi I am retrieving an older version.

image

Inspecting the source shows it was built on the 18th of Jan.

Could it be that you need to purge the CDN? The same version shows up in chrome when I disable cache and when I viewed the site in Edge for the first time.

mtrias commented 7 years ago

Doh ... Github's CDN cache is permanent by url.

I just updated the demo site to use rawgit and the latest AngularJS version. Could you please retry?

Cossens commented 7 years ago

Perfect! Well done team.

image

mtrias commented 7 years ago

Thanks for your help everyone!

AlanNasario commented 7 years ago

I got 4.0.3, I put in like on the fixed demo page and it works.