You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a valid epub, but the content.OPF file contains an item with a blank media type:
Sadly I have to be able to process files that pass epub check, and this does. Below is the stack trace from the fail. Ideally this would gracefully just ignore the file. Sadly I cannot provide the file as it contains copyrighted material, but I believe just adding the the file and a blank media-type to any should produce the same issue.
Thank you!
at VersOne.Epub.Internal.PackageReader.ReadManifest(XElement manifestNode)
at VersOne.Epub.Internal.PackageReader.d__0.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at VersOne.Epub.Internal.SchemaReader.<ReadSchemaAsync>d__0.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()
at VersOne.Epub.EpubReader.d__10.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at VersOne.Epub.EpubReader.d__9.MoveNext()
The text was updated successfully, but these errors were encountered:
Then you can pass the options as the second argument to one of the EpubReader's OpenBook / OpenBookAsync / ReadBook / ReadBookAsync methods.
Could you check if this solution works for you before I publish it to Nuget?
PS. Keep in mind that this solution may cause issues at a later stage if the invalid manifest item is referenced from somewhere else (e.g. if it is the cover or the table of contents).
I have a valid epub, but the content.OPF file contains an item with a blank media type:
Sadly I have to be able to process files that pass epub check, and this does. Below is the stack trace from the fail. Ideally this would gracefully just ignore the file. Sadly I cannot provide the file as it contains copyrighted material, but I believe just adding the the file and a blank media-type to any should produce the same issue.
Thank you!
at VersOne.Epub.Internal.PackageReader.ReadManifest(XElement manifestNode)
at VersOne.Epub.Internal.PackageReader.d__0.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1.ConfiguredTaskAwaiter.GetResult() at VersOne.Epub.Internal.SchemaReader.<ReadSchemaAsync>d__0.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1.ConfiguredTaskAwaiter.GetResult()at VersOne.Epub.EpubReader.d__10.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at VersOne.Epub.EpubReader.d__9.MoveNext()
The text was updated successfully, but these errors were encountered: