Skip to content

Error when triggering python orchestrator using .NET IDurableClient #535

Closed as not planned

Description

@asipras

🐛 Describe the bug

I have python durable function running on my local machine. I am using Azurite as storage backend. I am calling this orchestrator from an C# Asp.net core application using IDurableClient. I get this error when python orchestrator tries to read the message from control queue.

[2025-03-12T19:50:20.089Z] An error occurred while processing messages on calculationorchestratorv1-control-03: System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. [2025-03-12T19:50:20.090Z] at System.Convert.FromBase64String(String s) [2025-03-12T19:50:20.091Z] at Microsoft.WindowsAzure.Storage.Queue.CloudQueueMessage.get_AsString() [2025-03-12T19:50:20.092Z] at DurableTask.AzureStorage.Storage.QueueMessage..ctor(CloudQueueMessage cloudQueueMessage) in /_/src/DurableTask.AzureStorage/Storage/QueueMessage.cs:line 24 [2025-03-12T19:50:20.094Z] at DurableTask.AzureStorage.Storage.Queue.GetMessagesAsync(Int32 batchSize, TimeSpan visibilityTimeout, CancellationToken callerCancellationToken) in /_/src/DurableTask.AzureStorage/Storage/Queue.cs:line 159 [2025-03-12T19:50:20.096Z] at DurableTask.AzureStorage.Messaging.ControlQueue.GetMessagesAsync(CancellationToken cancellationToken) in /_/src/DurableTask.AzureStorage/Messaging/ControlQueue.cs:line 80

It looks like Asp.net app when queueing orchestrator request is encoding in plain text while the python durable function is expecting message to be encoded as Base64. The problem is I do not know how to tell python orchestrator to not use Base64 encoding when reading message from the control queue.

On .net side I am using the "Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="3.0.4" to queue message.
On python side I am using azure-functions-durable 1.2.10 and extensionBundle version": "[4.0.0, 5.0.0)"

🤔 Expected behavior

What should have happened?
Python orchestrator should be able to read messages with no encoding from the control queue.
☕ Steps to reproduce
What Durable Functions patterns are you using, if any?
Trigger orchestrator using IDurableClient fron Asp.net application.
Any minimal reproducer we can use?
Are you running this locally or on Azure?

⚡If deployed to Azure

We have access to a lot of telemetry that can help with investigations. Please provide as much of the following information as you can to help us investigate!

  • Timeframe issue observed:
  • Function App name:
  • Function name(s):
  • Azure region:
  • Orchestration instance ID(s):
  • Azure storage account name:

If you don't want to share your Function App or storage account name GitHub, please at least share the orchestration instance ID. Otherwise it's extremely difficult to look up information.

Activity

  1. andystaples commented on Jul 29, 2026

    @andystaples
    Collaborator

    The stack trace identifies a queue-message encoding mismatch in the DurableTask extension layer, not the Python SDK.

    The reader shown in the trace uses the legacy Microsoft.WindowsAzure.Storage queue SDK from DurableTask v2, which expects Base64 messages. The standalone .NET client was DurableTask v3.0.4, which uses Azure.Storage.Queues and defaults to UTF-8. A v3 client therefore wrote plain text that the v2 reader attempted to Base64-decode.

    azure-functions-durable-python does not read or write Azure Storage queues, so there is no actionable SDK change here. Current extension bundle v4 releases ship DurableTask v3 and use compatible UTF-8 defaults. Users pinned to an older bundle should either upgrade or configure the standalone v3 client to use Base64 encoding. Closing as not actionable in this repository and resolved by current extension bundles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions