Azure / Azure/Azurite

VS 2022 Local Debug Durable Functions Issues "Error in LeaseManagerStarter task. Exception: Microsoft.WindowsAzure.Storage.StorageException: The response ended prematurely, with at least 128 additional bytes expected."

Open
#1,447 34 comments 2 reactions 1 assignee Claimed by @edwin-huber View on GitHub
azure-function blob-storage table-storage Visual Studio
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

### Which service(blob, file, queue, table) does this issue concern?
N/A

### Which version of the Azurite was used?
Latest Visual Studio 2022 Enterprise

### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
Visual Studio Code Extension

### What's the Node.js version?
N/A

### What problem was encountered?
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. When running the application in VS 2022 and debugging 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.
https://stackoverflow.com/questions/67728499/azure-functions-there-was-an-error-performing-a-read-operation-on-the-blob-stor

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 had previously posted about this in the Azure Functions Durable Function discussion which has more details:
https://github.com/Azure/azure-functions-durable-extension/discussions/2025

@[davidmrdavid](https://github.com/davidmrdavid) suggested that I bring the discussion here.

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, or there is something else going wrong.

### Steps to reproduce the issue?

Debug my project in VS 2022.

### Have you found a mitigation/solution?

It was suggested that if I run Azure Storage Emulator before launching VS 2022 that I can debug the project without issue but that it will be using Azure Storage Emulator rather than Azurite. Since Azure Storage Emulator is deprecated I would like to get things working with Azurite.

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.