© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
6 replies
Pyro2817

Using JavaScript with Blazor

I'm currently working on a project that interacts with Google Maps API.
It is now mandatory to use Javascript Map API, since it's needed some map manipulation.
I have been stuck trying to load the map in the web page without success since yesterday.
I read a lot of guides a saw some videos but the outcome is always the same, he cannot find the file.
Does anyone have any idea what it could be wrong?
Using: .Net 8, Blazor WebAssembly

warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
      Unhandled exception rendering component: error loading dynamically imported module: http://localhost:5047/_content/RouteMancer/js/maps.js

      Microsoft.JSInterop.JSException: error loading dynamically imported module: http://localhost:5047/_content/RouteMancer/js/maps.js

         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at RouteMancer.Components.MapComponents.Map.OnAfterRenderAsync(Boolean firstRender) in Google-Maps-API/RouteMancer/Components/MapComponents/Map.razor:line 16
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'XrWoEMkJXcoALPayi7sJx8D2J1iqxyvxtEFhihpHly4'.
      Microsoft.JSInterop.JSException: error loading dynamically imported module: http://localhost:5047/_content/RouteMancer/js/maps.js

         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at RouteMancer.Components.MapComponents.Map.OnAfterRenderAsync(Boolean firstRender) in Google-Maps-API/RouteMancer/Components/MapComponents/Map.razor:line 16
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
      Unhandled exception rendering component: error loading dynamically imported module: http://localhost:5047/_content/RouteMancer/js/maps.js

      Microsoft.JSInterop.JSException: error loading dynamically imported module: http://localhost:5047/_content/RouteMancer/js/maps.js

         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at RouteMancer.Components.MapComponents.Map.OnAfterRenderAsync(Boolean firstRender) in Google-Maps-API/RouteMancer/Components/MapComponents/Map.razor:line 16
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'XrWoEMkJXcoALPayi7sJx8D2J1iqxyvxtEFhihpHly4'.
      Microsoft.JSInterop.JSException: error loading dynamically imported module: http://localhost:5047/_content/RouteMancer/js/maps.js

         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at RouteMancer.Components.MapComponents.Map.OnAfterRenderAsync(Boolean firstRender) in Google-Maps-API/RouteMancer/Components/MapComponents/Map.razor:line 16
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

✅ Blazor and Javascript loading
C#CC# / help
2y ago
❔ Use Javascript in Blazor Server App
C#CC# / help
3y ago
❔ Blazor JSInterop declare component-scoped javascript variables
C#CC# / help
4y ago
❔ Using DataTable in .cshtml File with JavaScript
C#CC# / help
3y ago