Forum Discussion
Error: Block length does not match with its complement.
Hi anttipekkarinen,
System.IO.InvalidDataException function means that a compressed data stream is in a format that is not valid.
Reference: https://msdn.microsoft.com/en-us/library/ms241600.aspx
Besides, could you please share more details about the special PBIX file, was it compressed?
In addition, check to see if the following article would help:
http://george.chiramattel.com/blog/2007/09/deflatestream-block-length-does-not-match.html
Regards
- david29 years agoHelper I
Hi,
I have the same problem, see the details copied below. My pbix file got corrupted after i renamed the file. After renaming it back, it was still corrupted. Any idea what may have caused this?
Thanks!
David
Error Message:
Block length does not match with its complement.
Stack Trace:
System.IO.InvalidDataException: Block length does not match with its complement.
at System.IO.Compression.Inflater.DecodeUncompressedBlock(Boolean& end_of_block)
at System.IO.Compression.Inflater.Decode()
at System.IO.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset, Int32 length)
at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count)
at MS.Internal.IO.Packaging.CompressStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at Microsoft.PowerBI.Packaging.Extensions.StreamExtensions.ReadAllBytes(Stream stream)
at Microsoft.PowerBI.Packaging.PowerBIPackagingUtils.GetContentAsBytes(IStreamablePowerBIPackagePartContent streamablePowerBIPackagePartContent, Boolean isOptional)
at Microsoft.PowerBI.Client.Windows.Services.ReportFactory.CreateReportFromPowerBIPackage(IPowerBIPackage powerBIPackage, Byte[] securityBindings, Boolean requiresConversionToReportLayout, IPowerBITelemetryService powerBITelemetryService, PackageValidationResult& mashupValidationResult)
at Microsoft.PowerBI.Client.Windows.Services.FileManager.OpenFile(String filePath, Stream fileStream, Boolean isReadOnly)
at Microsoft.PowerBI.Client.Windows.Services.FileManager.OpenFile(String filePathToOpen, IWin32Window ownerWindow, ReportUpgradeResult& upgradeResult)
at Microsoft.PowerBI.Client.Program.TryOpenOrCreateReport(WindowsHost windowsHost, ISplashScreen splashScreen, IFileManager fileManager, IFileHistoryManager fileHistoryManager, IPowerBIStringProvider stringProvider, String filePath, PBIWinLoadPBIAppAction loadEvent, Report& report, String& importFromExcelFilePath, String& templateFilePath, String& autoRecoveredFilePath, ReportUpgradeResult& upgradeResult)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClassb.<Main>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.ClientShared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace)
at Microsoft.Mashup.Client.ClientShared.FeedbackErrorInfo..ctor(String message, Nullable`1 errorCode, String requestId, Exception exception)
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)
- solomonksa9 years agoNew Member
Hi, Is there any way to fix this issue.