0

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.

7HUND3RX
  • 175
  • 3
  • 14
  • You need to make your server use https if you are going to load data from a secure protocol. – Fraser Crosbie Dec 17 '15 at 03:30
  • @FraserCrosbie I am using facebook and google login, and this is happening when I am not even requesting to their server or any other secure server. Just trying to make a request to localhost – 7HUND3RX Dec 17 '15 at 11:20

0 Answers0