Cannot read property 'invokeMethodAsync' of undefined

Good Morning,
I'm right now on my 3rd day stripping all my code, testing with small code, and I get this error doing this : 

I request Data to my API -> It shows to my Pivot Table (Async or not Async) - it works.
Then.
Request again new data from API -> the first Pivot Table it refresh ,  the 2nd Pivot Table it keeps loading and give that error " InvokemethodAsync" .

I've removed everything that is async, i've added async . 

I've tryed with : base.InvokeAsync(StateHasChanged);  tryed with normal StateHasChanged .

Its this a issue with syncfusion Pivot Table ?
My best Regards,
Dionisio Luis 

InvokeMethodAsync' of undefined
    at r.value (syncfusion-blazor.min.js:1)
    at e.executeQuery (data-9388dc.min.js:1)
    at t.getData (pivotview-9388dc.min.js:1)
value @ syncfusion-blazor.min.js:1
e.executeQuery @ data-9388dc.min.js:1
t.getData @ pivotview-9388dc.min.js:1
setTimeout (async)
t.refreshData @ pivotview-9388dc.min.js:1
t.onPropertyChanged @ pivotview-9388dc.min.js:1
e.dataBind @ ej2.min.js:1
t.dataBind @ ej2.min.js:1
e.setProperties @ ej2.min.js:1
reInitComponent @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
u @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
forEach.e.<computed> @ syncfusion-blazor.min.js:1
r @ syncfusion-blazor.min.js:1
s @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
setInterval (async)
(anonymous) @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
u @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
forEach.e.<computed> @ syncfusion-blazor.min.js:1
r @ syncfusion-blazor.min.js:1
s @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
u @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
forEach.e.<computed> @ syncfusion-blazor.min.js:1
r @ syncfusion-blazor.min.js:1
s @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
(anonymous) @ syncfusion-blazor.min.js:1
(anonymous) @ blazor.webassembly.js:1
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
_mono_wasm_invoke_js_marshalled @ dotnet.3.2.0-preview3.20168.1.js:1
do_icall @ 007574de:1
do_icall_wrapper @ 007574de:1
interp_exec_method @ 007574de:1
interp_runtime_invoke @ 007574de:1
mono_jit_runtime_invoke @ 007574de:1
do_runtime_invoke @ 007574de:1
mono_runtime_invoke_checked @ 007574de:1
mono_runtime_try_invoke_array @ 007574de:1
ves_icall_InternalInvoke @ 007574de:1
ves_icall_InternalInvoke_raw @ 007574de:1
do_icall @ 007574de:1
do_icall_wrapper @ 007574de:1
interp_exec_method @ 007574de:1
interp_runtime_invoke @ 007574de:1
mono_jit_runtime_invoke @ 007574de:1
do_runtime_invoke @ 007574de:1
mono_runtime_try_invoke @ 007574de:1
mono_runtime_invoke @ 007574de:1
mono_wasm_invoke_method @ 007574de:1
Module._mono_wasm_invoke_method @ dotnet.3.2.0-preview3.20168.1.js:1
call_method @ dotnet.3.2.0-preview3.20168.1.js:1
(anonymous) @ dotnet.3.2.0-preview3.20168.1.js:1
beginInvokeDotNetFromJS @ blazor.webassembly.js:1
s @ blazor.webassembly.js:1
e.invokeMethodAsync @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
t.dispatchEvent @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
e.onGlobalEvent @ blazor.webassembly.js:1
Show 40 more frames from Library code


7 Replies

DL Dionisio Luis May 12, 2020 02:29 PM UTC

Its also happening on the Grid.
On the 2nd API request, I get all the data, it shows on the Grid, but IF i press the Search Icon on one of the columns, it keeps loading and the error "InvokeMethodAsync" shows on the console log.


DL Dionisio Luis May 13, 2020 10:03 AM UTC

I've done more testing with Grid.

So: 
Created a  Component/Controller Called "GridTest.Razor" 
added:
     SfGrid DataSource=Orders

Code:
     public voidChanged(){ 
          //this.Orders =  Enumerable.Range(1, 45).Select(x => new Order() ...... <-- this code is from your example page to change DataSource data.

          this.stateHasChanged();
     }

If:
     If I invoke this method by using a button inside this Component/Controller, i dont get the error "InvokeMethodAsync".

     BUT if I invoke this method from the Parent Page that is including the Component/Controller,  I get the error "InvokeMethodAsync" (On Filter) .

     So it seems that when the method its called from the outside of the Component Code, after 2 executions the error shows up ...

     Any way to resolve this ?








ME Mouli Eswararao Syncfusion Team May 13, 2020 01:39 PM UTC

Hi Dionisio, 
We have prepared a sample where two pivot table are bound with remote data from API. But, we are unable to reproduce the reported issue. The sample is available in below link. 
So, could you please reproduce the issue in the sample and revert us or provide us your sample. This would be helpful for us to proceed further.

Regards,
Mouli
 



DL Dionisio Luis May 13, 2020 02:20 PM UTC

In attach you have your code changed to the situation that i'm reporting.
It is giving the same error . 

Waiting for a feedback 

Attachment: PivotTable_RemoteData_Updated_By_DionisioLuis_13854b90.zip


DL Dionisio Luis replied to Dionisio Luis May 13, 2020 02:47 PM UTC

In attach you have your code changed to the situation that i'm reporting.
It is giving the same error . 

Waiting for a feedback 

Attachment: PivotTable_RemoteData_Updated_By_DionisioLuis_13854b90.zip

I've changed the code using the Grid because it gives the same error as the Pivot Table.
But for the Pivot you only need to change to the Pivot Table,  and call the method 2-3 times async, and the same situation will happen to the Pivot.

But focus first on the Grid if you can


ME Mouli Eswararao Syncfusion Team May 14, 2020 03:16 PM UTC

Hi Dionisio, 
 We are validating the issue at our end. And we will update the further details within two business days(18-05-2020). 
Until then you can use the following workaround in you sample 
[Index.razor]

async Task updDataAsync(bool refresh)
 
    { 
        Console.WriteLine("updDataAsync"); 
        await gv1.ChangeAsync(refresh); 
        await Task.Delay(5000); 
        await gv2.ChangeAsync(refresh); 
    } 
 



ME Mouli Eswararao Syncfusion Team May 18, 2020 03:21 PM UTC

Hi Dionisio,

We have validated the reported issue and confirmed the same as bug. The fix for this issue will be available in Volume 2 release. Please find the feedback created from the below link.
 
  


Regards,
Mouli
 


Loader.
Up arrow icon