Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
Microsoft support engineers are available to help diagnose issues with your application. If you're not able to diagnose your problem after going through this article, you can file a support ticket by going the Help > Support + troubleshooting section of durable task scheduler resource on Azure portal.
Check connection string and access to durable task scheduler
When your app isn't running as expected, first check if you have:
- The correct connection string format.
- Authentication set up correctly.
Local development
Check the connection string, which should have this format:
Endpoint=http://localhost:<port number>;Authentication=None
. Ensure the port number is the one mapped to8080
on the container running the durable task scheduler emulator.Along with the durable task scheduler emulator, make sure the Azure Storage emulator, Azurite, is started. Azurite is needed for components of the app related to Functions.
Running on Azure
Check your app for the environment variables
DURABLE_TASK_SCHEDULER_CONNECTION_STRING
andTASKHUB_NAME
.Check the value of
DURABLE_TASK_SCHEDULER_CONNECTION_STRING
. Specifically, verify that the scheduler endpoint and authentication type are correct. The connection string should be formatted as follows when using:- User-assigned managed identity:
Endpoint={scheduler endpoint};Authentication=ManagedIdentity;ClientID={client id}
, whereclient id
is the identity's client ID. - System-assigned managed identity:
Endpoint={scheduler endpoint};Authentication=ManagedIdentity
- User-assigned managed identity:
Ensure the required role-based access control (RBAC) permission is granted to the identity needing to access the specified task hub or scheduler.
- When accessing the dashboard, ensure permission is assigned to your own identity (email).
If user-assigned managed identity is used, ensure the identity is assigned to your app.
Error deploying durable functions app to Azure
If your deployment fails with an error such as Encountered an error (ServiceUnavailable) from host runtime
from Visual Studio Code, first check your app to ensure the required environment variables are set correctly. Then redeploy your app. If you see an error loading functions, click the "Refresh" button.
Unknown error retrieving details of this task hub
If you get an Unknown error retrieving details of this task hub
error on the durable task scheduler dashboard, the reason could be:
Your identity (email) doesn't have the required permission assigned for that task hub. Follow instructions to grant the permission, then access the dashboard again.
Your task hub was deleted.
Can't delete resource
Make sure you delete all task hubs in the durable task scheduler environment. If you haven't, you receive the following error message:
{
"error": {
"code": "CannotDeleteResource",
"message": "Cannot delete resource while nested resources exist. Some existing nested resource IDs include: 'Microsoft.DurableTask/schedulers/YOUR_SCHEDULER/taskhubs/YOUR_TASKHUB'. Please delete all nested resources before deleting this resource."
}
}
Can't determine project to build
If, after starting Azurite, you encounter the error: “Can't determine Project to build. Expected 1 .csproj or .fsproj but found 2”
:
- Delete the bin and obj directories in your app.
- Try running
func start
again.
Can't find native binaries for ARM
If you see gRPC errors related to not finding native binaries for ARM (such as on a Mx Mac), you may need to add the following workaround to the end of your extensions.csproj
file.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<WarningsAsErrors></WarningsAsErrors>
<DefaultItemExcludes>**</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.13.7" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask.AzureManaged" Version="0.3.0-alpha" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.3" />
</ItemGroup>
<!-- Add the below groups/targets to workaround gRPC issues on ARM devices. -->
<ItemGroup>
<PackageReference Include="Contrib.Grpc.Core.M1" Version="2.41.0" />
</ItemGroup>
<Target Name="CopyGrpcNativeAssetsToOutDir" AfterTargets="Build">
<ItemGroup>
<NativeAssetToCopy Condition="$([MSBuild]::IsOSPlatform('OSX'))" Include="$(OutDir)runtimes/osx-arm64/native/*"/>
</ItemGroup>
<Copy SourceFiles="@(NativeAssetToCopy)" DestinationFolder="$(OutDir).azurefunctions/runtimes/osx-arm64/native"/>
</Target>
</Project>
Experiencing gRPC runtime issues
For Mx Mac (ARM64) users, you may run into gRPC runtime issues with durable functions. As a workaround:
Reference the
2.41.0
version of theContrib.Grpc.Core.M1
NuGet package.Add a custom after-build target that ensures the correct ARM64 version of the gRPC libraries can be found.
<Project> <ItemGroup> <PackageReference Include="Contrib.Grpc.Core.M1" Version="2.41.0" /> </ItemGroup> <Target Name="CopyGrpcNativeAssetsToOutDir" AfterTargets="Build"> <ItemGroup> <NativeAssetToCopy Condition="$([MSBuild]::IsOSPlatform('OSX'))" Include="$(OutDir)runtimes/osx-arm64/native/*"/> </ItemGroup> <Copy SourceFiles="@(NativeAssetToCopy)" DestinationFolder="$(OutDir).azurefunctions/runtimes/osx-arm64/native"/> </Target> </Project>