Weird errors on registration form submit (missing salt and stat)

Hey there :wave:

I’m not sure this is the right place to report this issue I’m having, not sure if it’s a bug…

I’m getting these errors when I test my registration page:

First try I get this:
{status: "500", message: "error:02016002:system library:stat:No such file or directory",…} message: "error:02016002:system library:stat:No such file or directory" stack: "Error: error:02016002:system library:stat:No such file or directory↵ at Object.scryptSync (internal/crypto/scrypt.js:55:15)↵ at DatabaseProvider.encrypt (/home/xxx/lib/auth/provider.js:98:28)↵ at DatabaseProvider.login (/home/xxx/lib/auth/provider.js:57:62)↵ at processTicksAndRejections (internal/process/task_queues.js:93:5)↵ at async App._exec (/home/xxx/lib/core/app.js:427:30)↵ at async App._exec (/home/xxx/lib/core/app.js:398:17)↵ at async App.exec (/home/xxx/lib/core/app.js:367:9)↵ at async App.define (/home/xxx/lib/core/app.js:357:9)" status: "500"

Then, I refresh and I now get this new error on every try:

{"status":"500","message":"error:3407B06F:KDF routines:kdf_scrypt_derive:missing salt","stack":"Error: error:3407B06F:KDF routines:kdf_scrypt_derive:missing salt\n at Object.scryptSync (internal/crypto/scrypt.js:55:15)\n at DatabaseProvider.encrypt (/home/xxx/lib/auth/provider.js:98:28)\n at DatabaseProvider.login (/home/xxx/lib/auth/provider.js:57:62)\n at processTicksAndRejections (internal/process/task_queues.js:93:5)\n at async App._exec (/home/xxx/lib/core/app.js:427:30)\n at async App._exec (/home/xxx/lib/core/app.js:398:17)\n at async App.exec (/home/xxx/lib/core/app.js:367:9)\n at async App.define (/home/xxx/lib/core/app.js:357:9)"}

Do you have any idea why this is happening and how to fix it? Note that the user is correctly created in my database.

I’ve checked my node packages, updated and installed everything…

Thanks!

The error is from the security provider when it is trying to write a secure user cookie. Check in your server connect global settings if a secret secret key is set.

image

image

Thanks @patrick!
I’ve just checked it and it’s already set…

Check if it is also saved in app/config/config.json. The dialog generates a random key if there isn’t one, but it doesn’t save that automatically.

It’s correctly set:
Screen Shot 2021-02-05 at 11.52.22

Hey @patrick, any news about this? :slight_smile:

The error is with scrypt, this is part of the NodeJS crypto module. I did a search on google and in most cases it was related to an invalid/corrupted OpenSSL installation.

Thank you Patrick, I will check this and keep you posted :wink:

Hi @patrick,
I just moved an app from dev to prod. Its on the same hosting server. And its giving the same two errors as shared by @ChristopheA. On dev its working perfectly fine.
I am on 3.8.3, and have rechecked that all files are uploaded correctly. Even the secret key is in place.
Can you please help?

Compared my DEV node options with the PROD one… and found that using older version of NodeJS gets rid of this error:

Error:

image

Works:

image

This is from a shared hosting with cPanel.

Like you have mentioned, Google search suggests it has something to do with OpenSSL, but this shows it could also be a NodeJS issue.

1 Like

Hey Sid :slight_smile:
I had this issue in a shared server as well and changing to NodeJS 12 did change anything, I haven’t tried the 10 version…
I just moved to another hosting company and the issue was resolved. :sweat_smile:

Damn. That's an extreme way to resolve issues. :laughing:

Will contact my hosting provider too. See if they can do anything.

Since it was just a test, it wasn’t a problem for me haha.
For information it was A2Hosting.
They have a really great support with great servers etc, but they can’t change the OpenSSL version on shared servers.
It’s working like a charm with a Docker machine on DigitalOcean, Vultr, Linode and Hetzner when I tested though :slight_smile:

1 Like