question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.AggregateException

See original GitHub issue

We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.

Describe the bug I described the bug in a blog post: A strange bug in Azure Cosmos DB SQL API account (SDK Version 3 Preview)

To Reproduce Steps to reproduce the behavior. If you can include code snippets or links to repositories containing a repro of the issue that can help us in detecting the scenario it would speed up the resolution.

Expected behavior A clear and concise description of what you expected to happen.

Actual behavior Error: System.AggregateException: One or more errors occurred. (Exception has been thrown by the target of an invocation.) —> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.FormatException: Input string was not in a correct format. at System.Number.ThrowOverflowOrFormatException(Boolean overflow, String overflowResourceKey) at System.Double.Parse(String s) at Microsoft.Azure.Cosmos.CosmosResponseMessageHeaders.set__requestCharge(String value) — End of inner exception stack trace — at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index) at Microsoft.Azure.Cosmos.CosmosResponseMessageHeaders.<>c__DisplayClass43_0.b__3(String value) at Microsoft.Azure.Cosmos.CosmosCustomHeader.Set(String value) at Microsoft.Azure.Cosmos.CosmosMessageHeadersInternal.Add(String headerName, String value) at Microsoft.Azure.Cosmos.CosmosMessageHeadersBase.Add(String headerName, String value) at Microsoft.Azure.Cosmos.Extensions.ToCosmosResponseMessage(DocumentServiceResponse response, CosmosRequestMessage requestMessage) at Microsoft.Azure.Cosmos.Handlers.TransportHandler.SendAsync(CosmosRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.Handlers.AbstractRetryHandler.ExecuteHttpRequestAsync(Func1 callbackMethod, Func3 callShouldRetry, Func3 callShouldRetryException, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.Handlers.AbstractRetryHandler.SendAsync(CosmosRequestMessage request, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.Azure.Cosmos.ExecUtils.<>c__DisplayClass3_01.b__0(Task1 task) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at CosmosGettingStartedDotnetCoreTutorial.Program.ReplaceFamilyItem() in D:\CosmosGettingStartedDotnetCoreTutorial\CosmosGettingStartedDotnetCoreTutorial\Program.cs:line 210 at CosmosGettingStartedDotnetCoreTutorial.Program.GetStartedDemoAsync() in D:\CosmosGettingStartedDotnetCoreTutorial\CosmosGettingStartedDotnetCoreTutorial\Program.cs:line 75 at CosmosGettingStartedDotnetCoreTutorial.Program.Main(String[] args) in D:\CosmosGettingStartedDotnetCoreTutorial\CosmosGettingStartedDotnetCoreTutorial\Program.cs:line 30 ---> (Inner Exception #0) System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Input string was not in a correct format. at System.Number.ThrowOverflowOrFormatException(Boolean overflow, String overflowResourceKey) at System.Double.Parse(String s) at Microsoft.Azure.Cosmos.CosmosResponseMessageHeaders.set__requestCharge(String value) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index) at Microsoft.Azure.Cosmos.CosmosResponseMessageHeaders.<>c__DisplayClass43_0.b__3(String value) at Microsoft.Azure.Cosmos.CosmosCustomHeader.Set(String value) at Microsoft.Azure.Cosmos.CosmosMessageHeadersInternal.Add(String headerName, String value) at Microsoft.Azure.Cosmos.CosmosMessageHeadersBase.Add(String headerName, String value) at Microsoft.Azure.Cosmos.Extensions.ToCosmosResponseMessage(DocumentServiceResponse response, CosmosRequestMessage requestMessage) at Microsoft.Azure.Cosmos.Handlers.TransportHandler.SendAsync(CosmosRequestMessage request, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.Handlers.AbstractRetryHandler.ExecuteHttpRequestAsync(Func1 callbackMethod, Func3 callShouldRetry, Func3 callShouldRetryException, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.Handlers.AbstractRetryHandler.SendAsync(CosmosRequestMessage request, CancellationToken cancellationToken)<—

End of demo, press any key to exit

Environment summary SDK Version: 3.0.0.1-preview OS Version (e.g. Windows, Linux, MacOSX): Windows 10 Version 809

Additional context Add any other context about the problem here (for example, complete stack traces or logs).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:37 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
Ozziancommented, Jun 4, 2019

I just ran into this one my self. Very hard to debug. Exists on both versions 3.0.0.9 and .10

Workaround: Setting culture info before calling FetchNextSetAsync() seems to work.

System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo("en-gb");

Should I create a new bug about this?

2reactions
kirankumarkollicommented, Apr 3, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

AggregateException Class (System)
AggregateException is used to consolidate multiple failures into a single, throwable exception object. It is used extensively in the Task Parallel Library (TPL) ......
Read more >
c# - How to fix "'System.AggregateException' occurred in ...
As the message says, you have a task which threw an unhandled exception. Turn on Break on All Exceptions (Debug, Exceptions) and rerun...
Read more >
Exception thrown: 'System.AggregateException' in System ...
It is a very generic exception that just means "more than one exceptions happened"; without any messages / stack trace / inner exceptions...
Read more >
Getting System.AggregateException - Help
AggregateException error. Source: Typing into the search box. Message: One or more errors occurred. Exception Type: System.AggregateException.
Read more >
Debugging System.AggregateException - even in async code
As the name implies, AggregateException is used to batch one or more exceptions together in a single exception. In this post, I'll show...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found