Replies: 3 comments
-
I have started seeing this as well but not reproducible from machine to machine but when a user gets it stays erroring each time an Excel is accessed. Luckily only failing in QA and not Prod at the moment. Tech recently did Shared drive maintenance as well. |
Beta Was this translation helpful? Give feedback.
-
Oddly enough, not all programs encountered this issue. We moved to another nuget package NPOI and it resolved it. Also, we did finally get someone to take us seriously, so we enabled wireshark and examined what was going on and did see what triggers this for ClosedXML, whatever the low level operation using the ReadReliable IS NOT RELIABLE Essentially seeming to confirm some network issue, perhaps timing related since different hardware is on the network talking to each other... |
Beta Was this translation helpful? Give feedback.
-
Thanks for the info. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Can anyone lend some understanding as to why an 'invalid signature' would be thrown on a non-signed XLSX file that was created by another process, or created moments before by the same process.
Here's the stack trace and it appears to be at the lowest levels. This error occurs in multiple applications, in one which iterates over a directory of XLSX files, it's always the first three, then the rest go fine. In another process, it errors out in different locations but ALWAYS at a using where 'f' is the file just gotten via Directory.GetFiles()
Of course the spreadsheets are fine, open fine, work fine when running on dev vm via visual studio, failed in prod running on different nodes, so it's not a VM. I have concerns we switched to a new 'more secure' file share which seems to have some timing issues nobody will assist to diagnose. I am being asked to mask this error via just retrying, but would love to know a root cause.
tia - mike
using (XLWorkbook xlWorkbook = new XLWorkbook(f))
stack trace -
Invalid Signature.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.ReadCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count)
at MS.Internal.IO.Packaging.PackagingUtilities.ReliableRead(Stream stream, Byte[] buffer, Int32 offset, Int32 requestedCount, Int32 requiredCount)
at MS.Internal.IO.Zip.ZipIOEndOfCentralDirectoryBlock.FindPosition(Stream archiveStream)
at MS.Internal.IO.Zip.ZipIOEndOfCentralDirectoryBlock.SeekableLoad(ZipIOBlockManager blockManager)
at MS.Internal.IO.Zip.ZipArchive..ctor(Stream archiveStream, FileMode mode, FileAccess access, Boolean streaming, Boolean ownStream)
at MS.Internal.IO.Zip.ZipArchive.OpenOnStream(Stream stream, FileMode mode, FileAccess access, Boolean streaming)
at System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode mode, FileAccess access, Boolean streaming)
at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming)
at DocumentFormat.OpenXml.Features.StreamPackageFeature.InitializePackage(Nullable
1 mode, Nullable
1 access)at DocumentFormat.OpenXml.Features.StreamPackageFeature..ctor(Stream stream, PackageOpenMode openMode, Boolean isOwned)
at DocumentFormat.OpenXml.Builder.OpenXmlPackageBuilderExtensions.Open[TPackage](IPackageFactory`1 builder, String file, PackageOpenMode mode)
at DocumentFormat.OpenXml.Packaging.SpreadsheetDocument.Open(String path, Boolean isEditable, OpenSettings openSettings)
at ClosedXML.Excel.XLWorkbook.LoadSheets(String fileName) in //ClosedXML/Excel/XLWorkbook_Load.cs:line 46
at ClosedXML.Excel.XLWorkbook..ctor(String file, LoadOptions loadOptions) in //ClosedXML/Excel/XLWorkbook.cs:line 756
at ClosedXML.Excel.XLWorkbook..ctor(String file) in /_/ClosedXML/Excel/XLWorkbook.cs:line 746
Beta Was this translation helpful? Give feedback.
All reactions