blazor documenteditor SaveAsBlob throwing nullreference exception

I am using this example (https://blazor.syncfusion.com/documentation/document-editor/saving-document/#save-document-to-server) to send a document to the backend.

        SfDocumentEditor editor = container.DocumentEditor;

        string base64Data = await editor.SaveAsBlob(FormatType.Docx);

        byte[] data = Convert.FromBase64String(base64Data);

 the SaveAsBlob line is throwing a nullreference exception. I have verified that the editor is not null. I am using the latest version 19.1.0.54


9 Replies 1 reply marked as answer

SM Suriya Murugan Syncfusion Team April 2, 2021 07:35 AM UTC

Hi Ywein, 

Syncfusion Greetings! 

We couldn’t reproduce the reported issue. We suspect that the reported problems are might be due to the contents in the input word document which used at your end. We need to investigate with the contents in your input Word document to reproduce the exact problem at our end. So, could you please provide us the input Word document which used at your end. Thereby, we will analyze further and provide you the appropriate solution at the earliest. 
  
Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same. We just need your document to recreate the problem you face. 


Regards, 
Suriya M. 



YV Ywein Van Den Brande April 2, 2021 11:43 AM UTC

I don't think it is because of the input document. I am getting the exception even if I use the exact 'Save document to server' example in the link, so without any input document.
I send you a reproduceable example in attachment.
Here is the error:


Attachment: DocumentEditor_c9713bfb.7z


KB Kurthis Banu Abdul Majeeth Syncfusion Team April 5, 2021 08:25 AM UTC

Hi Ywein,  

We can reproduce the reported issue. Currently we are validating the reported issue we will update further details by April 8,2021. 

Regards,  
Kurthis Banu A.  



SM Suriya Murugan Syncfusion Team April 8, 2021 03:38 AM UTC

Hi Ywein, 

We have confirmed the reported issue as bug and logged the defect report. We will fix this issue and include in our Blazor nuget release which is scheduled on April 14,2021. 

You can track the status of bug through below feedback link: 

Regards, 
Suriya M. 



KB Kurthis Banu Abdul Majeeth Syncfusion Team April 14, 2021 09:00 AM UTC

Hi Ywein, 

We are glad to announce that our blazor nuget release (v19.1.56) is rolled out successfully and In that release, we have added the fix for reported issue.       
    
Please upgrade your nuget to the latest version packages to resolve this issue.      


You can track the status of bug through below feedback link:      
     
Please let us know if you have any questions.  

Regards,  
Kurthis Banu A.  


Marked as answer

AA Adnan Ali February 19, 2022 01:31 PM UTC

Urgent Please 


After updating to Package Version 19.1.0.56 facing this Task Canceled Exception , I have also tested it with latest package version



AE Ajithamarlin Edward Syncfusion Team February 21, 2022 05:54 PM UTC

Hi Adnan,


We tried to reproduce the reported issue at our end, But we couldn’t



Please find the sample from the below link.


https://www.syncfusion.com/downloads/support/directtrac/general/ze/DocumentEditor_c9713bfb-265230761



Please do check whether you can able to reproduce the reported issue from the given sample link. If we misunderstood any of your requirement, please modify the sample and share us the modified sample to validate this issue further from our end.



Regards,

Ajithamarlin E



CH CharlesG August 3, 2022 05:31 PM UTC

Hello, I'm encountering the same Task Cancelled exception when using FormatType.Html. It works correctly with FormatType.Docx. Using version 20.2.0.40.

The link you provided in your reply does not work for me, so I don't know what it is referring to.

Both SaveAsBlob and SaveAsBlobAsync give the same result.  The task appears to "run" for a while, then eventually throws the exception. 




SM Suriya Murugan Syncfusion Team August 4, 2022 11:22 AM UTC

Hi Charles,


SaveasBlobAsync API will not accept the parameter as FormatType.Html.


If your requirement convert the document to html format, please get the string using "FormatType.Docx". Then convert the document to HTml with the help of Synfusion DocIO.


Regards,

Suriya M.


Loader.
Up arrow icon