If you delete a section of text which includes a comment and then attempt to save the document the component errors.
Save handler:
public async void Save()
{
Logger.LogInformation($"Save Clicked");
var editor = _editorContainer.DocumentEditor;
Logger.LogInformation($"Got Editor");
string base64Data = await editor.SaveAsBlob(FormatType.Docx);
Logger.LogInformation($"Got Blob String");
byte[] data = Convert.FromBase64String(base64Data);
Logger.LogInformation($"Converted to data");
Facade.UploadManuscriptData(ScenesState.Value.CurrentScene, data);
Logger.LogInformation($"Send to Save Handler");
}
Expected behaviour - byte[] containing the document is send to the Upload method.
Actual behaviour - error is thrown in browser and page crashes.
This save method works correctly if the section of text that was deleted does not contain any comments.
A similar error was apparent in version 18.4.0.49 - the error happens at the same place but the message is slightly different:
this.commentId[r.commentId] is undefined
./modules/documenteditor.js/window.sf.documenteditor/Qt</e.prototype.serializeCommentInternal@https://localhost:5001/_content/Syncfusion.Blazor.WordProcessor/scripts/documenteditor-508fde.min.js:1:1420701
./modules/documenteditor.js/window.sf.documenteditor/Qt</e.prototype.serializeComments@https://localhost:5001/_content/Syncfusion.Blazor.WordProcessor/scripts/documenteditor-508fde.min.js:1:1419477
./modules/documenteditor.js/window.sf.documenteditor/Qt</e.prototype.serialize@https://localhost:5001/_content/Syncfusion.Blazor.WordProcessor/scripts/documenteditor-508fde.min.js:1:1414883
./modules/documenteditor.js/window.sf.documenteditor/Qt</e.prototype.saveAsBlob@https://localhost:5001/_content/Syncfusion.Blazor.WordProcessor/scripts/documenteditor-508fde.min.js:1:1413128
./modules/documenteditor.js/window.sf.documenteditor/Ei</t.prototype.saveAsBlob/<@https://localhost:5001/_content/Syncfusion.Blazor.WordProcessor/scripts/documenteditor-508fde.min.js:1:1955565
./modules/documenteditor.js/window.sf.documenteditor/Ei</t.prototype.saveAsBlob@https://localhost:5001/_content/Syncfusion.Blazor.WordProcessor/scripts/documenteditor-508fde.min.js:1:1955486
e/<@https://localhost:5001/_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor-extended-508fde.min.js:1:20545
u@https://localhost:5001/_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor-extended-508fde.min.js:1:2383
c/o._invoke</<@https://localhost:5001/_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor-extended-508fde.min.js:1:2137
m/</<@https://localhost:5001/_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor-extended-508fde.min.js:1:2742
asyncGeneratorStep@https://localhost:5001/_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor-extended-508fde.min.js:1:10941
s@https://localhost:5001/_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor-extended-508fde.min.js:1:11178
_asyncToGenerator/</<@https://localhost:5001/_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor-extended-508fde.min.js:1:11254
_asyncToGenerator/<@https://localhost:5001/_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor-extended-508fde.min.js:1:11100
./syncfusion-blazor-extended.js/extended.invokeMethod<@https://localhost:5001/_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor-extended-508fde.min.js:1:21106
beginInvokeJSFromDotNet/i<@https://localhost:5001/_framework/blazor.webassembly.js:1:3942
beginInvokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:3908
w@https://localhost:5001/_framework/blazor.webassembly.js:1:64218
_mono_wasm_invoke_js_blazor@https://localhost:5001/_framework/dotnet.5.0.5.js:1:190800
mono_wasm_invoke_js_blazor@:wasm-function[45]:0x0
do_icall@:wasm-function[10596]:0x194e4e
do_icall_wrapper@:wasm-function[3305]:0x79df9
interp_exec_method@:wasm-function[2155]:0x44ad3
interp_runtime_invoke@:wasm-function[7862]:0x12efff
mono_jit_runtime_invoke@:wasm-function[7347]:0x118e5f
do_runtime_invoke@:wasm-function[3304]:0x79d42
mono_runtime_invoke_checked@:wasm-function[493]:0xf65d
mono_runtime_try_invoke_array@:wasm-function[7114]:0x10e831
ves_icall_InternalInvoke@:wasm-function[6226]:0xed492
ves_icall_InternalInvoke_raw@:wasm-function[6225]:0xecf57
do_icall@:wasm-function[10596]:0x194ddb
do_icall_wrapper@:wasm-function[3305]:0x79df9
interp_exec_method@:wasm-function[2155]:0x44ad3
interp_runtime_invoke@:wasm-function[7862]:0x12efff
mono_jit_runtime_invoke@:wasm-function[7347]:0x118e5f
do_runtime_invoke@:wasm-function[3304]:0x79d42
mono_runtime_invoke_checked@:wasm-function[493]:0xf65d
mono_runtime_try_invoke_array@:wasm-function[7114]:0x10e831
ves_icall_InternalInvoke@:wasm-function[6226]:0xed492
ves_icall_InternalInvoke_raw@:wasm-function[6225]:0xecf57
do_icall@:wasm-function[10596]:0x194ddb
do_icall_wrapper@:wasm-function[3305]:0x79df9
interp_exec_method@:wasm-function[2155]:0x44ad3
interp_runtime_invoke@:wasm-function[7862]:0x12efff
mono_jit_runtime_invoke@:wasm-function[7347]:0x118e5f
do_runtime_invoke@:wasm-function[3304]:0x79d42
mono_runtime_try_invoke@:wasm-function[629]:0x12982
mono_runtime_invoke@:wasm-function[7118]:0x10ec2b
mono_wasm_invoke_method@:wasm-function[6922]:0x108e48
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/dotnet.5.0.5.js:1:214819
call_method@https://localhost:5001/_framework/dotnet.5.0.5.js:1:180044
bind_static_method/<@https://localhost:5001/_framework/dotnet.5.0.5.js:1:182638
beginInvokeDotNetFromJS@https://localhost:5001/_framework/blazor.webassembly.js:1:21996
h@https://localhost:5001/_framework/blazor.webassembly.js:1:2552
e.invokeMethodAsync@https://localhost:5001/_framework/blazor.webassembly.js:1:3389
g/</</</<@https://localhost:5001/_framework/blazor.webassembly.js:1:61597
invokeWhenHeapUnlocked@https://localhost:5001/_framework/blazor.webassembly.js:1:24979
g/</</<@https://localhost:5001/_framework/blazor.webassembly.js:1:61546
t.dispatchEvent@https://localhost:5001/_framework/blazor.webassembly.js:1:12883
e/this.eventDelegator</<@https://localhost:5001/_framework/blazor.webassembly.js:1:31383
e/this.eventDelegator<@https://localhost:5001/_framework/blazor.webassembly.js:1:31407
s</e.prototype.onGlobalEvent@https://localhost:5001/_framework/blazor.webassembly.js:1:41813