I am facing this weird issue where
function signup(data, success, error) {
var payload = JSON.stringify(data);
console.log(payload);
}
gives error at JSON.stringify which goes like:
Uncaught SecurityError: Blocked a frame with origin "http://xxxx:1111" from accessing a frame with origin "https://accounts.google.com". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match.
Please help if anyone knows a solution
PS: I am not making any request to a server. I have included google and fb's login SDKs, which are creating the iframes. I am simply using console.log, with JSON.stringify. I have checked in chrome's console and error shows to be with wherever JSON.stringify exists.
SOLUTION: Apparently an error with JSON object parsing was causing this error. This question is not a duplicate as mentioned.