We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

CAB file extract problem - Exception “Unable to read beyond the end of the stream”

Hi,

I use Aspose.Zip nuget package in my Xamarin project.

When i try to extract any file an error occures:
System.IO.EndOfStreamException: ‘Unable to read beyond the end of the stream.’

Exception Detail:{System.IO.EndOfStreamException: Unable to read beyond the end of the stream. at System.IO.__Error.EndOfFile () [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/io/_error.cs:34 at System.IO.BinaryReader.FillBuffer (System.Int32 numBytes) [0x0007a] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/io/binaryreader.cs:607 at System.IO.BinaryReader.ReadInt32 () [0x00026] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/io/binaryreader.cs:185 at �​ .� (System.IO.BinaryReader �) [0x00000] in :0 at �​ .� (System.IO.BinaryReader �) [0x00083] in :0 at � .� (System.IO.BinaryReader �) [0x00025] in :0 at Aspose.Zip.Cab.CabArchive.� (System.IO.Stream �) [0x0002b] in :0 at Aspose.Zip.Cab.CabArchive…ctor (System.IO.Stream sourceStream) [0x00051] in :0 at EFF.FlightSelect.ExtractCabFile (System.String downloadedFilePath, System.String extractPath) [0x00009] in C:\KODLAR\IOS\EFF\EFF\EFF\FlightSelect.xaml.cs:326 at EFF.FlightSelect.BtnUsb_Clicked (System.Object obj, System.EventArgs args) [0x0000d] in C:\KODLAR\IOS\EFF\EFF\EFF\FlightSelect.xaml.cs:76 at Xamarin.Forms.Button.Xamarin.Forms.Internals.IButtonElement.PropagateUpClicked () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Button.cs:187 at Xamarin.Forms.ButtonElement.ElementClicked (Xamarin.Forms.VisualElement visualElement, Xamarin.Forms.Internals.IButtonElement ButtonElementManager) [0x0001f] in D:\a\1\s\Xamarin.Forms.Core\ButtonElement.cs:61 at Xamarin.Forms.Button.SendClicked () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Button.cs:173 at Xamarin.Forms.Platform.Android.ButtonElementManager.OnClick (Xamarin.Forms.VisualElement element, Xamarin.Forms.IButtonController buttonController, Android.Views.View v) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\ButtonElementManager.cs:25 at Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer.Android.Views.View.IOnClickListener.OnClick (Android.Views.View v) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\ButtonRenderer.cs:72 at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v) [0x00010] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-31/mcw/Android.Views.View.cs:2280 at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V (_JniMarshal_PPL_V callback, System.IntPtr jnienv, System.IntPtr klazz, System.IntPtr p0) [0x00005] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:121 at (wrapper native-to-managed) Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V(intptr,intptr,intptr)}

How can i solve this problem ?

Used system:
Xamarin, Andorid Emulator

Cab file runs perfectly in windows 10 with no errors.

Best regards.

We have logged your bug report in our issue tracking system. Your ticket number is ZIPNET-926. We will further look into the details of this requirement and will keep you updated here on the status of the linked ticket.

Hello, muratbilprg! Could you provide the cab file to reproduce the issue?

Cab file

The bug has been fixed.

When would you publish your new version ?

We’ll publish it next week.