Skip to content

Error: Could not find 'azureMapsControl.Core.addMap on all versions greater than 1.16.1 (Preview V2 versions) #108

@marqdouj

Description

@marqdouj

Describe the bug
If I upgrade my .NET 9 blazor app to use any version higher than 1.16.1 I get this error message in the browser console.

Error: Microsoft.JSInterop.JSException: Could not find 'azureMapsControl.Core.addMap' ('azureMapsControl' was undefined).
Error: Could not find 'azureMapsControl.Core.addMap' ('azureMapsControl' was undefined).
at https://localhost:7177/_framework/blazor.web.js:1:384
at Array.forEach ()
at l.findFunction (https://localhost:7177/_framework/blazor.web.js:1:352)
at _ (https://localhost:7177/_framework/blazor.web.js:1:5101)
at https://localhost:7177/_framework/blazor.web.js:1:2894
at new Promise ()
at w.beginInvokeJSFromDotNet (https://localhost:7177/_framework/blazor.web.js:1:2857)
at vn._invokeClientMethod (https://localhost:7177/_framework/blazor.web.js:1:65750)
at vn._processIncomingData (https://localhost:7177/_framework/blazor.web.js:1:63139)
at connection.onreceive (https://localhost:7177/_framework/blazor.web.js:1:56780)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at AzureMapsControl.Components.Runtime.MapJsRuntime.InvokeVoidAsync(String identifier, Object[] args)
at AzureMapsControl.Components.Map.AzureMap.OnAfterRenderAsync(Boolean firstRender)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

To Reproduce
Upgrade to any version higher than 1.16.1 and run the app

Expected behavior
Upgrading should not cause the error.

Screenshots

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Edge, Version 131.0.2903.112

Additional context
I could not see any difference in the readme for the scripts I was already using for 1.16.1 - is the readme up to date for script versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions