Chrome sendrequest error: TypeError: Converting circular structure to JSON

后端 未结 11 1224
醉梦人生
醉梦人生 2020-11-22 04:16

I\'ve got the following...

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


        
11条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 05:05

    For my case I was getting that error when I was using async function on my server-side to fetch documents using mongoose. It turned out that the reason was I forgot to put await before calling find({}) method. Adding that part fixed my issue.

提交回复
热议问题