Error when logging in
-
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.
-
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 -
Hmm it worked out.. thks