Login error serverconnectForm.js:249

Hey Guys,

I am stuck with simple login page, issue
POST xxxxxdmxConnect/api/login.php 500 (Internal Server Error)
I have followed guides and rechecked all, can’t find where is the problem

  1. server side.
    created connection to database, security login and provider.

form side:



remember me checkbox:

webpage url:


please help

You should check the exact error 500 to see what is wrong, see:

hi @George

I have activated what you mentioned and tried to login
getting same error…

Yes the error will be the same but now you can expand the response in the network tab and see the real reason as explained in the article above

Hi @George

Thank you again for the debug info

here what it says:

  1. line: 44
  2. message: “Call to a member function login() on null”

please advice where can the issue be?

Hi @George,

I have managed to solve the issue, the reason was that i added security login before security provider,
therefor could not fill the provider field.

now i do get reply of 401 - Unauthorized…

I assume that the issue is with password hashing.
But i can’t find the reason.
I used the same password parameters for the field. ( generate sha256 + same salt value)

please advice what else could cause 401. thnx

A 401 response from the login means that validation failed, so the username/password didn’t match. Did you use exactly the same hashing method to generate the password. 3rd party software can generate different hashes with same password and salt, if it was generated not with Server Connect then it is possible that the hash generates different.

1 Like

@patrick you were right,
for some reason when i tried to generate on external services sha256 + same salt, some resources give different hash…
I don’t understand why, but it is as you said.

There is no default rule on how to use the salt, some put it in front of the password, some at the end or have an other custom solution. We paste the salt to the end of the password and hash the string then.

An other difference can be the case, some services return the string in uppercase while others use lowercase. I believe that we use lowercase.

If you know how the other service did hash it, like pasting hash in front and using uppercase, then you can manage the same in Wappler like:

(salt + password).sha256().uppercase()

@patrick I have manually updated the hash in database, and was able to login.

I have issue with updating the password field from wappler,
can you please take a look, and maybe help me spot the problem?