This is happening on 2.0.7.1_beta_2023-05-25 which we have been using without any problems since just after its release, it is only within the last month or so that this error has started to appear across many configurations. That part is a small extract of the error, below is how it is sent to our email in its entirety:
Failed: File length is invalid
Details: System.Security.Cryptography.CryptographicException: File length is invalid ---> System.IO.InvalidDataException: File length is invalid
at SharpAESCrypt.SharpAESCrypt.Read(Byte[] buffer, Int32 offset, Int32 count)
at Duplicati.Library.Utility.Utility.CopyStream(Stream source, Stream target, Boolean tryRewindSource, Byte[] buf)
at Duplicati.Library.Encryption.EncryptionBase.Decrypt(Stream input, Stream output)
at Duplicati.Library.Main.BackendManager.<>c__DisplayClass33_0.<coreDoGetPiping>b__0()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at Duplicati.Library.Main.AsyncDownloader.AsyncDownloaderEnumerator.AsyncDownloadedFile.get_TempFile()
at Duplicati.Library.Main.Operation.CompactHandler.DoCompact(LocalDeleteDatabase db, Boolean hasVerifiedBackend, IDbTransaction& transaction, BackendManager sharedBackend)
at Duplicati.Library.Main.Operation.DeleteHandler.DoRun(LocalDeleteDatabase db, IDbTransaction& transaction, Boolean hasVerifiedBackend, Boolean forceCompact, BackendManager sharedManager)
at Duplicati.Library.Main.Operation.BackupHandler.CompactIfRequired(BackendManager backend, Int64 lastVolumeSize)
at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at CoCoL.ChannelExtensions.WaitForTaskOrThrow(Task task)
at Duplicati.Library.Main.Controller.<>c__DisplayClass14_0.<Backup>b__0(BackupResults result)
at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)
Log data:
2025-01-16 04:49:05 -06 - [Error-Duplicati.Library.Main.AsyncDownloader-FailedToRetrieveFile]: Failed to retrieve file duplicati-be777ce276b6b492885a4b3b11bb60200.dblock.zip.aes
System.Security.Cryptography.CryptographicException: File length is invalid ---> System.IO.InvalidDataException: File length is invalid
at SharpAESCrypt.SharpAESCrypt.Read(Byte[] buffer, Int32 offset, Int32 count)
at Duplicati.Library.Utility.Utility.CopyStream(Stream source, Stream target, Boolean tryRewindSource, Byte[] buf)
at Duplicati.Library.Encryption.EncryptionBase.Decrypt(Stream input, Stream output)
at Duplicati.Library.Main.BackendManager.<>c__DisplayClass33_0.<coreDoGetPiping>b__0()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at Duplicati.Library.Main.BackendManager.FileEntryItem.Duplicati.Library.Main.BackendManager.IDownloadWaitHandle.Wait(String& hash, Int64& size)
at Duplicati.Library.Main.AsyncDownloader.AsyncDownloaderEnumerator.MoveNext()
2025-01-16 04:49:25 -06 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error
System.Security.Cryptography.CryptographicException: File length is invalid ---> System.IO.InvalidDataException: File length is invalid
at SharpAESCrypt.SharpAESCrypt.Read(Byte[] buffer, Int32 offset, Int32 count)
at Duplicati.Library.Utility.Utility.CopyStream(Stream source, Stream target, Boolean tryRewindSource, Byte[] buf)
at Duplicati.Library.Encryption.EncryptionBase.Decrypt(Stream input, Stream output)
at Duplicati.Library.Main.BackendManager.<>c__DisplayClass33_0.<coreDoGetPiping>b__0()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at Duplicati.Library.Main.AsyncDownloader.AsyncDownloaderEnumerator.AsyncDownloadedFile.get_TempFile()
at Duplicati.Library.Main.Operation.CompactHandler.DoCompact(LocalDeleteDatabase db, Boolean hasVerifiedBackend, IDbTransaction& transaction, BackendManager sharedBackend)
at Duplicati.Library.Main.Operation.DeleteHandler.DoRun(LocalDeleteDatabase db, IDbTransaction& transaction, Boolean hasVerifiedBackend, Boolean forceCompact, BackendManager sharedManager)
at Duplicati.Library.Main.Operation.BackupHandler.CompactIfRequired(BackendManager backend, Int64 lastVolumeSize)
at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext()