Could not find 'import' in 'window.sfBlazor

This issue seems to have resurfaced from a few months ago. I am using the file upload component and also the sidebar. Yesterday my project was working fine but now I have this issue everytime I run my project and I'm not sure how to handle it. I am on the latest version of syncfusion and using a server blazor app in VsCode.

Error: Could not find 'import' in 'window.sfBlazor'.
    at https://localhost:5001/_framework/blazor.server.js:8:30944
    at Array.forEach (<anonymous>)
    at p (https://localhost:5001/_framework/blazor.server.js:8:30904)
    at https://localhost:5001/_framework/blazor.server.js:8:31614
    at new Promise (<anonymous>)
    at e.beginInvokeJSFromDotNet (https://localhost:5001/_framework/blazor.server.js:8:31587)
    at https://localhost:5001/_framework/blazor.server.js:1:20052
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (https://localhost:5001/_framework/blazor.server.js:1:20022)
    at e.processIncomingData (https://localhost:5001/_framework/blazor.server.js:1:18006)
Microsoft.JSInterop.JSException: Could not find 'import' in 'window.sfBlazor'.
Error: Could not find 'import' in 'window.sfBlazor'.
    at https://localhost:5001/_framework/blazor.server.js:8:30944
    at Array.forEach (<anonymous>)
    at p (https://localhost:5001/_framework/blazor.server.js:8:30904)
    at https://localhost:5001/_framework/blazor.server.js:8:31614
    at new Promise (<anonymous>)
    at e.beginInvokeJSFromDotNet (https://localhost:5001/_framework/blazor.server.js:8:31587)
    at https://localhost:5001/_framework/blazor.server.js:1:20052
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (https://localhost:5001/_framework/blazor.server.js:1:20022)
    at e.processIncomingData (https://localhost:5001/_framework/blazor.server.js:1:18006)
   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.SfBaseComponent.OnAfterRenderAsync(Boolean firstRender)
   at Syncfusion.Blazor.Navigations.Internal.SfMenuBase`1.OnAfterRenderAsync(Boolean firstRender)
   at Syncfusion.Blazor.Navigations.SfMenu`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 '3VFy0-Babgyj-xpVu6LhO8_NlcBLUsZ-I4zc3uSFq88'.
Microsoft.JSInterop.JSException: Could not find 'import' in 'window.sfBlazor'.
Error: Could not find 'import' in 'window.sfBlazor'.
    at https://localhost:5001/_framework/blazor.server.js:8:30944
    at Array.forEach (<anonymous>)
    at p (https://localhost:5001/_framework/blazor.server.js:8:30904)
    at https://localhost:5001/_framework/blazor.server.js:8:31614
    at new Promise (<anonymous>)
    at e.beginInvokeJSFromDotNet (https://localhost:5001/_framework/blazor.server.js:8:31587)
    at https://localhost:5001/_framework/blazor.server.js:1:20052
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (https://localhost:5001/_framework/blazor.server.js:1:20022)
    at e.processIncomingData (https://localhost:5001/_framework/blazor.server.js:1:18006)
   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.SfBaseComponent.OnAfterRenderAsync(Boolean firstRender)
   at Syncfusion.Blazor.Navigations.Internal.SfMenuBase`1.OnAfterRenderAsync(Boolean firstRender)
   at Syncfusion.Blazor.Navigations.SfMenu`1.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

I have hosted my code here - https://github.com/AlexKman/BlazorError

Thanks for any help


3 Replies 1 reply marked as answer

AL Alex November 11, 2020 12:12 PM UTC

I've narrowed down the issue to only the google chrome browser. The app loads fine in my firefox browser but when in chrome the syncfusion components are cut off.

Firefox - https://i.imgur.com/ane9uy0.png

Chrome - https://i.imgur.com/CRA9PVw.png


AL Alex November 11, 2020 12:34 PM UTC

Fixed  the issue after clearing my google chrome cache of images and files.

Marked as answer

SN Sevvandhi Nagulan Syncfusion Team November 12, 2020 05:00 AM UTC

Hi Alex, 



We are glad to hear that you have found the solution. Please get back to us if have any other queries. 


Regards, 
Sevvandhi N 



Loader.
Up arrow icon