Blazor wasm template console errors – jQuery not defined
I built a template Blazor wasm App with net.core and identity page scaffolding, with the latest net.core version (3.1.7 or SDK 3.1.401). Thing is, I’m stuck getting two browser console errors:
- NS_ERROR_NOT_AVAILABLE location: JS frame :: resource:///modules/FaviconLoader.jsm :: onStopRequest
- Loading failed for “https://localhost:44399/_framework/blazor.webassembly.js”.
[displayed as warning]
Opening one of the scaffolded Identity pages this error is displayed:
- ReferenceError: jQuery is not defined
I don’t see why I am getting this errors as the pages seem to load fine. Thanks for your help!
(as this answer post has been deleted by moderator bhargav-rao I’m adding it here:)
Could get rid of error #1 by updating Visual Studio to v 16.7.1.
Building a new test blazor webassembly project with net.core and authentication the load error for blazor.webassembly.js is there right from the start, without any modifications to the project.
(first guess was it did result from scaffolding of identity pages, but retried with a new project to see its there from the beginning)
Error #2 disappeared in the browser after changing to server prerendering, in the _Hosts.csprj I changed the blazor.webassembly.js to the first script in the load order:
<script src="_framework/blazor.webassembly.js"></script> <script src="_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js"></script>
When i run the google mobile friendly test for the site, the files:
_framework/blazor.webassembly.js css/app.css css/bootstrap.min.css img/myimg01.jpg
are reported under ‘resources that could not be loaded’. -?
jQuery Error still there, but obviously does not matter too much – ?
Anyone out there with the same problem?