Skip to content

[Bug]: failed to fetch dynamically imported module in datagrid #6637

Description

@blenke

Blazorise Version

2.1.3

What Blazorise provider are you running on?

Bootstrap5

Link to minimal reproduction or a simple code snippet

In my error log I sometimes see the following error message:

Failed to fetch dynamically imported module: https://www.replaced.com/administration/_content/Blazorise.DataGrid/datagrid.js?v=2.1.3.0 TypeError: Failed to fetch dynamically imported module: https://www.replaced.com/administration/_content/Blazorise.DataGrid/datagrid.js?v=2.1.3.0

With the following details:
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, JSCallType callType, Object[] args) at Blazorise.Modules.BaseJSModule.g__InitializeModule|11_0() at Blazorise.Modules.BaseJSModule.DisposeAsync(Boolean disposing) at Blazorise.Modules.BaseJSModule.DisposeAsync(Boolean disposing) at Blazorise.Modules.BaseJSModule.DisposeAsync() at Blazorise.Extensions.ObjectExtensions.SafeDisposeAsync(IAsyncDisposable disposable) at Blazorise.DataGrid.BaseDataGridComponent.DisposeAsync(Boolean disposing) at Blazorise.DataGrid.DataGrid`1.DisposeAsync(Boolean disposing) at Blazorise.BaseAfterRenderComponent.DisposeAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.g__GetHandledAsynchronousDisposalErrorsTask|99_0(Task result)

I don't see any other javascript import failures like this.

Steps to reproduce & bug description

I cannot reproduce the problem, it happened a few times after the upgrade from 1.8.x to 2.1.x . The user under which name the error was logged did not notice an error message.

What is expected?

no exception error

What is actually happening?

occasional errors

What browsers do you see the problem on?

Microsoft Edge

Any additional comments?

How could i better diagnose this issue ? The problem began after upgrading to 2.1.x , I skipped 2.0 for this application. This is the _layout.cshtml where the imports occur:

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <base href="~/" />
    
    <link href="css/site.css" rel="stylesheet" />
    <link href="ApplicationName.styles.css" rel="stylesheet" />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
    <link href="_content/Blazorise.Icons.FontAwesome/v6/css/all.min.css" rel="stylesheet">
    <link href="_content/Blazorise/blazorise.css?v=2.1.3.0" rel="stylesheet" />
    <link href="_content/Blazorise.Bootstrap5/blazorise.bootstrap5.css?v=2.1.3.0" rel="stylesheet" />
    <link href="_content/Blazorise.Snackbar/blazorise.snackbar.css" rel="stylesheet" />
    <link href="_content/Blazorise.LoadingIndicator/blazorise.loadingindicator.css" rel="stylesheet" />

    <component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
</head>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions