VS 2022 Local Debug Durable Functions Issues #2025
-
I have an Azure Functions v3 application that I have been developing and running for several years. In VS 2019 I could debug locally without issue. Today when I opened the application in VS 2022 and tried to debug I ran into several issues. There was one issue related to AzureWebJobsSecretStorageType that I solved by adding "AzureWebJobsSecretStorageType": "files" to my local.settings.json based on this post. But after that I am still seeing errors that seem related to Durable Functions and I am not finding any answers online so far. One issue is a timer function listener that triggers a Durable Functions clean up is unable to start due to Azure.Storage.Blobs: Service request failed. But then right after it seems to be able to start just fine. Why would it not start and then start? Second is an "Error in LeaseManagerStarter task. Exception: Microsoft.WindowsAzure.Storage.StorageException: The response ended prematurely, with at least 128 additional bytes expected." which then leads to a "Error in LeaseManagerStarter task. Exception: System.InvalidOperationException: AppLeaseManager has already started" I suspect maybe an issue with Azure Storage Emulator because previously in VS2019 when I would debug the Functions app it would automatically start Azure Storage Emulator but I don't see that happening, but maybe it happens a different way in VS2022. I do have "AzureWebJobsStorage": "UseDevelopmentStorage=true" in settings. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 22 replies
-
It looks like you’re running Azurite and not the older Azure Storage Emulator. It also looks like you’re running a much newer version of the Functions runtime. I can tell because I see the newer Track 2 Azure Storage SDKs in these error messages. All of these changes to your environment are likely related to the problems you’re seeing. Can you confirm the version of the Core Tools that gets run when you start debugging? @fabiocav are there any known compatibility issues with Functions V4 core tools and Azurite that might explain this? |
Beta Was this translation helpful? Give feedback.
-
@davidmrdavid
Heading out for the weekend now. |
Beta Was this translation helpful? Give feedback.
-
@davidmrdavid The problem started when I moved the solution to VS 2022. The project works fine in VS 2019. I understand that is because VS 2019 uses the Azure Storage Emulator and VS 2022 uses Azurite. So, either VS 2022 should just work or there should be some migration steps documented someplace on how to convert a project from Azure Storage Emulator to Azurite. This is what I see if I try to launch Azurite via the command line: I do not have a small repro project that I can provide. All my time is billable to my client so I can't justify spending extra time to create a small repro project. As it is, I am stretching it just spending the time to find a solution. And the only reason I am doing this is because launching Azure Storage Emulator before running the solution is a pain and I really would like not to be using something Microsoft has deprecated. I can provide the whole solution privately but it is relatively complex. |
Beta Was this translation helpful? Give feedback.
-
I will try to do this tomorrow. Thanks |
Beta Was this translation helpful? Give feedback.
It looks like you’re running Azurite and not the older Azure Storage Emulator. It also looks like you’re running a much newer version of the Functions runtime. I can tell because I see the newer Track 2 Azure Storage SDKs in these error messages. All of these changes to your environment are likely related to the problems you’re seeing.
Can you confirm the version of the Core Tools that gets run when you start debugging?
@fabiocav are there any known compatibility issues with Functions V4 core tools and Azurite that might explain this?