Uncaught SecurityError: Blocked a frame with origin "https://www.google.com" from accessing a frame with origin "http://my.site.com".
Asked Answered
D

2

6

I am using google reCaptcha v2.0 and this is working in the same domain when i am trying to do it with a sample html page but same thing is not working when I am trying to integrate with the full production page. After clicking on reCaptcha checkbox it's keep on loading for sometimes and after that it is throwing the error below in details.

Uncaught SecurityError: Blocked a frame with origin "https://www.google.com" from accessing a frame with origin "http://my.site.com". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.

I have tried removing http, https and just kept // so that site protocol can match but no luck. Would be a great help if anyone has a solution here.

Thanks in advance.

Danby answered 26/5, 2016 at 10:27 Comment(2)
Just open your site with https://your-domain.com and it will workInstrument
@SimonSchüpbach: But my site is not SSL enabled and I don't know what is the impact if will add a self certified SSL. Is there any thing else you can see here ?Danby
A
3

When the src is running on https, your web server must be SSL enabled

Anus answered 7/9, 2017 at 6:38 Comment(1)
This was absolutely my problem. Thanks so much for this, was driving me crazy why my cors wasn't taking!Ronel
B
1

Change the recaptcha library URL from https to http

Chrome and other modern browsers will avoid mix HTTP with HTTPS.

Bickering answered 26/5, 2016 at 10:31 Comment(2)
I have tried that one but not working. Even same thing working on same domain with http while doing a sample html page with only captcha implemented. But the problem arrived when i tried integrating with whole page.Danby
Same here, running on locahost. Removed https pu http. Same error. Even tried: //www.google.com/recaptcha/api.js. Still errors. Lame in so many ways.Tartaglia

© 2022 - 2024 — McMap. All rights reserved.