react-redux-firebase: bug(firebase): firebase error "TypeError: Converting circular structure to JSON"

For some reason auth.json has a circular structure in it, firebase version might need to be updated

/Users/joseph/Projects/local_life/node_modules/react-redux-firebase/node_modules/firebase/auth.js:40

Full stack

TypeError: Converting circular structure to JSON
    at Object.stringify (native)
    at module.exports (/Users/joseph/Projects/local_life/node_modules/htmlescape/htmlescape.js:24:15)
    at NextScript.render (/Users/joseph/Projects/local_life/node_modules/next/dist/server/document.js:300:79)
    at /Users/joseph/Projects/local_life/node_modules/react-dom/lib/ReactCompositeComponent.js:795:21
    at measureLifeCyclePerf (/Users/joseph/Projects/local_life/node_modules/react-dom/lib/ReactCompositeComponent.js:75:12)
    at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (/Users/joseph/Projects/local_life/node_modules/react-dom/lib/ReactCompositeComponent.js:794:25)
    at ReactCompositeComponentWrapper._renderValidatedComponent (/Users/joseph/Projects/local_life/node_modules/react-dom/lib/ReactCompositeComponent.js:821:32)
    at ReactCompositeComponentWrapper.performInitialMount (/Users/joseph/Projects/local_life/node_modules/react-dom/lib/ReactCompositeComponent.js:361:30)
    at ReactCompositeComponentWrapper.mountComponent (/Users/joseph/Projects/local_life/node_modules/react-dom/lib/ReactCompositeComponent.js:257:21)
    at Object.mountComponent (/Users/joseph/Projects/local_life/node_modules/react-dom/lib/ReactReconciler.js:45:35)

/Users/joseph/Projects/local_life/node_modules/react-redux-firebase/node_modules/firebase/auth.js:40
h.send=function(a){if(a)if("string"==typeof a)this.ua.send(a);else throw Error("Only string data is supported");else this.ua.send()};h.abort=function(){this.ua.abort()};h.setRequestHeader=function(){};h.Re=function(){this.status=200;this.responseText=this.ua.responseText;Ic(this,4)};h.Sd=function(){this.status=500;this.responseText="";Ic(this,4)};h.Te=function(){this.Sd()};h.Se=function(){this.status=200;Ic(this,1)};var Ic=function(a,b){a.readyState=b;if(a.onreadystatechange)a.onreadystatechange()};var Jc=function(a,b,c){this.ef=c;this.Fe=a;this.wf=b;this.sc=0;this.lc=null};Jc.prototype.get=function(){var a;0<this.sc?(this.sc--,a=this.lc,this.lc=a.next,a.next=null):a=this.Fe();return a};Jc.prototype.put=function(a){this.wf(a);this.sc<this.ef&&(this.sc++,a.next=this.lc,this.lc=a)};var Kc=function(a){l.setTimeout(function(){throw a;},0)},Lc,Mc=function(){var a=l.MessageChannel;"undefined"===typeof a&&"undefine
Error: This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.
error Command failed with exit code 1.

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Hey @cmcewen and @walleXD → So it’s been a bit since I wrote this and I’m not exactly sure how I solved the issue but there’s a good chance this gist will provide you with the light you need. If not drop me a line and I’ll look further down the line but this should do the trick. In the attached gist I have the redux-wrapper HOC I created (that I think solved the issue and you’re free to use) as well as an example /page root dir component that uses the said redux-wrapper HOC.

https://gist.github.com/artisin/d56750d955ff4a60ed11e6a714cbd1bd

@prescottprue Here’s the repo I am working on.

The project is created using learn but once you cd into the apps/web folder and can run any of the yarn commands. I hope the repo helps to pin down why the SSR breaks. Both the next-redux-wrapper and custom redux setup lead to the same issue