Encryption Key Error while using Email Template

0
Hi all, I am trying to use email template but facing one issue related to encryption key. I have used email template multiple times but never faced this before. After I save my config, I get following error:   com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: Cannot decrypt the text because it was either NOT encrypted with a key of length 16 or they key is different at Encryption.Decrypt (Error : '') at EmailTemplate.SendEmailMessage (SubMicroflow : 'Decrypt') at EmailTemplate.IVK_SendTestMessage (SubMicroflow : 'SendEmailMessage') Advanced stacktrace: at com.mendix.modules.microflowengine.microflow.impl.ErrorEvent.throwError$1(ErrorEvent.scala:17)   I validated it multiple times, I have encryption constant set correctly in my Mx Cloud Test enviornement but still get this error. Another things is I am not able to replicate this issue in my local copy.   Any pointers on how to debug this further? What I am missing.   Mendix Module : 7.23.8 Email : 10.1.10 Encryption : 1.4.1 Mx Model: 5.6.1   Regards, Kirti    
asked
2 answers
1

This issue is fixed with the help of Mendix Support Team.

 

Issue was in encryption prefix. I was using {AES} where as it should be {AES2} for the encryption module version i was using.

 

Regards,

Kirti

answered
0

Kirti,

Seems like the value of the password in the config that is stored in the database was not encrypted using the current key.  I have seen this error when I change the encryption key but don’t re-save the password/config.  Or if you copy a database from one environment to another and the encryption keys are different in the two environments.

If you haven’t done this already, open the config, re-enter the password and save it.

Hope that helps,

Mike

answered