Navigating away from a page with a grid throws an error

Hi,
Everytime i navigate away from a page it throws the following error...
TypeError: Cannot read property 'destroy' of

You can see this by going to your own demo pages for the grid with the debugger opened.
Navigate to another page and you will see the error.

I was moving from the Header Template page to the Column Template page.

Update. This does not seem to happen in Edge. But it does in Opera and Chrome


8 Replies

RN Rahul Narayanasamy Syncfusion Team July 15, 2020 03:45 PM UTC

Hi Fergus, 
 
Thanks for contacting Syncfusion support. 
 
Query: Navigating away from a page with a grid throws an error 
 
We have checked the reported issue from our end but unfortunately we are unable to reproduce the issue while navigating from Header template page to Column template page. We have checked the issue in both online demo and also in the below sample. So kindly ensure the sample which we prepared using the 18.2.0.45 version Syncfusion Nuget package from below 
 
 
If you are still facing the issue, kindly share the following details.  
 
  1. Please share the Syncfusion Nuget Package version.
  2. Please share the browser version details.
  3. If possible please share the issue reproducing sample or reproduce the issue in the provided sample.
  4. Video Demonstration of the issue.
 
Requested details will be help for us to validate the reported issue at our end and provide solution as soon as possible.  
 
Regards, 
Rahul 
 



CS Christopher Swierczynski July 15, 2020 03:52 PM UTC

I'm seeing this same issue on a page that has a Dialog with a Grid in it.
The error I see is: Microsoft.JSInterop.JSException: Cannot read property 'blazor__instance' of null
The stack trace of the error references the Dialog component a few times, and seems like there is an issue Destroying the component.

The stack trace is:
at Object.destroy (https://localhost:44340/_content/Syncfusion.Blazor/scripts/sf-dialog-580d73.min.js:1:18269)
     at https://localhost:44340/_framework/:9808
     at new Promise (<anonymous>)
     at Object.beginInvokeJSFromDotNet (https://localhost:44340/_framework/:9777)
     at _mono_wasm_invoke_js_marshalled (https://localhost:44340/_framework/wasm/dotnet.3.2.0.js:1:171294)
     at do_icall (https://localhost:44340/_framework/wasm/dotnet.wasm:wasm-function[6049]:0x10f8b1)
     at do_icall_wrapper (https://localhost:44340/_framework/wasm/dotnet.wasm:wasm-function[1896]:0x50b6a)
     at interp_exec_method (https://localhost:44340/_framework/wasm/dotnet.wasm:wasm-function[1120]:0x2588e)
     at interp_runtime_invoke (https://localhost:44340/_framework/wasm/dotnet.wasm:wasm-function[5655]:0xf7391)
     at mono_jit_runtime_invoke (https://localhost:44340/_framework/wasm/dotnet.wasm:wasm-function[5109]:0xddb3d)
   at System.Threading.Tasks.ValueTask`1[TResult].get_Result () <0x90196b0 + 0x00034> in <filename unknown>:0 
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync (Microsoft.JSInterop.IJSRuntime jsRuntime, System.String identifier, System.Object[] args) <0x8fe0b28 + 0x000e4> in <filename unknown>:0 
   at Syncfusion.Blazor.SfBaseComponent.InvokeMethod (System.String methodName, System.Object[] methodParams) <0x947e208 + 0x000d6> in <filename unknown>:0 
   at Syncfusion.Blazor.Popups.SfDialog.ComponentDispose () <0x9bed3b8 + 0x00104> in <filename unknown>:0 
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) <0xb6c36e0 + 0x0000c> in <filename unknown>:0 
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) <0xb6c3690 + 0x00022> in <filename unknown>:0 
   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) <0x6709a28 + 0x00100> in <filename unknown>:0 
   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) <0x67097e8 + 0x00010> in <filename unknown>:0 
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () <0x8775db8 + 0x00038> in <filename unknown>:0 
   at System.Threading.ThreadPoolWorkQueue.Dispatch () <0x8611338 + 0x00102> in <filename unknown>:0 
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () <0x8610fa0 + 0x00000> in <filename unknown>:0 


JE Jean July 16, 2020 12:43 PM UTC

Getting the same issue right after the update from 18.2.0.44 - 18.2.0.45

Even the sample code gives random errors. The program runs fine without any issues, but it's giving a Microsoft jsinterop jsexception error. This happens only after you try to navigate to another page. trying to destroy the old content, but failing, since it doesn't exist. 

Kind Regards, Jean


RN Rahul Narayanasamy Syncfusion Team July 16, 2020 03:04 PM UTC

Hi Christopher/Jean, 
 
Query: Error throws on navigating from page rendered with grid and dialog 
 
We have checked your query with the provided details but unfortunately we are unable to reproduce the issue while navigating from the page rendered with grid and dialog(Column chooser dialog). But the same issue is reproduced when the grid with the dialog(column chooser dialog) is placed inside the splitter component.  
 
Did you faced the reported issue on this scenario? If not kindly share the following details. 
 
  1. Exact replication procedure.
  2. Share the details about how you are rendering the Grid.
  3. Video Demonstration of the issue.
  4. Full code snippets of the page.
  5. If possible please share the issue reproducing sample or reproduce the issue in the below sample.
 
Requested details will be help for us to validate the reported issue at our end and provide solution as soon as possible. 
 
Kindly ensure the below sample which we have prepared for both the scenario. 


Regards, 
Rahul 



SL Steven Littleford July 21, 2020 01:13 AM UTC

We are all getting this issue everywhere after upgrading to the latest release 18.2

It is clear you have a major fail in your SfBaseComponent. 

I'm not sure why you say you can't reproduce this when you clearly have in another ticket, albeit under different circumstances. ID = 156155

My application is full on crashing everywhere because of this error. Please try harder - just providing pre-canned samples that work is really unhelpful .







RN Rahul Narayanasamy Syncfusion Team July 21, 2020 06:01 PM UTC

Hi Steven, 
 
Query: We are all getting this issue everywhere after upgrading to the latest release 18.2 : I'm not sure why you say you can't reproduce this when you clearly have in another ticket, albeit under different circumstances. ID = 156155 
 
We have validated your query with the provided information. In the mentioned forum(156155) the reported exception was thrown from Grid component. Find the below script error for your reference. 
 
Microsoft.JSInterop.JSException: Cannot set property 'blazor__instance' of null 
TypeError: Cannot set property 'blazor__instance' of null 
    . . . 
   at Syncfusion.Blazor.SfBaseComponent.OnAfterRenderAsync(Boolean firstRender) 
   at Syncfusion.Blazor.SfDataBoundComponent.OnAfterRenderAsync(Boolean firstRender) 
   at Syncfusion.Blazor.Grids.SfGrid`1.OnAfterRenderAsync(Boolean firstRender) 
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle) 
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111] 
      Unhandled exception in circuit 'fiohJ5_JhuqWuqkPKyExl8qWgJ8BPqPwgkG1WVFXfx0'. 
 
 
But in your case, the reported exception was thrown from SfToolbar component. Find the below reference. 
 
 
 
For exception thrown from Grid component error, the fix will be included in our weekly patch release which is expected to be rolled out on or before 4th August 2020. 
 
For your scenario(exception thrown from SfToolbar), we need some details for reproducing the reported problem.  
 
  • Full Code snippets in the page.
  • Exact replication procedure.
  • Video demonstration of the problem.
  • Share a simple sample demonstrating the provided script error.
 
Requested details will be help for us to validate the reported issue at our end and provide solution as soon as possible. 
 
Regards, 
Rahul 
 



SL Steven Littleford July 21, 2020 11:36 PM UTC

My point is - you are getting this error on a lot of your controls in version 18.2.xx. My colleague and i have sent you another example of the issue in a example project overnight. It took many many hours to create a reproducible example for you - we cant possibly do this on every control where you have the issue. 

Simply throwing back this issue to the Dev community asking us to spend countless days trying to find the issue for you is not good enough. 

You have introduce a catastrophic issue into your toolset in this release across a number of controls. Whether it is confined to the controls that exist in the grid i.e. Toolbar etc - I'm not sure of. 

I think if you take the issue you found in the above grid crash (156155 ) and check your other components you will find the problem is systemic.






 


RN Rahul Narayanasamy Syncfusion Team July 30, 2020 05:28 PM UTC

Hi Steven,  
  
Sorry for the inconvenience. 
  
We have confirmed this console error problem as a bug and logged a task for the same. The fix for this issue will be available in upcoming bi-weekly release which is expected to be rolled out by the mid of August 2020. Please get back to us if you need further assistance.  
 
Regards, 
Rahul 


Loader.
Up arrow icon