Error when logging in
-
Hi!
I have installed NodeBB according to the guide and all seems to work well except that when I log in it states "Failed login attempt, please try again." even though I have entered correct credentials and if I refresh the page I am logged in. I have not yet begun to debug this, I wanted to hear here first if anyone else has had this issue occur.
Thanks for a great BB, it's looking really promising and I hope this will get the attention it deserves.
-
Hey @Henrock, that sounds like a potentially serious problem. Was the user properly created? (e.g. do you see your account in the "Users" page?)
-
It was the admin-user I created at setup.
-
I am having the same problem, I can not log in or see the home page.
-
I am now getting a 504 gateway timeout
-
@StuartH your site seems fine to me, let me know if its still down?
@Henrock - just pulled latest on a fresh DB and managed to
node app --setup
and create an admin and then login afterwardslet me know if you're still running into this issue and if you are I can try and help debug with you
-
It was fine after approx 5-10 mins, but did stop completely, also when I went to the support page and tried to go to the forum tab it hanged on me. I thought perhaps you guys where updating?
-
This problem is still happening for me with v. 0.2.0. I've tried a clean install and still not working.
You can see this video for an example: http://www.youtube.com/watch?v=0NxhhyEWQmA
I'm using Node 0.10.22 on a raspberry pi with raspbian.Please guide me on how to debug this.
-
Hm, this doesn't seem to happen on any of our builds. Perhaps it is something specific to the RPi... I have one, although I won't have access until the new year. I'll take a look at it then.
Do you see any error messages in your console?
-
Nothing in the console, all I can see is the POST to /login that gets status 'cancelled' in the chrome network info. Not sure what that means.
-
That's helpful. We'll have to take a look at why it gets canceled... @baris?
-
Can you make sure your cache is cleared and try again? If it is still not working then try adding a
console.log(data, textStatus);
at https://github.com/designcreateplay/NodeBB/blob/master/public/src/forum/login.js#L39 and see what it says.
-
It says:
abort: function (statusText) {
always: function () {
complete: function () {
done: function () {
error: function () {
fail: function () {
arguments: null
caller: null
length: 0
name: ""
prototype: Object
proto: function Empty() {}
<function scope>
getAllResponseHeaders: function () {
getResponseHeader: function (key) {
overrideMimeType: function (type) {
pipe: function ( /* fnDone, fnFail, fnProgress / ) {
progress: function () {
promise: function (obj) {
readyState: 0
responseJSON: undefined
setRequestHeader: function (name, value) {
state: function () {
status: 0
statusCode: function (map) {
statusText: "timeout"
success: function () {
then: function ( / fnDone, fnFail, fnProgress */ ) {
proto: Object
-
Ok, I found what the problem is. It's the timeout on the AJAX call that is too low because on the raspberry pi the bcrypt.compare takes about 2 seconds to execute.
Change https://github.com/designcreateplay/NodeBB/blob/master/public/src/forum/login.js#L44 from 2000 to 5000 and it works. This could obviously be handled in a better way but that is atleast a working workaround.
-
Wow @Henrock, nice find!
If it's possible for us to eliminate the timeout altogether...
-
got "similar problem" with mongodb...
first.. when i try to setup a admin user.. i got the error
/home/forum/nodebb/node_modules/mongodb/lib/mongodb/connection/base.js:242
throw message;
^
ReferenceError: templates is not definedbut the is created... then when i try to login...
fail attempt to login
... and the nodebb crash with the error/home/forum/nodebb/node_modules/mongodb/lib/mongodb/connection/base.js:242
throw message;
^
Error: data and hash arguments required
-
Is that the whole stacktrace?
-
@Leonardo-Galani can you try again with the latest code? That bug was possibly fixed yesterday
-
Hmm it worked out.. thks