-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Admin Account Creation #29855
Comments
Did you tried to create the admin thought the Setup Wizard step? It's easier and the most common flow that users do Questions? Help needed? Feature Requests?
|
Hey @WhiteTiburon I am unsure of the exact format you used for the compose file. But could you please try this (notice the no quotes around the password):
Thank you! |
@Dnouv I used version 3 formatting. I tried what you suggested originally and I got the same error. Also, tried it again to make sure and same error. Receiving an object instead of a string. |
Yea, but want to avoid that step. |
we have a bug here |
Looks like a simple bug to fix. @debdutdeb can you provide a pull request? |
@hugocostadev This suggestions does not solve the problem. The admin creating automation via environment variable needs to work. We must fix the bug. |
I am having the same issues with the newest docker container. For my use case this is necessary as my system comes up fresh every run with Docker volumes wiped. We can (with pain) get around it for now by setting up the first user every time we run. |
Since it is being merged to develop does this mean the fix will not be included in 6.2.10? |
Description:
I am attempting to create an Initial user via the compose file following https://docs.rocket.chat/setup-and-configure/accessing-your-workspace/creating-the-first-administrator and I get a
=== UnHandledPromiseRejection ===
errorClass [Error]: Match error: Expected string, got object
at check (packages/check/match.js:36:17)
at packages/accounts-password/password_server.js:324:3
It leads back to the password not being sent as a string. However, I made sure to make the password a string and still get the same error.
Steps to reproduce:
Expected behavior:
Creates user and I am able to log in.
Actual behavior:
I get this error in the logs:
Inserting admin user:
Name: Administrator
Email: [email protected]
Username: Jon
=== UnHandledPromiseRejection ===
errorClass [Error]: Match error: Expected string, got object
at check (packages/check/match.js:36:17)
at packages/accounts-password/password_server.js:324:3
at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
=> awaited here:
at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
at server/startup/initialData.js:122:4
at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 {
path: '',
sanitizedError: errorClass [Error]: Match failed [400]
at errorClass. (packages/check/match.js:91:27)
at new errorClass (packages/meteor.js:692:17)
at check (packages/check/match.js:36:17)
at packages/accounts-password/password_server.js:324:3
at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 {
isClientSafe: true,
error: 400,
reason: 'Match failed',
details: undefined,
errorType: 'Meteor.Error'
},
errorType: 'Match.Error'
}
Here is what I added to the compose file:
ADMIN_USERNAME: test
ADMIN_PASS: "password"
ADMIN_EMAIL: [email protected]
Server Setup Information:
| Rocket.Chat Version: 6.2.0
| NodeJS Version: 14.21.2 - x64
| MongoDB Version: 5.0.18
| MongoDB Engine: wiredTiger
| Platform: linux
| Process Port: 5182
| Site URL: http://localhost:5182
| ReplicaSet OpLog: Enabled
| Commit Hash: d918834
| Commit Branch: HEAD
Relevant logs:
The text was updated successfully, but these errors were encountered: