Blazor WebAssembly (.NET 8) - AuthenticationService.init JSInterop Error and Debugger Protocol Issues

Luke Abraham 0 Reputation points
2025-08-13T12:41:42.7666667+00:00

User's image

User's image

User's image

User's image

I'm working on a Blazor WebAssembly solution targeting .NET 8, with both client and server projects. The client uses MSAL authentication (Microsoft.AspNetCore.Components.WebAssembly.Authentication and Microsoft.Authentication.WebAssembly.Msal). I'm not sure really what caused them to come up. I have tried the basic things like clean and build/rebuild the solution but that did not solve it. No matter if I run debug or regular the errors occur in the developer console and don't allow me to do anything on our localhost.

Any guidance or troubleshooting steps would be appreciated!

Developer technologies | .NET | Blazor
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 79,526 Reputation points Volunteer Moderator
    2025-08-16T15:52:40.27+00:00

    As you are getting a script error on the msal JavaScript library, I’d suspect configuration or issues with the msal library. Every release of Blazor has better support for msal. As you appear to be at the beginning of the project I’d upgrade to a new version of Blazor either .net 9 or 10. Version 10 has improved samples:

    https://learn.microsoft.com/en-us/aspnet/core/blazor/security/blazor-web-app-with-oidc?view=aspnetcore-10.0&pivots=non-bff-pattern

    note: with blazor or Maui apps which are evolving rapidly, it’s best to be on the current version.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.