Skip to content
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

Error: Must give hashtype string as argument. #51

Open
garlofrank opened this issue May 9, 2015 · 10 comments
Open

Error: Must give hashtype string as argument. #51

garlofrank opened this issue May 9, 2015 · 10 comments

Comments

@garlofrank
Copy link

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. (/home/testing/pruebanode/flylatex/node_modules/socket.io/lib/manager.js:119:10)
at HTTPServer.EventEmitter.emit (events.js:98:17)
at HTTPParser.parser.onIncoming (http.js:2108:12)
at HTTPParser.parserOnHeadersComplete as onHeadersComplete
at Socket.socket.ondata (http.js:1966:22)
at TCP.onread (net.js:525:27)

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)

@garlofrank garlofrank changed the title I'm not sure for this error. Error: Must give hashtype string as argument. May 9, 2015
@philippmuller
Copy link

+1

@dearchap
Copy link

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 ?

@malcm
Copy link

malcm commented Jun 3, 2015

Any idea to solve this issue?

@hgGeorg
Copy link

hgGeorg commented Jun 26, 2015

Update connect-mongo to a newer version.

@Magger
Copy link

Magger commented Jun 30, 2015

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?

@hgGeorg
Copy link

hgGeorg commented Jun 30, 2015

Change the line

"connect-mongo" : "0.4.x"

to

"connect-mongo" : "*"

then run

npm update --save connect-mongo

@Magger
Copy link

Magger commented Jun 30, 2015

Change the line
"connect-mongo" : "0.4.x"

to
"connect-mongo" : "*"

In which file?

@Magger
Copy link

Magger commented Jul 1, 2015

I have changed the corresponding line in the packages.json file, updated the connect-mongo package and now it seems to work. Thanks.

@lxidea
Copy link

lxidea commented Jul 27, 2015

Solve my problem. Thanks.

@tobiashochguertel
Copy link

Thanks @hgGeorg Worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants