Skip to main content
Question Protected by CommunityBot
Code is now readable
Source Link
SomeKittens
  • 39.6k
  • 19
  • 117
  • 145

I've got the following...

chrome.extension.sendRequest({   req: "getDocument",   docu: pagedoc,   name: 'name'  }, function(response){   var efjs = response.reply;  }); 

which calls the following..

 case "getBrowserForDocumentAttribute":  alert("ZOMG HERE");  sendResponse({  reply: getBrowserForDocumentAttribute(request.docu,request.name)   });  break; 

However, my code never reaches "ZOMG HERE" but rather throws the following error while running chrome.extension.sendRequest

 Uncaught TypeError: Converting circular structure to JSON chromeHidden.JSON.stringify chrome.Port.postMessage chrome.initExtension.chrome.extension.sendRequest suggestQuery 

Does anyone have any idea what is causing this?

I've got the following...

chrome.extension.sendRequest({   req: "getDocument",   docu: pagedoc,   name: 'name'  }, function(response){   var efjs = response.reply;  }); 

which calls the following..

 case "getBrowserForDocumentAttribute": alert("ZOMG HERE"); sendResponse({ reply: getBrowserForDocumentAttribute(request.docu,request.name)   }); break; 

However, my code never reaches "ZOMG HERE" but rather throws the following error while running chrome.extension.sendRequest

 Uncaught TypeError: Converting circular structure to JSON chromeHidden.JSON.stringify chrome.Port.postMessage chrome.initExtension.chrome.extension.sendRequest suggestQuery 

Does anyone have any idea what is causing this?

I've got the following...

chrome.extension.sendRequest({ req: "getDocument", docu: pagedoc, name: 'name' }, function(response){ var efjs = response.reply; }); 

which calls the following..

case "getBrowserForDocumentAttribute":  alert("ZOMG HERE");  sendResponse({  reply: getBrowserForDocumentAttribute(request.docu,request.name) });  break; 

However, my code never reaches "ZOMG HERE" but rather throws the following error while running chrome.extension.sendRequest

 Uncaught TypeError: Converting circular structure to JSON chromeHidden.JSON.stringify chrome.Port.postMessage chrome.initExtension.chrome.extension.sendRequest suggestQuery 

Does anyone have any idea what is causing this?

Source Link
Skizit
  • 45.1k
  • 93
  • 215
  • 271

Chrome sendrequest error: TypeError: Converting circular structure to JSON

I've got the following...

chrome.extension.sendRequest({ req: "getDocument", docu: pagedoc, name: 'name' }, function(response){ var efjs = response.reply; }); 

which calls the following..

 case "getBrowserForDocumentAttribute": alert("ZOMG HERE"); sendResponse({ reply: getBrowserForDocumentAttribute(request.docu,request.name) }); break; 

However, my code never reaches "ZOMG HERE" but rather throws the following error while running chrome.extension.sendRequest

 Uncaught TypeError: Converting circular structure to JSON chromeHidden.JSON.stringify chrome.Port.postMessage chrome.initExtension.chrome.extension.sendRequest suggestQuery 

Does anyone have any idea what is causing this?