calcom / docker

The Docker configuration for Cal.com is an effort powered by people within the community. Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.
MIT License
691 stars 363 forks source link

No available user found #213

Open cyango opened 1 year ago

cyango commented 1 year ago

Getting these errors. I can login as usual with my user. But when people try to book it gives this error in the end of the process and they cannot proceed.

image image
krumware commented 1 year ago

@emrysal @zomars any input on this one?

zomars commented 1 year ago

It seems like two different errors:

cyango commented 1 year ago

Trying to book a test event:

image
cyango commented 1 year ago

Even with the latest updates on calendso, this is still happening and preventing next steps...

zomars commented 1 year ago

My questions haven't been addressed. We need more context in order to help you with this.

cyango commented 1 year ago

It seems like two different errors:

  • The first one seems like the encryption key didn't match with the saved credential or it has an invalid value.
  • The latter it seems like the booked user is not available at this time or no users are available for this date if this is a team event.

I can only answer that this example is a single user booking and the time is available, as this happens after time selection.

What more help can I give?

krumware commented 1 year ago

I encountered a similar issue recently, and it was due to keylength being incorrect on the NEXTAUTH_SECRET and CALENDSO_ENCRYPTION_KEY (which I had generated following older documentation). Updated guidance for this was added recently in cal.com core

# You can use: `openssl rand -base64 32` to generate one
NEXTAUTH_SECRET=

# Application Key for symmetric encryption and decryption
# must be 32 bytes for AES256 encryption algorithm
# You can use: `openssl rand -base64 24` to generate one
CALENDSO_ENCRYPTION_KEY=
nicktrn commented 1 year ago

This is caused by a mismatch in encryption and decryption keys, i.e. you changed CALENDSO_ENCRYPTION_KEY after something had already been encrypted. _(code ERR_CRYPTO_INVALID_KEYLEN would be thrown on wrong keylengths)_

My suggestion is to nuke the db and start fresh. But this time, set the env vars before seeding / first launch. Alternatively, delete all secrets in the db and recreate them (don't forget 2fa).