Uncaught SecurityError in Google iframe when unmounting
See original GitHub issueWhen the component gets unmounted (e.g., when navigating to a different page using react-router), an exception occurs:
Uncaught SecurityError: Blocked a frame with origin "https://www.google.com" from
accessing a frame with origin "localhost". The frame requesting access has a protocol
of "https", the frame being accessed has a protocol of "http". Protocols must match.
Possible solution is to remove the iframe container inserted by the reCAPTCHA script in componentWillUnmount
.
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Googles recaptcha gives "Uncaught SecurityError" after ...
At the end of the document there is a div containing all iframe recaptchas. Removing that div solves the problem but that feels...
Read more >cypress-io/cypress - Gitter
"Uncaught SecurityError: Failed to set the 'domain' property on 'Document': Assignment is forbidden for sandboxed iframes." If the iframe src contains a 3rd ......
Read more >Error: Permission denied to access property 'target'
In Google chrome and firefox, this error occurs as a DOMException, and in Safari, it occurs as a security error. The same origin...
Read more >Uncaught SecurityError: Blocked a frame with origin “https ...
I am using google reCaptcha v2.0 and this is working in the same domain when i am trying to do it with a...
Read more >localStorage Security Issue Cannot Use Polyfill - Google Groups
Put a page in an iframe (for example, an ad or Facebook Canvas application) ... An exception is thrown: "Uncaught SecurityError: Failed to...
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 Free
Top 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
@bobiblazeski Assuming Google hasn’t changed the widget in some way that would affect this, the second solution I suggested should still work as long as you only have one component:
@johanneshilden Many thanks will use that as temporary solution.