Support Article

Google recaptcha is not opening in chrome

SA-32715

Summary



Google recaptcha not opening in Chrome while it works in Internet Explorer browser.

Error Messages


Chrome's developer toolbar Console displays error message as shown below:


Steps to Reproduce



1. Attempt to implement google ReCaptcha as outlined in this PDN article.
https://pdn.pega.com/customizing-captcha-presentation-and-function

2. Follow steps outlined in this document for avoiding Content Security Policy violations.
https://developers.google.com/recaptcha/docs/faq#im-using-content-security-policy-csp-on-my-website-how-can-i-configure-it-to-work-with-recaptcha


Root Cause



An issue in the custom application code or rules.

1. Developer had configured Content Security Policy. They had a few missing links in their script-src section (
https://www.google.com/js/) and image-src section (https://www.google.com/recaptcha/api/image).

2. Developer was using http protocol instead of https in two places (Code that went inside
pyCustomCaptchaBody as well as as well as endpoint URL specified within pyCustomCaptchaConnector.

pyCustomCaptchaBody



Resolution



Perform the following local-change:

1. Modify Content Security Policy rule to include the following links in Script-src and image-src sections.






2. Use https protocol instead of http protocol in pyCustomCaptchaBody as well as pyCustomCaptchaConnector.

Published January 20, 2017 - Updated February 9, 2017


100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.