[Credentials] Vault has been corrupted
Issue
While opening an ecu.test vault the following error occurs:
Traceback (most recent call last):
File "tts\core\expressions\BaseExpressionChildren.py", line 1383, in Evaluate
File "tts\core\api\internalApi\credentialsApi\Credentials.py", line 283, in OpenCryptFileVault
File "tts\core\api\internalApi\credentialsApi\crypt\CryptFileAccess.py", line 35, in OpenCryptFileVault
File "tts\core\api\internalApi\credentialsApi\crypt\CryptFile.py", line 396, in Load
File "tts\core\api\internalApi\credentialsApi\crypt\CryptFile.py", line 362, in VerifyMAC
PermissionError: Vault has been corrupted
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tts\testExecution\testSteps\dataoperations\calculationNG\TsCalculationExec.py", line 169, in Call
File "tts\core\expressions\BaseExpressionChildren.py", line 1387, in Evaluate
tt._Exceptions_.TTError: An error occurred when calling "api.Credentials.OpenCryptFileVault([PATH_TO_VAULT])": Vault has been corrupted
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tts\testExecution\engine\TestEngine.py", line 935, in ExecuteTestStep
File "tts\testExecution\testSteps\dataoperations\calculationNG\TsCalculationExec.py", line 234, in Run
File "tts\testExecution\testSteps\dataoperations\calculationNG\TsCalculationExec.py", line 173, in Call
tts.testExecution.testSteps.dataoperations.calculationNG.TsCalculationExec.UserCodeException: An error occurred when calling "api.Credentials.OpenCryptFileVault([PATH_TO_VAULT])": Vault has been corruptedAlthough the vault has only been checked out from git and the same vault file worked once fine.
Solution
Git may add or change newlines when pushing or checking out. Therefore the vaults authentication code does not match anymore.
Git has several options to change its newline behaviour. One possibility is to use the .gitattributes file and define the vault as binary.