-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapter 13 #67
Comments
When including log output like that, please use code formatting (three backticks)...it's very hard to read that stack trace. You might have a tough one there...it looks like a recursive call without a stopping condition, but without being able to look at your code, it would be hard to track down. Do you have your repo on GitHub? I could take a look. |
I 've used Visual Studio 2015 to work on the project. I did some changes. I moved code from newsletter and weather to newletter.js and weather.js to lib folder. |
The problem was in session-mongoose 0.4.1 I upgraded to the latest 0.5. and now it works |
The project goes bananas after cart/add on Klimbing in Bend. I am new at this programming, but I will try to fix it. The problem is in // use domains for better error handling
// create a domain for this request
var domain = require('domain').create();
// handle errors on this domain
domain.on('error', function (err) {
console.error('DOMAIN ERROR CAUGHT\n', err.stack);
GET /vendor/bootstrap/css/bootstrap.min.css 304 6.194 ms - -
GET /vendor/bootstrap/css/bootstrap-theme.min.css 304 8.671 ms - -
GET /css/main.css 304 9.765 ms - -
GET /vendor/js/modernizr-2.6.2-respond-1.1.0.min.js 304 10.337 ms - -
GET /img/logo.png 304 11.263 ms - -
GET /vendor/bootstrap/js/bootstrap.min.js 304 1.314 ms - -
GET /js/main.js 304 2.114 ms - -
GET /vacation/rock-climbing-in-bend 304 22.849 ms - -
GET /vendor/bootstrap/css/bootstrap.min.css 304 1.052 ms - -
GET /vendor/bootstrap/css/bootstrap-theme.min.css 304 3.088 ms - -
GET /css/main.css 304 4.155 ms - -
GET /vendor/js/modernizr-2.6.2-respond-1.1.0.min.js 304 3.041 ms - -
GET /img/logo.png 304 4.177 ms - -
GET /vendor/bootstrap/js/bootstrap.min.js 304 5.358 ms - -
GET /js/main.js 304 2.065 ms - -
POST /cart/add 303 38.234 ms - 58
RangeError: Maximum call stack size exceeded
at Object.cloneObject (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:66:3)
at clone (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:55:20)
at Object.cloneArray (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:109:14)
at clone (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:23:20)
at Object.cloneObject (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:77:13)
at clone (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:55:20)
at Object.cloneObject (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:77:13)
at clone (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:55:20)
at Object.cloneArray (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:109:14)
at clone (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:23:20)
at Object.cloneObject (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:77:13)
at clone (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:55:20)
at Object.cloneObject (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:77:13)
at clone (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:55:20)
at Object.cloneArray (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:109:14)
at clone (D:\Projects\Nodejs\ch13o\node_modules\mquery\lib\utils.js:23:20)
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
at ServerResponse.res.setHeader (D:\Projects\Nodejs\ch13o\node_modules\connect\lib\patch.js:134:22)
at ServerResponse.res.set.res.header (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:551:10)
at ServerResponse.res.send (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:132:12)
at fn (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:778:10)
at ExpressHandlebars.extend._renderTemplate (D:\Projects\Nodejs\ch13o\node_modules\express3-handlebars\lib\express-handlebars.js:340:13)
at ExpressHandlebars.renderTemplate (D:\Projects\Nodejs\ch13o\node_modules\express3-handlebars\lib\express-handlebars.js:196:18)
at fn (D:\Projects\Nodejs\ch13o\node_modules\async\lib\async.js:582:34)
at Immediate._onImmediate (D:\Projects\Nodejs\ch13o\node_modules\async\lib\async.js:498:34)
at processImmediate as _immediateCallback
GET /cart - - ms - -
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
at ServerResponse.res.setHeader (D:\Projects\Nodejs\ch13o\node_modules\connect\lib\patch.js:134:22)
at ServerResponse.res.set.res.header (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:551:10)
at ServerResponse.res.send (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:132:12)
at fn (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:778:10)
at ExpressHandlebars.extend._renderTemplate (D:\Projects\Nodejs\ch13o\node_modules\express3-handlebars\lib\express-handlebars.js:340:13)
at ExpressHandlebars.renderTemplate (D:\Projects\Nodejs\ch13o\node_modules\express3-handlebars\lib\express-handlebars.js:196:18)
at fn (D:\Projects\Nodejs\ch13o\node_modules\async\lib\async.js:582:34)
at Immediate._onImmediate (D:\Projects\Nodejs\ch13o\node_modules\async\lib\async.js:498:34)
at processImmediate as _immediateCallback
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
at ServerResponse.res.setHeader (D:\Projects\Nodejs\ch13o\node_modules\connect\lib\patch.js:134:22)
at ServerResponse.res.set.res.header (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:551:10)
at ServerResponse.res.send (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:132:12)
at fn (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:778:10)
at ExpressHandlebars.extend._renderTemplate (D:\Projects\Nodejs\ch13o\node_modules\express3-handlebars\lib\express-handlebars.js:340:13)
at ExpressHandlebars.renderTemplate (D:\Projects\Nodejs\ch13o\node_modules\express3-handlebars\lib\express-handlebars.js:196:18)
at fn (D:\Projects\Nodejs\ch13o\node_modules\async\lib\async.js:582:34)
at Immediate._onImmediate (D:\Projects\Nodejs\ch13o\node_modules\async\lib\async.js:498:34)
at processImmediate as _immediateCallback
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
at ServerResponse.res.setHeader (D:\Projects\Nodejs\ch13o\node_modules\connect\lib\patch.js:134:22)
at ServerResponse.res.set.res.header (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:551:10)
at ServerResponse.res.send (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:132:12)
at fn (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:778:10)
at ExpressHandlebars.extend._renderTemplate (D:\Projects\Nodejs\ch13o\node_modules\express3-handlebars\lib\express-handlebars.js:340:13)
at ExpressHandlebars.renderTemplate (D:\Projects\Nodejs\ch13o\node_modules\express3-handlebars\lib\express-handlebars.js:196:18)
at fn (D:\Projects\Nodejs\ch13o\node_modules\async\lib\async.js:582:34)
at Immediate._onImmediate (D:\Projects\Nodejs\ch13o\node_modules\async\lib\async.js:498:34)
at processImmediate as _immediateCallback
GET /cart 500 111.183 ms - 1852
GET /vendor/bootstrap/css/bootstrap.min.css 304 8.477 ms - -
GET /vendor/bootstrap/css/bootstrap-theme.min.css 304 10.028 ms - -
GET /css/main.css 304 10.832 ms - -
GET /vendor/js/modernizr-2.6.2-respond-1.1.0.min.js 304 12.270 ms - -
GET /img/logo.png 304 13.454 ms - -
GET /vendor/bootstrap/js/bootstrap.min.js 304 15.646 ms - -
GET /js/main.js 304 4.154 ms - -
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
at ServerResponse.res.setHeader (D:\Projects\Nodejs\ch13o\node_modules\connect\lib\patch.js:134:22)
at ServerResponse.res.set.res.header (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:551:10)
at ServerResponse.res.send (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:132:12)
at fn (D:\Projects\Nodejs\ch13o\node_modules\express\lib\response.js:778:10)
at ExpressHandlebars.extend._renderTemplate (D:\Projects\Nodejs\ch13o\node_modules\express3-handlebars\lib\express-handlebars.js:340:13)
at ExpressHandlebars.renderTemplate (D:\Projects\Nodejs\ch13o\node_modules\express3-handlebars\lib\express-handlebars.js:196:18)
at fn (D:\Projects\Nodejs\ch13o\node_modules\async\lib\async.js:582:34)
at Immediate._onImmediate (D:\Projects\Nodejs\ch13o\node_modules\async\lib\async.js:498:34)
at processImmediate as _immediateCallback
The text was updated successfully, but these errors were encountered: