Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when logging in: The "salt" argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, or DataView. Received undefined #163

Open
alexflint opened this issue Jun 28, 2022 · 1 comment
Labels
bug Something isn't working need more info

Comments

@alexflint
Copy link

Describe the bug

When I try to log in with the default admin user at http://localhost:3000/account/login, I get the following error

TypeError [ERR_INVALID_ARG_TYPE]: The "salt" argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, or DataView. Received undefined
    at check (node:internal/crypto/pbkdf2:93:10)
    at Object.pbkdf2Sync (node:internal/crypto/pbkdf2:70:5)
    at checkPasswordForUser (webpack-internal:///(api)/./src/lib/api/account/accountManagement.ts:74:62)
    at findUserByCredentials (webpack-internal:///(api)/./src/lib/api/account/accountManagement.ts:100:26)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}

To Reproduce

  1. Start a standard vulcan app
  2. Go to the login page
  3. Log in with the default admin credentials from .env.development

Expected behavior
I expected to be logged in

Screenshots (if applicable)
image

Desktop (if applicable):

  • OS: Arch Linux
  • Browser: Firefox
@alexflint alexflint added the bug Something isn't working label Jun 28, 2022
@eric-burel
Copy link
Collaborator

Are you sure your accountManagement file is up to date? This happens if "user.salt" is not defined, what do you have in the db for this user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more info
Projects
None yet
Development

No branches or pull requests

2 participants