ArgumentException "The function 'XYZ' doesn't exist" when the functions host recycles
See original GitHub issueIssue
Given sufficient load on a function app, it’s possible that an orchestrator function will fail with the following exception during a host recycle:
{InstanceID}: Function 'XYZ (Orchestrator)' failed with an error. Reason: System.ArgumentException: The function 'ABC' doesn't exist, is disabled, or is not an activity function. Additional info: No activity functions are currently registered!
at Microsoft.Azure.WebJobs.Extensions.DurableTask.DurableTaskExtension.ThrowIfFunctionDoesNotExist(String name, FunctionType functionType)
at Microsoft.Azure.WebJobs.DurableOrchestrationContext.CallDurableTaskFunctionAsync[TResult](String functionName, FunctionType functionType, String instanceId, RetryOptions retryOptions, Object input)
This is caused by an incorrect validation check that occurs when the functions host is shutting down. The result is that the orchestration transitions into a Failed state.
This issue is expected to impact all versions of the Durable Functions extension.
Workaround
No known workarounds at this time. Any failed orchestrations will need to be restarted from the beginning.
Technical Details
The problem is that the DurableTaskListener “deregisters” a function when its listener is stopped by the functions runtime. It’s possible that an orchestrator function may still be running after the listener has been stopped, in which case the CallActivityAsync and CallSubOrchestratorAsync APIs will throw an exception because the target function is no longer listed.
The fix should be to relax this validation so that we don’t throw in the case where a function has been “delisted”, but rather allow the CallActivityAsync or CallSubOrchestratorAsync call to succeed. This will allow the message to be written to the queue, and once the listeners are startup up again, the function-call message can be picked up.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (2 by maintainers)

Top Related StackOverflow Question
Clearing azure emulator data solved problem for me,
cd C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator.\AzureStorageEmulator.exe clear allPlease educate me if this is the wrong approach.
@ParthPurani
Thanks, that helped. My problem started when I renamed some functions with more meaningful names