ValidationError: Encryption key is invalid, Please check site_config.json

Hi,

All my background jobs, from sending out emails, to dropbox backups are failing. In the stack trace, I am getting and Ecryption Key is Invalid Error.

ValidationError: Encryption key is invalid, Please check site_config.json

Can anyone help out. I noticed a comment by @lasalesi stating to copy paste from a fresh installation, but I’m assuming that bench would have some sort of command to regenerate the key. Any help with this, greatly appreciated.

Thanks!

This usually occurs when you have restored the database backup from an existing/earlier installation. The way to solve this would be to go back to the original installation and copy-paste the encryption key from the old site_config.json to the new one.

Other option to enter the passwords to the email accounts present in the system. You’ll find tons of threads on the forum regarding this issue:

https://discuss.frappe.io/search?q=encryption%20key%20is%20invalid

2 Likes

How can i go back to my original installation