TypeError: Converting circular structure to JSON - by registration
-
I have latest version of nodebb pulled from master.
This happends when I try to click on register ( sign in works good):
TypeError: Converting circular structure to JSON at Object.stringify (native) at ServerResponse.res.json (/Users/user/Code/Projects/forum/node_modules/express/lib/response.js:185:19) at ServerResponse.res.render (/Users/user/Code/Projects/forum/src/middleware/middleware.js:321:15) at Object.<anonymous> (/Users/user/Code/Projects/forum/src/controllers/index.js:214:7) at Object.Plugins.fireHook (/Users/user/Code/Projects/forum/src/plugins.js:362:14) at Controllers.register (/Users/user/Code/Projects/forum/src/controllers/index.js:210:10) at callbacks (/Users/user/Code/Projects/forum/node_modules/express/lib/router/index.js:161:37) at param (/Users/user/Code/Projects/forum/node_modules/express/lib/router/index.js:135:11) at pass (/Users/user/Code/Projects/forum/node_modules/express/lib/router/index.js:142:5) at nextRoute (/Users/user/Code/Projects/forum/node_modules/express/lib/router/index.js:100:7
-
Thanks for reporting.
passing req to fireHook causes circular reference · Issue #1540 · NodeBB/NodeBB
I think this was added recently for the filter:register:build hook. https://github.com/designcreateplay/NodeBB/blob/master/src/controllers/index.js#L210 https://community.nodebb.org/topic/1525/typeerror-converting-circular-structure-to-j...
GitHub (github.com)
-
Ok, so... is this fixed? I'm a bit confused because both issues are closed.
-
@baris Hmm, okay. I guess I misread the labels. >.<
-
Until #1540 is resolved, and if you are on
master
branch, please either downgrade tov0.4.x
branch, or use the following stable(-er) hash: 6ec36a00ad7828041346f55013374f2eee579480git reset --hard 6ec36a00ad7828041346f55013374f2eee579480
-
@julian said:
git reset --hard 6ec36a00ad7828041346f55013374f2eee579480
In my case, the given hash does not seem to fix the problem
Or am I doing something wrong? I entered
git reset --hard 6ec36a00ad7828041346f55013374f2eee579480
, thengit pull
(?) and lastly./nodebb upgrade