Azure / azure-cosmos-dotnet-v3

.NET SDK for Azure Cosmos DB for the core SQL API
MIT License
741 stars 494 forks source link

CosmosDiagnostics throws ArgumentNullException #2207

Closed LiDamon closed 3 years ago

LiDamon commented 3 years ago

System.ArgumentNullException: Value cannot be null. Parameter name: diagnostics at Microsoft.Azure.Cosmos.ResponseMessage..ctor(HttpStatusCode statusCode, RequestMessage requestMessage, Headers headers, CosmosException cosmosException, CosmosDiagnosticsContext diagnostics) at Microsoft.Azure.Cosmos.QueryResponse.CreateSuccess(IReadOnlyList1 result, Int32 count, Int64 responseLengthBytes, CosmosQueryResponseMessageHeaders responseHeaders, CosmosDiagnosticsContext diagnostics, CosmosSerializationFormatOptions serializationOptions) at Microsoft.Azure.Cosmos.Query.QueryIterator.<ReadNextAsync>d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Storage.CosmosDB.CosmosIndexDocService.<>c__DisplayClass29_01.<b0>d.MoveNext() in C:\GitLab-Runner\builds\sJLCEyTR\3\cloud\insights\src\Infrastructure\Storages\Storage.CosmosDB\CosmosIndexDocService.cs:line 735 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait(TimeSpan timeout) at Storage.CosmosDB.CosmosIndexDocService.Query[T](FilterDefinition filter, SortDefinition sort, Int32 size, String token) in C:\GitLab-Runner\builds\sJLCEyTR\3\cloud\insights\src\Infrastructure\Storages\Storage.CosmosDB\CosmosIndexDocService.cs:line 735 ---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null. Parameter name: diagnostics at Microsoft.Azure.Cosmos.ResponseMessage..ctor(HttpStatusCode statusCode, RequestMessage requestMessage, Headers headers, CosmosException cosmosException, CosmosDiagnosticsContext diagnostics) at Microsoft.Azure.Cosmos.QueryResponse.CreateSuccess(IReadOnlyList`1 result, Int32 count, Int64 responseLengthBytes, CosmosQueryResponseMessageHeaders responseHeaders, CosmosDiagnosticsContext diagnostics, CosmosSerializationFormatOptions serializationOptions) at Microsoft.Azure.Cosmos.Query.QueryIterator.d12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

Environment summary SDK Version:3.16.0 OS Version Windows .NET Version:4.7.2

timsander1 commented 3 years ago

@bchong95 , could you take a look?

bchong95 commented 3 years ago

This code path does not exist anymore in master. Please see if it still reproduces in 3.17.

timsander1 commented 3 years ago

3.17 has not been released yet (release coming soon), so I'll make a note to check back in a few days

j82w commented 3 years ago

Closing this since 3.17 is now released.