sf.calendar undefined randomly

[2020-10-12T23:33:11.195Z] Error: Microsoft.JSInterop.JSException: sf.calendars is undefined ./bundles/daterangepicker.js@https://localhost:44363/_content/Syncfusion.Blazor/scripts/daterangepicker-ecff47.min.js:1:2906 s@https://localhost:44363/_content/Syncfusion.Blazor/scripts/daterangepicker-ecff47.min.js:1:110 @https://localhost:44363/_content/Syncfusion.Blazor/scripts/daterangepicker-ecff47.min.js:1:937 @https://localhost:44363/_content/Syncfusion.Blazor/scripts/daterangepicker-ecff47.min.js:1:975 at Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation[T](String identifier, Object[] args) at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args) at Syncfusion.Blazor.Internal.SfBaseUtils.ImportScripts(IJSRuntime jsRuntime, String modulePath) at Syncfusion.Blazor.Internal.SfBaseUtils.ImportModules(IJSRuntime jsRuntime, List`1 scriptModules, String hashKey) at Syncfusion.Blazor.BaseComponent.InitComponent() at Syncfusion.Blazor.BaseComponent.OnAfterRenderAsync(Boolean firstRender) at Syncfusion.Blazor.Calendars.SfDateRangePicker.OnAfterRenderAsync(Boolean firstRender) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

Hello,
Above is the error I get when navigating to an empty page with 3 date range pickers with a model bind. The model is a local variable.
I cannot consistently reproduce this. I don't know what triggers it other than just switching back and forth between navigations. Any ideas?
Thank you!

1 Reply 1 reply marked as answer

SP Sureshkumar P Syncfusion Team October 13, 2020 12:50 PM UTC

Hi Azeo, 
 
Greeting from Syncfusion support. 
 
Based on your shared information with error log. We suspect that the browser cache is the reason for the issue. We suggest you clean the cache to resolve the issue. 
 
If your sample is in Blazor WebAssembly application, then please follow the below steps. 
 
 
We would like to let you know that, the static webassets will always be cached in the browser when we are using Blazor WebAssembly application since the resources are loaded in the browser side for rendering.  
   
So, we suggest you set the HTTP header with no-cache option in your server configuration to resolve this problem. Please refer to the below Github thread and ASP.NET forum for more details.  
   
   
  
  
Note: Once you configured, please clear the browser cache then run the app. after that you didn't need to force cache clear. 
 
If your sample is in server side, then please follow the below steps. 
 
We suspect that the reported issue arises due to the NuGet cache problem and Syncfusion NuGet packages are not installed properly in your application.  
 
So, we suggest you clear the cache by follow the instructions in the below Knowledge Base link and reinstall the NuGet package once again by referring the below getting started documentation link.  
 
 
Regards, 
Sureshkumar P 


Marked as answer
Loader.
Up arrow icon