EdCharbeneau / BlazorSize

Blazor browser size interop for matchMedia and browser window size at runtime.
336 stars 39 forks source link

Microsoft.JSInterop.JSException: Importing a module script failed. #91

Closed EdCharbeneau closed 1 year ago

EdCharbeneau commented 1 year ago

@Mike-E-angelo Greetings,

This component is working really well for me, thank you again for taking the time to develop it. I do appear to be getting some intermittent exceptions, however, and was hoping to track them down.

To start, there's this one that I was getting earlier today, which I have not seen until then:

Microsoft.JSInterop.JSException: Importing a module script failed.
undefined
   at async ValueTask<TValue> Microsoft.JSInterop.JSRuntime.InvokeAsync<TValue>(long targetInstanceId, string identifier, object[] args)
   at async Task BlazorPro.BlazorSize.MediaQueryService.CreateMediaQueryList(DotNetObjectReference<MediaQueryList> dotNetObjectReference)
   at async Task BlazorPro.BlazorSize.MediaQueryList.OnAfterRenderAsync(bool firstRender)
   at async Task Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
EdCharbeneau commented 1 year ago

Appears to be resolved. Will reopen if someone encounters this issue again. Appears to be a browser and or server issue not a bug in the BlazorSize codebase. https://github.com/EdCharbeneau/BlazorSize/issues/82#issuecomment-1522080309