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.

Failed to deserialize exception from TaskActivity

See original GitHub issue

Microsoft.Azure.WebJobs.Extensions.DurableTask v1.6.2

Issue

If you have an orchestrator call a sub orchestrator and that sub orchestrator calls an activity function which throws an exception, then the exception cannot be deserialised and you get “Failed to deserialize exception from TaskActivity”

Easy to reproduce like this:

public class MyOrchestrator

{
    [FunctionName("MyTimer")]
    public static async Task RunTimerAsync([TimerTrigger("0 */5 * * * *", RunOnStartup = true)]TimerInfo myTimer, [OrchestrationClient]DurableOrchestrationClient orchestrationClient, ILogger log)
    {
        log.LogInformation($"Executing");

        string instanceId = await orchestrationClient.StartNewAsync("MyOrchestrator", "Test");

        
    }


    [FunctionName("MyOrchestrator")]
    public static async Task RunOrchestratorAsync([OrchestrationTrigger] DurableOrchestrationContext context, ILogger logger)
    {
        try
        {
            await context.CallSubOrchestratorAsync("MySubOrchestrator", "Booooo");
        }
        catch (Exception ex)
        {
            //The exception here is Failed to deserialize exception from TaskActivity:
        }
    }

    [FunctionName("MySubOrchestrator")]
    public static async Task RunSubOrchestratorAsync([OrchestrationTrigger] DurableOrchestrationContext context, ILogger logger)
    {
        await context.CallActivityAsync("MyActivityFunction", "Booooo");
    }

    [FunctionName("MyActivityFunction")]
    public static void RunActivityFunction([ActivityTrigger] DurableActivityContext context, ILogger logger)
    {
        throw new Exception("WTF");
    }
} 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:18
  • Comments:7

github_iconTop GitHub Comments

11reactions
thargenediadcommented, Jan 18, 2019

please fix this!

1reaction
cgillumcommented, Feb 27, 2019

I see this issue has received a lot of votes! I’ll take a look and see if we can get a fix in for the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

json - Azure Durable Functions How should I handle ...
When I throw it from activity function I'm not getting error saying "Failed to deserialize exception from TaskActivity".
Read more >
Failed to deserialize exception from TaskActivity
We are seeing an increasing number of builds failing (after all steps complete successfully) with the following error: Failed to deserialize ...
Read more >
Handling errors in Durable Functions (Azure Functions)
Any exception that is thrown in an activity function is marshaled back to the orchestrator function and thrown as a FunctionFailedException .
Read more >
Azure Durable Functions How should I handle ...
When I throw it from activity function I'm not getting error saying "Failed to deserialize exception from TaskActivity". Tomasz Kaniewski 1007.
Read more >
Create Form Task - Unable to deserialize the response
I am trying to create a form task to take input from the user using the UiPath Action Center but during executing the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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