Open csheets opened 5 years ago
I switched from using local storage emulator to using Azure StorageAccount and the function app run ok -- so it is something to do with the Azure Storage emulator but I have no idea what. I have attempted to uninstall and re-install the storage emulator but the same error occurs after the uninstall/re-install process.
Which version of the storage emulator are you using? This actually doesn't appear to be a Durable Functions issue, but rather an issue with the Azure Functions host itself, which uses storage for things like key management (key management frames appear in your callstack).
I am using version: Windows Azure Storage Emulator 5.8.0.0 command line tool
I am able to run "regular" Azure Functions locally without any issues. Seems to be just Durable Functions that are having the problem.
Thanks - I downloaded 5.8 and observed the same problem. I have no idea why the Durable extension seems to be triggering this issue because the code path seems completely unrelated. I'll follow up with the Azure Functions Host team. I think this might possibly be a problem with extensions that use web hooks.
Here is a workaround I identified from the Functions Key Management documentation. In local.settings.json, add a new setting called AzureWebJobsSecretStorageType
and set it to "files"
.
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"AzureWebJobsSecretStorageType": "files"
}
}
/cc @fabiocav
ok - thanks
prior to your reply i ended up uninstalling and re-installing VS 2017 and that resolved the issue -- looks like it re-installed Storage Emulator 5.6 in the process so just going to stay there for now
Good to know there is a way to go back (I might consider doing that as well).
I've also opened a bug in the Azure-Functions-Host repo to track this since it will likely affect more than just Durable Functions: https://github.com/Azure/azure-functions-host/issues/3621
Indeed, this is not specific to Durable Functions, but on a host code path it relies on.
This looks like an issue with the more recent version of the Emulator, we'll investigate.
I also encountered the same error. Also, the problem is temporarily resolved by the method @cgillum presented. Thanks. https://github.com/Azure/azure-functions-durable-extension/issues/474#issuecomment-430337085
I expect that the error will be resolved.
Moving this to host repo for triage and assignment
I experienced this issue after installing the Visual Studio 2019 Preview. Installing Storage Emulator 5.9 fixed it for me.
I experienced the same issue. Thank you @cgillum for the workaround.
I am also experiencing this issue. Using the workaround.
UPDATE: said blog post
Alright. I'll be writing a blog post about this issue to make it more visible but basically, updating Storage Emulator to 5.9 solves your issue.
I was running Azure Durable Functions on .NET and NodeJS with the workaround for my samples:
I was running the v5.8 of Azure Storage Emulator. No idea what changed since the docs isn't updated yet. I've opened an issue to ensure that we get some notes.
So... updating to v5.9 fixed the issue in .NET as well as with NodeJS using the Windows Storage Emulator.
Leave the workaround in place. People may have the 5.8 version which could lead to issues. There's no clear message that the parameter is missing which makes it hard to debug. Leaving the parameter in place doesn't seem to be causing any issues with 5.9 either.
@fabiocav @cgillum Any point in making the message clearer for the users? Basically, 5.7 works, 5.9 works, 5.8 🔥.
Obviously not an issue from Azure Functions point of view but it does look more like a breaking change in the Emulator's API.
Thoughts?
Same thing is happening even if you have VS 2019 Installed and running Azure Storage Emulator 5.9. I had to add this entry to the local.settings.json to get the Azure Function to work.
@chrislangston Which version of Azure Functions are you using?
If you run func
on your CLI, can you copy the lines below the magical lightning? Mine looks like this:
Azure Functions Core Tools (2.7.1149 Commit hash: 476884e4a09c54686e460fd0c050d15139bf073e)
Function Runtime Version: 2.0.12438.0
Adding this to triaged to verify whether there are issues when running with Storage Emulator 5.9.
I'm still unable to run durable functions with Storage Emulator 5.10 and AzureWebJobsSecretStorageType
set to "files"
in the local.settings.json file.
If I remove the AzureWebJobsSecretStorageType
setting (so it defaults to blobs) I get this exception in the Storage Account logs:
03/01/2020 09:53:22 [Error_debug] [ActivityId=919f1fa3-9cd5-441d-a07a-411fec2f6828] Exception raised during processing of request.
Microsoft.Cis.Services.Nephos.Common.Protocols.Rest.FatalServerCrashingException:
The fatal unexpected exception 'Exception has been thrown by the target of an invocation.' encountered during processing of request.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
at System.Security.Cryptography.MD5CryptoServiceProvider..ctor()
This means I can't upload blobs to the storage emulator. I'm unable to disable FIPS compliant algorithms for encryption because i'm using a work machine. Looks like Durable Functions rely on blobs in the azure-webjobs-hosts
and azure-webjobs-secrets
containers. It's just a shame the AzureWebJobsSecretStorageType
setting set to "files"
doesn't overcome this issue. Wonder if this would be possible to fix in the future?
Of course I can workaround this by using a real storage account instead of the emulator..
Looks like Durable Functions rely on blobs in the
azure-webjobs-hosts
andazure-webjobs-secrets
containers. It's just a shame theAzureWebJobsSecretStorageType
setting set to"files"
doesn't overcome this issue. Wonder if this would be possible to fix in the future?Of course I can workaround this by using a real storage account instead of the emulator..
Actually, I failed to successfully deploy my Durable Functions into Azure because of this same thing. Manual removal of the blob's contents (the keys) solved the issue.
Thanks - I downloaded 5.8 and observed the same problem. I have no idea why the Durable extension seems to be triggering this issue because the code path seems completely unrelated. I'll follow up with the Azure Functions Host team. I think this might possibly be a problem with extensions that use web hooks.
Workaround
Here is a workaround I identified from the Functions Key Management documentation. In local.settings.json, add a new setting called
AzureWebJobsSecretStorageType
and set it to"files"
.{ "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true", "FUNCTIONS_WORKER_RUNTIME": "dotnet", "AzureWebJobsSecretStorageType": "files" } }
/cc @fabiocav
This solved issue for me. I had upgraded to VS 2019 and Emulator 5.1
Yes, that will solve the problem for local dev. Deleting the Blobs in question will solve it when the same thing happens in Azure.
This just saved me some time with Azurite
I was successfully running Durable Functions for a few weeks but now all of a sudden I am not able to run them and am getting the following output. Not sure what has changed -- any pointers on what to look at would be most appreciated. I have also included a related stacktrace below.
The following is a stacktrace that is being thrown: