aoberegg / ep_user_pad_frontend

User Interface for Etherpad Lite
Apache License 2.0
5 stars 8 forks source link

Register error: TypeError msecs must be a number #11

Open danielchou opened 9 years ago

danielchou commented 9 years ago

Hi, I wanna to setup a authentication feature which members could login with their emails. I had installed plugins: user_pad, user_pad_frontend, frontend_community, and set my SMTP information in each one email.json file.

However, there was always error message : "TypeError: msecs must be a number" after I register a new account and then server shutdown gracefully. I checked MySQL and nothing been save in user table. Please see further error details as below.

My setup: -Window server 2008 R2 -ehterpad: v1.5.6 -nodejs: v0.12.4 -npm: v2.0.1

BTW, I also changed emailjs from v0.3.4 to v0.3.12 in package.json of node_module, it seems not working as well.

Please somebody help me to check this issue, don't know which part I missed. Thank you and thank you again.

--Error message TypeError: msecs must be a number at Object.exports.enroll (timers.js:156:11) at TLSSocket.Socket.setTimeout (net.js:337:12) at new SMTPResponse (C:\website\etherpad-lite\node_modules\ep_user_pad_frontend\node_modules\emailjs\smtp\response.js:66:11) at Object.exports.monitor (C:\website\etherpad-lite\node_modules\ep_user_pad_frontend\node_modules\emailjs\smtp\response.js:71:9) at Object.SMTP.connect (C:\website\etherpad-lite\node_modules\ep_user_pad_frontend\node_modules\emailjs\smtp\smtp.js:172:35) at Object.Client._connect (C:\website\etherpad-lite\node_modules\ep_user_pad_frontend\node_modules\emailjs\smtp\client.js:68:17) at Object.Client._poll (C:\website\etherpad-lite\node_modules\ep_user_pad_frontend\node_modules\emailjs\smtp\client.js:28:18) at C:\website\etherpad-lite\node_modules\ep_user_pad_frontend\node_modules\emailjs\smtp\client.js:102:21 at Object.Message.valid (C:\website\etherpad-lite\node_modules\ep_user_pad_frontend\node_modules\emailjs\smtp\message.js:134:10) at Object.Client.send (C:\website\etherpad-lite\node_modules\ep_user_pad_frontend\node_modules\emailjs\smtp\client.js:83:14)

BlackyFox commented 9 years ago

I've got the exact same error and can't figure out what to do to resolve it... Any news ? I'm running on Debian 7 - 32 bits Etherpad 1.5.6 Node.js v0.12.2

BlackyFox commented 9 years ago

I actually found the problem and solved it. You need to go in the following folder :

"EtherPad path"/node_modules/ep_user_pad_frontend/node_modules/emailjs

Inside you'll find the file "response.js". Open it and get to the line 73. Normally, ther is something like :

return new SMTPResponse(stream);

The thing is you need the avec the timeout ime given as a parameter. So choose the one you want (I took 1000) so it will look like it :

return new SMTPResponse(stream, 1000);

After that, reboot EtherPad and normally it should work :)