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

First login generates Error #86

Closed
ddeimeke opened this issue Sep 1, 2020 · 6 comments
Closed

First login generates Error #86

ddeimeke opened this issue Sep 1, 2020 · 6 comments

Comments

@ddeimeke
Copy link

ddeimeke commented Sep 1, 2020

I just installed Umami from a Git clone. Database MariaDB 10.3.24, node 10.19.0, npm 6.13.4. All went well.

Upon first login I get the following error message.

$ npm start

> umami@0.20.0 start /home/umami/umami.git
> next start

info  - Loaded env from /home/umami/umami.git/.env
ready - started server on http://localhost:3000
{ JWEInvalid: could not resolve a usable "alg" for a recipient
    at Encrypt.[PROCESS_RECIPIENT] (/home/umami/umami.git/node_modules/jose/lib/jwe/encrypt.js:100:15)
    at Encrypt.encrypt (/home/umami/umami.git/node_modules/jose/lib/jwe/encrypt.js:170:30)
    at single (/home/umami/umami.git/node_modules/jose/lib/jwe/index.js:8:6)
    at createSecureToken (/home/umami/umami.git/.next/server/pages/api/auth/verify.js:1367:51) name: 'JWEInvalid', code: 'ERR_JWE_INVALID' }
@mikecao
Copy link
Collaborator

mikecao commented Sep 1, 2020

Looks like it's having a problem generating the login cookie. Can you try upgrading your version of node?

@ddeimeke
Copy link
Author

ddeimeke commented Sep 1, 2020

I already am on the latest version available in the software collections of CentOS, which is - by the way - the same version available on the recent version of Ubuntu (20.04).

@mikecao
Copy link
Collaborator

mikecao commented Sep 1, 2020

I wonder if this has anything to do with it, https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options

The algorithm is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are 'sha256', 'sha512', etc. On recent releases of OpenSSL, openssl list -digest-algorithms (openssl list-message-digest-algorithms for older versions of OpenSSL) will display the available digest algorithms.

Specifically, umami is trying to create a sha512 hash using the crypto module from node.

@ddeimeke
Copy link
Author

ddeimeke commented Sep 2, 2020

In my opinion this looks good.

$ openssl list-message-digest-algorithms | grep -i sha512
RSA-SHA512 => SHA512
SHA512
SHA512
sha512WithRSAEncryption => SHA512

@ddeimeke
Copy link
Author

ddeimeke commented Sep 2, 2020

I go with the Docker container for now.

@mikecao
Copy link
Collaborator

mikecao commented Sep 4, 2020

Closing for now since this could be an external issue. Re-open if needed.

@mikecao mikecao closed this as completed Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants