flylatex
flylatex copied to clipboard
Error: Must give hashtype string as argument.
Hi everyone.... thank in advance I do not know if this is a issue of flylatex or by another component. Can anybody help me?.
/home/testing/flylatex$ node app.js
info - socket.io started
Express server listening on port 3002 in development mode
Error: Must give hashtype string as argument
at new Hash (crypto.js:188:19)
at Object.Hash (crypto.js:187:12)
at MongoStore.set (/home/testing/pruebanode/flylatex/node_modules/connect-mongo/lib/connect-mongo.js:256:30)
at Session.save (/home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/middleware/session/session.js:83:25)
at ServerResponse.res.end (/home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/middleware/session.js:280:21)
at ServerResponse.res.send (/home/testing/pruebanode/flylatex/node_modules/express/lib/response.js:108:8)
at ServerResponse.res._render (/home/testing/pruebanode/flylatex/node_modules/express/lib/view.js:442:10)
at ServerResponse.res.render (/home/testing/pruebanode/flylatex/node_modules/express/lib/view.js:318:17)
at ServerResponse.res._render (/home/testing/pruebanode/flylatex/node_modules/express/lib/view.js:432:10)
at ServerResponse.res.render (/home/testing/pruebanode/flylatex/node_modules/express/lib/view.js:318:17)
at exports.index (/home/testing/pruebanode/flylatex/routes_lib/index.js:37:9)
at callbacks (/home/testing/pruebanode/flylatex/node_modules/express/lib/router/index.js:272:11)
at exports.preIndex (/home/testing/pruebanode/flylatex/routes.js:93:5)
at callbacks (/home/testing/pruebanode/flylatex/node_modules/express/lib/router/index.js:272:11)
at param (/home/testing/pruebanode/flylatex/node_modules/express/lib/router/index.js:246:11)
at pass (/home/testing/pruebanode/flylatex/node_modules/express/lib/router/index.js:253:5)
at Router._dispatch (/home/testing/pruebanode/flylatex/node_modules/express/lib/router/index.js:280:5)
at Object.Router.middleware as handle
at next (/home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/http.js:204:15)
at Object.session as handle
at next (/home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/http.js:204:15)
at Object.cookieParser as handle
at next (/home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/http.js:204:15)
at Object.methodOverride as handle
at next (/home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/http.js:204:15)
at Object.bodyParser as handle
at next (/home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/http.js:204:15)
at Object.handle (/home/testing/pruebanode/flylatex/node_modules/express/lib/http.js:83:5)
at next (/home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/http.js:204:15)
at HTTPServer.Server.handle (/home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/http.js:217:3)
at Manager.handleRequest (/home/testing/pruebanode/flylatex/node_modules/socket.io/lib/manager.js:588:28)
at HTTPServer.
http.js:691 throw new Error('Can't set headers after they are sent.'); ^ Error: Can't set headers after they are sent. at ServerResponse.OutgoingMessage.setHeader (http.js:691:11) at ServerResponse.res.setHeader (/home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/patch.js:62:20) at /home/testing/pruebanode/flylatex/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js:72:19 at fs.js:266:14 at /usr/lib/nodejs/graceful-fs.js:94:5 at Object.oncomplete (fs.js:107:15)
+1
I have tried this on 2 different machines and gotten the same error. Is it something with a newer version of express or some other framework ?
Any idea to solve this issue?
Update connect-mongo to a newer version.
I have got the same problem.
Update connect-mongo to a newer version.
I tried to npm install connect-mongo and npm update connect-mongo but the problem remains. What shall I try next?
Change the line
"connect-mongo" : "0.4.x"
to
"connect-mongo" : "*"
then run
npm update --save connect-mongo
Change the line "connect-mongo" : "0.4.x"
to "connect-mongo" : "*"
In which file?
I have changed the corresponding line in the packages.json file, updated the connect-mongo package and now it seems to work. Thanks.
Solve my problem. Thanks.
Thanks @hgGeorg Worked for me.