Forum Discussion

anttipekkarinen's avatar
anttipekkarinen
New Member
9 years ago

Error: Block length does not match with its complement.

Hi,

 

I'm getting this error when trying to open a specific pbix file with Power BI Desktop. Any ideas how to solve this?

 

 

 

Error Message:

 

Block length does not match with its complement.

 

Stack Trace:

 

System.IO.InvalidDataException: Block length does not match with its complement.

 

Server stack trace:

   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.Windows.MainWindow.<>c__DisplayClass1f.<OpenFile>b__1d()

   at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.<>c__DisplayClass1.<BlockUIAndRunAsync>b__0()

   at System.Threading.Tasks.Task.Execute()

 

Exception rethrown at [0]:

   at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.WaitOnUIThreadForTaskCompletion(Task task)

   at Microsoft.PowerBI.Client.Windows.MainWindow.OpenFile(TelemetryUserActionId entryPoint, String filePath, Boolean fromRecentFile)

   at Microsoft.PowerBI.Client.Windows.MainWindow.OpenDocument(TelemetryUserActionId entryPoint, String testFilePath)

   at Microsoft.PowerBI.Client.Windows.Ribbon.EditorRibbonCommandActionHandler.HandleCommand(UInt32 commandId)

   at Microsoft.Mashup.Client.Windows.Ribbon.RibbonCommandHandler.Execute(UInt32 commandId, CommandExecutionVerb verb, PropertyKeyRef keyRef, PropVariantRef currentValue, IUISimplePropertySet commandExecutionProperties)

 

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.PowerBI.Client.Windows.Utilities.UIBlockingAwareExceptionHandler.HandleException(Exception e)

   at Microsoft.Mashup.Client.Windows.Ribbon.RibbonCommandHandler.Execute(UInt32 commandId, CommandExecutionVerb verb, PropertyKeyRef keyRef, PropVariantRef currentValue, IUISimplePropertySet commandExecutionProperties)

   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

   at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)

   at Microsoft.PowerBI.Client.Program.<>c__DisplayClassc.<Main>b__0()

   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

   at Microsoft.PowerBI.Client.Program.Main(String[] args)

 

 

3 Replies

    • david2's avatar
      david2
      Helper 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)