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

Credentials error / Credentials could not be decrypted “EncryptionKey” after restarted service n8n #50

Open
bobiko opened this issue Nov 17, 2023 · 2 comments

Comments

@bobiko
Copy link

bobiko commented Nov 17, 2023

Describe the bug

After restarting the n8n service in the Yunohost panel, there is a problem with decrypting the "EncryptionKey" credentials in the case of workloflows updates.

Context

  • N8N v. 1.9.3~ynh1
  • Yunohost v. 11.2.5 (stable)
  • Yunohost was installed on Oracle Free Tier (ARM64)
  • I have SSH access
  • I noticed there was an update on N8N, but Yunohost said the app was up to date
  • Manually updated n8n from ssh
    • in home directory cd /home/yunohost.app/n8n/ && npm i n8n
    • in the directory cd /var/www/n8n/ && npm i n8n
  • Restarting the application worked correctly, but messages about EncryptionKey problems appear
  • I checked the forums related to N8N and the conclusion is that there is a problem with the encryptionKey key, which should not be updated
  • I noticed that there are double N8N configuration files, and in them the value of the encryptionKey key from the file /var/www/n8n/n8n/.n8n/config is completely different than the value from the file /home/yunohost.app/n8n /.n8n/config
  • before updating, I made a backup copy of the service and checked that the keys were the same from the very beginning (i.e. the value has not changed, but the values are different from each other)

Steps to reproduce

  1. log in to ssh
  2. Go to the /home/yunohost.app/n8n directory
  3. update n8n with npm and n8n command
  4. In the Yunohost dashboard, restart the n8n service
  5. log in to the n8n application and run the previously saved workflow
  6. a message appears at the bottom right of the screen

Expected behavior

The n8n application starts and runs all saved workflows without the need for re-authorization with external services.

Logs

Nov 16 19:48:45 n8n[274408]: NodeApiError: error:1C800064:Provider routines::bad decrypt
(....)
Nov 16 19:48:45 n8n[274408]: NodeApiError: error:1C800064:Provider routines::bad decrypt
Nov 16 20:57:35 n8n[274408]: Error: error:1C800064:Provider routines::bad decrypt
(...)
Nov 16 20:57:40 n8n[274408]: Error: Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.
Nov 16 20:57:40 n8n[274408]: Error: Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.
(...)
Nov 16 20:57:50 n8n[274408]: Error: error:1C800064:Provider routines::bad decrypt

-> hastebin

@bobiko bobiko mentioned this issue Nov 20, 2023
2 tasks
@theRAGEhero
Copy link

Hi,
would it help if I try to manually update n8n to see if it raise the same error, or is it wasted time?
Thank you.

@bobiko
Copy link
Author

bobiko commented Feb 20, 2024

@theRAGEhero

Hi, would it help if I try to manually update n8n to see if it raise the same error, or is it wasted time? Thank you.

I'm pretty sure it would be the same error as I described in the first post.

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