question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

There was an error performing a read operation on the Blob Storage Secret Repository. Please ensure the 'AzureWebJobsStorage' connection string is valid.

See original GitHub issue

Which service(blob, file, queue, table) does this issue concern?

My guess is all of them the error message, but I’m only using queue from my app.

Which version of the Azurite was used?

3.14.3

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

Came with VS2022. I then uninstall from NPM and reinstall from NPM to v3.14.3

What’s the Node.js version?

v14.18.1.

What problem was encountered?

Trying to debug my azure function app in VS2022 and on startup I get the above error. I don’t get this error on any other function app debug session.

[2021-11-18T20:06:09.561Z] There was an error performing a read operation on the Blob Storage Secret Repository. Please ensure the 'AzureWebJobsStorage' connection string is valid.
[2021-11-18T20:06:09.611Z] A host error has occurred during startup operation 'e8b3d28c-2c65-4fc6-9c7e-69cd82eda265'.
[2021-11-18T20:06:09.613Z] Azure.Storage.Blobs: Service request failed.
[2021-11-18T20:06:09.615Z] Status: 500 (Internal Server Error)
[2021-11-18T20:06:09.617Z]
[2021-11-18T20:06:09.618Z] Headers:
[2021-11-18T20:06:09.619Z] Server: Azurite-Blob/3.14.3
[2021-11-18T20:06:09.620Z] Date: Thu, 18 Nov 2021 20:06:09 GMT
[2021-11-18T20:06:09.620Z] Connection: keep-alive
[2021-11-18T20:06:09.621Z] Keep-Alive: REDACTED
[2021-11-18T20:06:09.621Z] Content-Length: 0

Steps to reproduce the issue?

Press F5

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "FunctionStorageBindings-StorageConnectionString": "REDACTED",
    "AzureAppConfiguration.ConnectionString_PrimaryStore": "REDACTED",
    "AzureAppConfiguration.ConnectionString_SecondaryStore": "REDACTED",
    "AzureAppConfiguration.CacheExpirationTimeInSeconds": 120,
    "AzureAppConfiguration.EnvironmentLabel": "LabA",
    "DurableTaskHubName": "BulkEditProcessorDEV2",
    "DurableManagementStorage": "UseDevelopmentStorage=true",
    "AzureWebJobs.ProcessBulkEditQueue.Disabled": 0
  }
}

Here are the versions of the packages being used:

  <ItemGroup>
    <PackageReference Include="Azure.Identity" Version="1.5.0" />
    <PackageReference Include="Azure.Storage.Blobs" Version="12.10.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.6.0" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventGrid" Version="3.0.0" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="4.0.1" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Azure" Version="1.1.1" />
    <PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="4.5.1" />
    <PackageReference Include="Microsoft.FeatureManagement" Version="2.4.0" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.13" />
  </ItemGroup>

If possible, please provide the debug log using the -d parameter, replacing <pathtodebuglog> with an appropriate path for your OS, or review the instructions for docker containers:

-d "<pathtodebuglog>"

Please be sure to remove any PII or sensitive information before sharing!
The debug log will log raw request headers and bodies, so that we can replay these against Azurite using REST and create tests to validate resolution.

Have you found a mitigation/solution?

No

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
mkellyelumuscommented, Jan 1, 2022

@calloncampbell I ran into the same issue. It killed the azurite process that is started with visual studio, then restarted it using a command line with admin privilege. Then it worked, so it is maybe a security related issue.

FWIW, this fix/work-around resolved the issue for me as well.

Note if I simply run “./azurite.exe” in the elevated console, all works fine. But if I run it with the same args VS uses when launching it (./azurite.exe --location “[etc.]\AppData\Local\Temp\Azurite” --debug “[etc.]\AppData\Local\Temp\Azurite\debug.log”), the [OP] issue resurfaces.

1reaction
bluewwcommented, Nov 26, 2021

@calloncampbell Thanks for the confirmation! It’s interesting we didn’t see the file created in the log, but azurite try to get it. We will continue look at it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Functions: There was an error performing a read ...
"There was an error performing a read operation on the Blob Storage Secret Repository. Please ensure the 'AzureWebJobsStorage' connection string ...
Read more >
Storage emulator did not start when running Azure functions
... There was an error performing a read operation on the Blob Storage Secret Repository. Please ensure the 'AzureWebJobsStorage' connection string is valid...
Read more >
Azure Functions hacks - DEV Community ‍ ‍
"There was an error performing a read operation on the Blob Storage ... Please ensure the 'AzureWebJobsStorage' connection string is valid.
Read more >
Configure a connection string - Azure Storage - Microsoft Learn
You can configure connection strings to: Connect to the Azurite storage emulator. Access a storage account in Azure. Access specified resources ...
Read more >
Issues with Azure cloud? - Epicor User Help Forum
I see the same error every time 'There was an error performing a read operation on the Blob Storage Secret Repository. Please ensure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found