Connect to CalDav (Beta) #18676
Replies: 5 comments 4 replies
-
The "Invalid key length" error likely relates to the encryption key used for securing CalDav connections. In the Cal.com codebase, the symmetric encryption function uses the AES256 algorithm, which requires a key length of 32 bytes. You need to ensure that the You can generate a suitable key using the following command: openssl rand -base64 32 Make sure to set this generated key in your environment configuration. This should resolve the "Invalid key length" error when connecting to your Radicale server [1][2]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
Restart server too?
… On 15 Jan 2025, at 1:17 PM, dosubot[bot] ***@***.***> wrote:
The "Invalid key length" error likely relates to the encryption key used for securing CalDav connections. In the Cal.com codebase, the symmetric encryption function uses the AES256 algorithm, which requires a key length of 32 bytes. You need to ensure that the CALENDSO_ENCRYPTION_KEY environment variable is set to a 32-byte value.
You can generate a suitable key using the following command:
openssl rand -base64 32
Make sure to set this generated key in your environment configuration. This should resolve the "Invalid key length" error when connecting to your Radicale server [1] <https://github.com/calcom/cal.com/blob/main/app.json>[2] <https://github.com/calcom/cal.com/blob/main/.env.example>.
To continue talking to Dosu <https://dosu.dev/>, mention @dosu <https://github.com/dosu>.
Help Dosu learn! Give it feedback: Great Response <https://app.dosu.dev/response-feedback/b749d400-c741-4549-9ca8-309b7338c900?feedback_type=great_response> | Irrelevant Answer <https://app.dosu.dev/response-feedback/b749d400-c741-4549-9ca8-309b7338c900?feedback_type=irrelevant_answer> | Incorrect Sources <https://app.dosu.dev/response-feedback/b749d400-c741-4549-9ca8-309b7338c900?feedback_type=incorrect_sources> | Too Verbose <https://app.dosu.dev/response-feedback/b749d400-c741-4549-9ca8-309b7338c900?feedback_type=too_verbose> | Hallucination <https://app.dosu.dev/response-feedback/b749d400-c741-4549-9ca8-309b7338c900?feedback_type=hallucination> | Other <https://app.dosu.dev/response-feedback/b749d400-c741-4549-9ca8-309b7338c900?feedback_type=other>
—
Reply to this email directly, view it on GitHub <#18676 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAD7CWM6N2IJVKQYZYSNOT32KXVOPAVCNFSM6AAAAABVGMP4KCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBTHA4DOMY>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Number 4, error as below:
@calcom/web:start: RangeError: Invalid key length
@calcom/web:start: at Cipheriv.createCipherBase (node:internal/crypto/cipher:122:19)
@calcom/web:start: at Cipheriv.createCipherWithIV (node:internal/crypto/cipher:141:3)
@calcom/web:start: at new Cipheriv (node:internal/crypto/cipher:249:3)
@calcom/web:start: at Object.createCipheriv (node:crypto:141:10)
@calcom/web:start: at symmetricEncrypt (/opt/cal.com/apps/web/.next/server/chunks/69559.js:1:278)
@calcom/web:start: at handler (/opt/cal.com/apps/web/.next/server/chunks/48015.js:1:405)
@calcom/web:start: at async handler (/opt/cal.com/apps/web/.next/server/pages/api/integrations/[...args].js:1:6285) {
@calcom/web:start: code: 'ERR_CRYPTO_INVALID_KEYLEN'
@calcom/web:start: }
… On 15 Jan 2025, at 1:23 PM, dosubot[bot] ***@***.***> wrote:
Ensure that the CALENDSO_ENCRYPTION_KEY is correctly set in your environment configuration file and that the server is using this updated configuration. Here are a few steps to verify:
Check the Key Length: Make sure the key you generated is exactly 32 bytes. You can verify this by decoding the base64 string and checking its length.
Environment Configuration: Double-check that the .env file or the environment variable configuration used by your server includes the correct CALENDSO_ENCRYPTION_KEY.
Server Restart: After updating the environment variable, ensure the server is fully restarted, not just reloaded, to apply the new configuration.
Logs and Errors: Check the server logs for any additional error messages that might provide more context on why the connection is failing.
If the issue persists, there might be other configurations or dependencies affecting the setup.
To continue talking to Dosu <https://dosu.dev/>, mention @dosu <https://github.com/dosu>.
Help Dosu learn! Give it feedback: Great Response <https://app.dosu.dev/response-feedback/10b3d8b0-6adf-4702-8274-ced7135eeaa6?feedback_type=great_response> | Irrelevant Answer <https://app.dosu.dev/response-feedback/10b3d8b0-6adf-4702-8274-ced7135eeaa6?feedback_type=irrelevant_answer> | Incorrect Sources <https://app.dosu.dev/response-feedback/10b3d8b0-6adf-4702-8274-ced7135eeaa6?feedback_type=incorrect_sources> | Too Verbose <https://app.dosu.dev/response-feedback/10b3d8b0-6adf-4702-8274-ced7135eeaa6?feedback_type=too_verbose> | Hallucination <https://app.dosu.dev/response-feedback/10b3d8b0-6adf-4702-8274-ced7135eeaa6?feedback_type=hallucination> | Other <https://app.dosu.dev/response-feedback/10b3d8b0-6adf-4702-8274-ced7135eeaa6?feedback_type=other>
—
Reply to this email directly, view it on GitHub <#18676 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAD7CWLRCYK7BXD5WZT663T2KXWEZAVCNFSM6AAAAABVGMP4KCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBTHA4TCNA>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Now I get
Could not add this caldav account
What now?
… On 15 Jan 2025, at 1:28 PM, dosubot[bot] ***@***.***> wrote:
The "Invalid key length" error you're encountering indicates that the encryption key used in the symmetricEncrypt function is not of the required length for AES256, which must be exactly 32 bytes. Here are some steps to troubleshoot and resolve this issue:
Verify Key Length: Ensure that the key you generated is exactly 32 bytes. You can verify this by decoding the base64 string and checking its length. The command openssl rand -base64 32 should generate a key of the correct length, but it's important to confirm.
Environment Configuration: Double-check that the CALENDSO_ENCRYPTION_KEY is correctly set in your environment configuration file (e.g., .env). Ensure there are no extra spaces or characters in the key.
Server Restart: After updating the environment variable, perform a full server restart to ensure the new configuration is applied. A simple reload might not suffice.
Check for Hardcoded Values: Ensure there are no hardcoded values in the code that might be overriding the environment variable.
Review Logs: Continue to review the server logs for any additional error messages that might provide more context on the issue.
If the problem persists after these checks, there might be other configurations or dependencies affecting the setup.
To continue talking to Dosu <https://dosu.dev/>, mention @dosu <https://github.com/dosu>.
Help Dosu learn! Give it feedback: Great Response <https://app.dosu.dev/response-feedback/495488a4-52b3-4972-beaa-6c23cd1262f7?feedback_type=great_response> | Irrelevant Answer <https://app.dosu.dev/response-feedback/495488a4-52b3-4972-beaa-6c23cd1262f7?feedback_type=irrelevant_answer> | Incorrect Sources <https://app.dosu.dev/response-feedback/495488a4-52b3-4972-beaa-6c23cd1262f7?feedback_type=incorrect_sources> | Too Verbose <https://app.dosu.dev/response-feedback/495488a4-52b3-4972-beaa-6c23cd1262f7?feedback_type=too_verbose> | Hallucination <https://app.dosu.dev/response-feedback/495488a4-52b3-4972-beaa-6c23cd1262f7?feedback_type=hallucination> | Other <https://app.dosu.dev/response-feedback/495488a4-52b3-4972-beaa-6c23cd1262f7?feedback_type=other>
—
Reply to this email directly, view it on GitHub <#18676 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAD7CWPZFHXKMXRHRNLHO632KXWWHAVCNFSM6AAAAABVGMP4KCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBTHA4TIOI>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
I have an active working radicale server.
Now I try to connect to it via
Connect to CalDav (Beta)
, but it saysInvalid key length
.Please advise how to set it up.
Beta Was this translation helpful? Give feedback.
All reactions