Error in VSCode when connecting to Function Apps in some subscriptions but not others.

WildAl 25 Reputation points
2024-04-19T14:43:07.7933333+00:00

In VS Code, using the Azure Extension, when I click on a Function Apps there is an error generated for each function in two of my subscriptions but not two others. It makes no difference whether the functions are working or not. The error seems to come from the data VS Code receives from Azure.

The following error comes up in VS Code in the bottom right area:

"internal error: Expected value to be neither null nor undefined: defaultHostName . Source: Azure Functions" .

When I click on any function, in a subscription that has the problem, I get the following error message underneath the function:Could not resolve resource "/subscriptions/xxxxx/resourceGroups/xxx/providers/Microsoft.Web/sites/I checked the commencement date on the subscriptions that don't have an error and they both have a start date of the year 2014. Of the subscriptions that don't work, one has a start date of Mar/2016 and one Nov/2018. So it might be related to something that was installed or perhaps not installed with later subscriptions, or with how those subscriptions work with Azure.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,287 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jimmy 0 Reputation points
    2024-05-01T14:16:53.9566667+00:00

    Update your azure functions extension. I opened an issue and worked with the dev to resolve this.