When I run my application, the browser console throws three, identical errors stating Could not find 'AuthenticationService.init' ('AuthenticationService' was undefined). and Microsoft.JSInterop.JSException: Could not find 'AuthenticationService.init' ('AuthenticationService' was undefined).
However, I cannot find any reference to AuthenticationService.init, only AuthenticationService.js, nor can I find any documentation of it anywhere, so I'm wondering if this might mean that I have swapped ".js" with ".init", but I can't find a single file in my entire solution (even looking on file explorer) that ends with ".init".
I have checked index.html and it specifically refers to
<script src="_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js" />
as usual.
I see no reference to AuthenticationService.init anywhere and can't find JSInterop.JSException.
Any help is appreciated, thanks.
I have a client-side Blazor project written in .NET 7. I've stumbled upon the same error lately. In my case it was an incorrect link to the AuthenticationService.js.
The correct one is
<script src="_content/Microsoft.Authentication.WebAssembly.Msal/AuthenticationService.js"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With