Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://localhost:7169/_framework/dotnet.js

Good day

I am working on a new blazor app, .NET 8 RC 1 and while the app seems to work locally as I am debugging and making changes, this error pops up in the developer tools (browser) console:

What is it, and how do I fix this?

GET https://localhost:7169/_framework/dotnet.js net::ERR_ABORTED 404 (Not Found)

Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://localhost:7169/_framework/dotnet.js

enter image description here

like image 812
DataWrangler1980 Avatar asked Jun 25 '26 17:06

DataWrangler1980


1 Answers

I recently encountered the same error and discovered that the cause in my case was related to the ASP.NET Core Server Project. Specifically, the issue was with the following line (Program.cs):

host.UseBlazorFrameworkFiles();

Interestingly, this line is not included in the Blazor Web App Template, which led me to believe that it might no longer be valid.

The error became apparent when I was updating from .NET 7 to .NET 8. Dan Roth, a prominent figure in the .NET community, has also mentioned similar issues when upgrading projects. You can find more details on his GitHub page: Dan Roth's Net8BlazorWebAssembly.

If you're facing similar problems after upgrading, I recommend following Dan Roth's upgrade advice."

like image 78
Patrizio Ricciardello Avatar answered Jun 28 '26 22:06

Patrizio Ricciardello



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!