Skip to content

[BUG] Object reference not set to an instance of an object. #52407

@karthiksimplist

Description

@karthiksimplist

Library name and version

Azure.AI.Agents.Persistent 1.2.0-beta.1

Describe the bug

Message: Object reference not set to an instance of an object.

Stack: 
   at Azure.AI.Agents.Persistent.AsyncStreamingUpdateCollection.AsyncStreamingUpdateEnumerator.System.Collections.Generic.IAsyncEnumerator.MoveNextAsync()
   at Azure.AI.Agents.Persistent.AsyncStreamingUpdateCollection.GetValuesFromPageAsync(ClientResult page)+MoveNext()
   at Azure.AI.Agents.Persistent.AsyncStreamingUpdateCollection.GetValuesFromPageAsync(ClientResult page)+MoveNext()
   at Azure.AI.Agents.Persistent.AsyncStreamingUpdateCollection.GetValuesFromPageAsync(ClientResult page)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at System.ClientModel.AsyncCollectionResult`1.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()
   at Microsoft.SemanticKernel.Agents.AzureAI.Internal.AgentThreadActions.InvokeStreamingAsync(AzureAIAgent agent, PersistentAgentsClient client, String threadId, IList`1 messages, AzureAIInvocationOptions invocationOptions, ILogger logger, Kernel kernel, KernelArguments arguments, CancellationToken cancellationToken)+MoveNext()
   at Microsoft.SemanticKernel.Agents.AzureAI.Internal.AgentThreadActions.InvokeStreamingAsync(AzureAIAgent agent, PersistentAgentsClient client, String threadId, IList`1 messages, AzureAIInvocationOptions invocationOptions, ILogger logger, Kernel kernel, KernelArguments arguments, CancellationToken cancellationToken)+MoveNext()
   at Microsoft.SemanticKernel.Agents.AzureAI.Internal.AgentThreadActions.InvokeStreamingAsync(AzureAIAgent agent, PersistentAgentsClient client, String threadId, IList`1 messages, AzureAIInvocationOptions invocationOptions, ILogger logger, Kernel kernel, KernelArguments arguments, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()
   at Microsoft.SemanticKernel.Diagnostics.ActivityExtensions.RunWithActivityAsync[TResult](Func`1 getActivity, Func`1 operation, CancellationToken cancellationToken)+MoveNext()
   at Microsoft.SemanticKernel.Diagnostics.ActivityExtensions.RunWithActivityAsync[TResult](Func`1 getActivity, Func`1 operation, CancellationToken cancellationToken)+MoveNext()
   at Microsoft.SemanticKernel.Diagnostics.ActivityExtensions.RunWithActivityAsync[TResult](Func`1 getActivity, Func`1 operation, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()
   at Microsoft.SemanticKernel.Agents.AzureAI.AzureAIAgent.InvokeStreamingAsync(ICollection`1 messages, AgentThread thread, AzureAIAgentInvokeOptions options, CancellationToken cancellationToken)+MoveNext()
   at Microsoft.SemanticKernel.Agents.AzureAI.AzureAIAgent.InvokeStreamingAsync(ICollection`1 messages, AgentThread thread, AzureAIAgentInvokeOptions options, CancellationToken cancellationToken)+MoveNext()
   at Microsoft.SemanticKernel.Agents.AzureAI.AzureAIAgent.InvokeStreamingAsync(ICollection`1 messages, AgentThread thread, AzureAIAgentInvokeOptions options, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()

Expected behavior

Error should be handled within the library and throw a meaning full error.

Actual behavior

Null reference error thrown

Reproduction Steps

we are running Azure AI Agents using Semantic Kernel .NET.
This error popped up once and couldn't repro consistently.

Environment

No response

Metadata

Metadata

Assignees

Labels

AI AgentsClientThis issue is related to a non-management packageService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions