Skip to content

Error when triggering python orchestrator using .NET IDurableClient #535

Open
@asipras

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Priority 2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions