-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orchestration Trigger input binding fails with "Orchestration history state was either missing from the input or not a string value" #2804
Comments
This is incredibly strange. Does your app contain any customizations, like middleware, injected services, etc., - i.e. things that would normally be done in the Program.cs file? I can't think of any reason why the trigger binding value would be an object, and why it would be a fully populated It would be great if you could provide a minimal repro app for us to look at. |
It seems to be related to inheritance when passing objects as an input parameter to the |
I found the offending line. I had previously followed some of the advice in this thread #2527 So the functions' HostBuilder looked like this: var host = new HostBuilder()
.ConfigureFunctionsWebApplication(
builder => new DurableTaskExtensionStartup().Configure(builder)
)
.ConfigureServices(services =>
{
services.AddHttpClient();
})
.Build();
host.Run(); Now this manual call to Repository here demonstrates the issue. it's about as minimal as it gets, it's based on one of the public templates: |
@jviau can you take a look? This seems related to another issue that you've helped users with before. |
@EmilDamsbo I imagine what happened is your source generation was eventually fixed, so that line: |
I agree that this is most likely what happened after all my experimentation. Would it be possible to catch this DI double-registration on the durable extensions side or should I open an issue elswhere? |
We could do some work on the durable side to make this registration re-enterable. |
@EmilDamsbo - if you're still seeing the issue, can you provide a latest minimal repro please? We'd like to know what exactly is the trigger of the exception. Thanks! |
Closing since the underlying issue has been fixed. |
This issue still exists when using the new
And later calls for
However, the moment you add that
To reproduce, simply create a new Azure Functions app with a Durable Function in it, update the SDKs to preview versions and change the host setup from
to
The versions I've used to reproduce it:
|
Reactivating per @MarcinJuraszek as it seems like a new regression might have been introduced in some of the current preview nuget packages. @jviau - any ideas what might be going on here? |
Description
Running into the uncaught exception
"Orchestration history state was either missing from the input or not a string value"
.Setup
a.. https://github.com/Azure/azure-functions-durable-extension/blob/dev/src/Worker.Extensions.DurableTask/DurableTaskFunctionsMiddleware.cs#L49
b.
triggerInputData
is expected to have a.value
that is either null or string, but in my case it's a{Microsoft.Azure.Functions.Worker.Extensions.DurableTask.FunctionsOrchestrationContext}
. The wholetriggerInputData
object after binding:Expected behavior
I expect the orchestration trigger to bind successfully, and start executing my function code.
Actual behavior
Function 'DispatchJob (Orchestrator)' failed with an error. Reason: Orchestration history state was either missing from the input or not a string value.
Relevant source code snippets
// insert code snippet here
Known workarounds
I haven't encountered any workarounds yet.
App Details
Screenshots
The text was updated successfully, but these errors were encountered: