Cloudron CLI & 2FA
-
Hi, if I try to login locally to cloudron via the CLI with 2FA enabled, I only get the option to login with user/pass. Then it fails.
The docs at cloudron login -h don't show how to proceed
Failed to login: Cannot destructure property 'rejectUnauthorized' of 'options' as it is undefined. -
Hi, if I try to login locally to cloudron via the CLI with 2FA enabled, I only get the option to login with user/pass. Then it fails.
The docs at cloudron login -h don't show how to proceed
Failed to login: Cannot destructure property 'rejectUnauthorized' of 'options' as it is undefined. -
@ghodgeon this is most likely a node version issue. You need atleast node 14 for the CLI. You can check your current version using
node --version. -
We have run into the same issue this morning. But running node
16.13.0-deb-1nodesource1(which is current version from their repo).After a downgrade of the cloudron cli to 4.11.0 the login succeeded.
@fbartels What version of CLI did you downgrade from?
The error message is coming from https://git.cloudron.io/cloudron/cloudron-cli/-/blob/master/src/actions.js#L310 . I think the actual exception is caused by the de-structuring in
https://git.cloudron.io/cloudron/cloudron-cli/-/blob/master/src/actions.js#L255 . Strange, I don't see how options can ever beundefined.const [error, result] = await safe(authenticate(adminFqdn, username, password, { rejectUnauthorized, askForTotpToken: false })); if (error) return exit(`Failed to login: ${error.message}`); -
@fbartels @ghodgeon
I guess you have 2FA enabled? I can reproduce it with 2FA. (er, doh, i didn't see the title of this post).$ cloudron login my.cloudron.domain Existing token possibly expired: Invalid token. Use cloudron login again. Username: girish Password: ********* Failed to login: Cannot destructure property 'rejectUnauthorized' of 'options' as it is undefined.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login