We have a bot endpoint implemented as an Azure function and it's running fine within Azure.
We've followed this process to enable us to run/debug the Azure Function locally: https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local
In particular, the following PowerShell command:
func azure functionapp fetch-app-settings <FunctionAppName>
It appears to run fine and put the necessary settings into local.settings.json, which is output to bin when the project is built. However, when we start the function (Right click project - Debug - Start new instance) it gives this error:
Failed to decrypt settings. Encrypted settings only be edited through 'func settings add'.
On two machines we are getting the above decryption error, on two machines it is running fine.
Any suggestions?
P.S. We are not trying to share the same local.settings.json file between machines, which I understand would also yield this sort of error.
UPDATE
Here is the content of the local.settings.json file from a problem machine, with encrypted values removed:
{
"IsEncrypted": true,
"Values": {
"AzureWebJobsStorage": "[encrypted content]",
"AzureWebJobsDashboard": "[encrypted content]",
"FUNCTIONS_EXTENSION_VERSION": "[encrypted content]",
"WEBSITE_CONTENTAZUREFILECONNECTIONSTRING": "[encrypted content]",
"WEBSITE_CONTENTSHARE": "[encrypted content]",
"WEBSITE_NODE_DEFAULT_VERSION": "[encrypted content]",
"BotEnv": "[encrypted content]",
"BotId": "[encrypted content]",
"MicrosoftAppId": "[encrypted content]",
"MicrosoftAppPassword": "[encrypted content]",
"BotStateEndpoint": "[encrypted content]",
"BotOpenIdMetadata": "[encrypted content]",
"UseTableStorageForConversationState": "[encrypted content]",
"BotDevAppInsightsKey": "[encrypted content]",
"BotDevAppInsightsName": "[encrypted content]",
"BotDevAppInsightsAppId": "[encrypted content]",
"AzureWebJobsBotFrameworkDirectLineSecret": "[encrypted content]",
"AzureWebJobsBotFrameworkDirectLineEndpoint": "[encrypted content]",
"WEBSITE_USE_PLACEHOLDER": "[encrypted content]",
"APPINSIGHTS_INSTRUMENTATIONKEY": "[encrypted content]",
"MSDEPLOY_RENAME_LOCKED_FILES": "[encrypted content]"
},
"ConnectionStrings": {}
}