Aspose.Note failed to attempt read the OneNote file with missed pages

Hello,

We tried to create an application to parse a OneNote file for one of our customers.
We are faced with the situation that the latest version of Aspose.Note failed on an attempt to read a OneNote file.
The error is the next:
Aspose.Note.IncorrectDocumentStructureException: Expected ObjectDataBlobDeclaration element is missed
at  .()
at  .(​ ,  ,  )
at  .()
at  .()
at  .()
at  .()
at  .(Stream )
at  .(Stream )
at  .(Stream , String )
at ​ .(Stream , String , Boolean )
at  .(Stream , Document , LoadOptions )
at Aspose.Note.Document.(Stream , LoadOptions )
at Aspose.Note.Document…ctor(Stream inStream, LoadOptions loadOptions)
at Aspose.Note.Document…ctor(Stream inStream)

Unfortunately, we cannot provide the file due to restrictions from he customer.
But when we tried to open this file in OneNote Desctop we see the following messages for a some pages:
image.png (38.3 KB)

Best Regards,
Henadz Linevich

@Henadz74,

Thanks for the details and screenshot.

We are sorry but without a sample OneNote file, we might not evaluate your issue precisely. Please zip and attach your OneNote file to reproduce the issue on our end. We will analyse your issue soon. If you have reservation with your confidential data, you may replace with dummy data in the file, resave the file and provide us.

@amjad.sahi
Unfortunately, there is no ability to edit the customer file.
We have a similar file with one page that failed when Aspose Note tried to parse it.
The exception is not the same, but I hope it will be useful to investigate the initial issue.
I think that the structure of not synchronized pages is broken for some reason, but the OneNote application can open it and skip the broken pages.

New Section 1.zip (1010 Bytes)

@Henadz74,

Thanks for the sample OneNote file.

I did test your scenario/case using latest version/fix, Aspose.Note for .NET v23.12 and it works fine, it can read the file fine. Here is the line of code that I am using:

Aspose.Note.Document document = new Aspose.Note.Document("g:\\test2\\New Section 1.one");

Please try latest version of the API with your original file and let us know if you still find the issue.

Hello @amjad.sahi

I verified the latest Aspose Note API version with the original file and it did not work.
I got the same error as provided in the initial post.
However, an error in our sample section was fixed.

Probably, developers will be able to analyze the codebase and check places where ObjectDataBlobDeclaration is raised.

@Henadz74,

It is nice to know you have sorted out your issue now.

Alright, the developers will be looking into the codebase. We will get back to you once we have an update on it.

@Henadz74,

  1. Have you found and reproduced any errors with the provided file New Section 1.zip?
  2. Could you please provide a file where the “IncorrectDocumentStructureException” error is reproduced? Please note, it is not necessary to provide or transfer the entire file, but if there is another file where this error is exactly reproduced, that would help us to evaluate your issue more precisely and consequently figure out your issue soon.

Hello @amjad.sahi

  1. There are no errors for provided file New Section 1.zip at least for Aspose.Note for .NET v23.12, but this example did not contains initial issue.

  2. Unfortunately, I cannot create an example with the “IncorrectDocumentStructureException” error. The initial file provided by the customer in read-only formats. Any attempts to extract content did not allow to reproduce the issue.
    But anyway, the main complain from the customer is that the Microsoft OneNote allows to open and edit this file. Yes, some pages are not accessible and probably some attachments missed and cannot be opened. Aspose libraries fails on the attempt to parse this file.
    Probably developers can make it more resilient and not crash parsing file on any unknown or error, but just move on without failed page/attachment. Like do it Microsoft OneNote.

  3. Could you please provide link where I will be able to create request in scope of payed support? I have license for it.

@Henadz74,

  1. If this example does not reproduce the initial issue, then I am afraid there is no use of the file.
  2. If some pages are not accessible and some attachments are not opened or are missing even in OneNote app, the file may be corrupted. We would like to evaluate your issue and try to figure out a solution that at least behaves similarly to the OneNote app. However, without the sample document, we cannot evaluate the issue and therefore cannot determine the cause. In order to include enhancements or fixes for your issue, we need to reproduce it first. Please provide the sample document so that we can reproduce the issue on our end. I have made this post private so that you can safely attach your attachments. Now, no other users except you and Aspose staff can see or download your attachments. Alternatively, if your legal team requires us to sign an NDA, they can review the EULA.
  3. You can use Paid Support Services if you need support your issue on a priority basis, along with the direct access to our Paid Support management team.

As I know we should have paid support.
What would you suggest moving forward?
Any suggestions or actions that we could take on our side to clarify the situation?

@Andrei86,

You can use Paid Support Services if you need support your issue on a priority basis, along with the direct access to our Paid Support management team. You may log in with your paid account ID and then create a thread there. However, without a sample document to reproduce the issue on our end, we may not be able to evaluate your issue precisely and therefore might not figure it out.