datalust / seq-api

HTTP API client for Seq
https://datalust.co/seq
Apache License 2.0
78 stars 21 forks source link

System.ArgumentNullException Deserializing AppInstanceEntity #3

Closed bbrandt closed 8 years ago

bbrandt commented 8 years ago

I am getting an exception running this code:

            _connection = new SeqConnection("http://fc2026:5341");
            _appInstances = _connection.AppInstances;
            var apps = await _appInstances.ListAsync();

I am able to produce the exception in my VS2013 debugger and have stepped into the Seq.Api assembly method HttpGetAsync<>(string), but am not really sure how to proceed from here.

The Exception:

System.ArgumentNullException occurred
  _HResult=-2147467261
  _message=Value cannot be null.
  HResult=-2147467261
  IsTransient=false
  Message=Value cannot be null.
Parameter name: initialValue
  Source=Newtonsoft.Json
  ParamName=initialValue
  StackTrace:
       at Newtonsoft.Json.Utilities.ConvertUtils.TryConvertInternal(Object initialValue, CultureInfo culture, Type targetType, Object& value)
  InnerException: 

Debugger callstack:

    Newtonsoft.Json.dll!Newtonsoft.Json.Utilities.ConvertUtils.TryConvertInternal(object initialValue, System.Globalization.CultureInfo culture, System.Type targetType, out object value)  Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Utilities.ConvertUtils.TryConvert(object initialValue, System.Globalization.CultureInfo culture, System.Type targetType, out object value)  Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(object initialValue, System.Globalization.CultureInfo culture, System.Type targetType) Unknown
>   Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(Newtonsoft.Json.JsonReader reader, object value, System.Globalization.CultureInfo culture, Newtonsoft.Json.Serialization.JsonContract contract, System.Type targetType)   Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, object existingValue)  Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, object target)    Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, string id) Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, object existingValue) Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, object existingValue)  Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(System.Collections.IList list, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, string id)    Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, object existingValue, string id)   Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, object existingValue)  Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(Newtonsoft.Json.JsonReader reader, System.Type objectType, bool checkAdditionalContent)  Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.JsonSerializer.DeserializeInternal(Newtonsoft.Json.JsonReader reader, System.Type objectType)   Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.JsonSerializer.Deserialize(Newtonsoft.Json.JsonReader reader, System.Type objectType)   Unknown
    Newtonsoft.Json.dll!Newtonsoft.Json.JsonSerializer.Deserialize<System.Collections.Generic.List<Seq.Api.Model.AppInstances.AppInstanceEntity>>(Newtonsoft.Json.JsonReader reader)    Unknown
    Seq.Api.dll!Seq.Api.Client.SeqApiClient.HttpGetAsync<System.Collections.Generic.List<Seq.Api.Model.AppInstances.AppInstanceEntity>>(string url) Line 112    C#
    [Resuming Async Method] 
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()    Unknown
    mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining, ref System.Threading.Tasks.Task currentTask)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations()  Unknown
    mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)    Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.IO.Stream>.SetResult(System.IO.Stream result)    Unknown
    Seq.Api.dll!Seq.Api.Client.SeqApiClient.HttpSendAsync(System.Net.Http.HttpRequestMessage request) Line 139  C#
    [Resuming Async Method] 
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()    Unknown
    mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining, ref System.Threading.Tasks.Task currentTask)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations()  Unknown
    mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)    Unknown
    mscorlib.dll!System.Threading.Tasks.TaskCompletionSource<System.__Canon>.TrySetResult(System.__Canon result)    Unknown
    System.Net.Http.dll!System.Net.Http.HttpClient.SetTaskCompleted(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cancellationTokenSource, System.Threading.Tasks.TaskCompletionSource<System.Net.Http.HttpResponseMessage> tcs, System.Net.Http.HttpResponseMessage response)   Unknown
    System.Net.Http.dll!System.Net.Http.HttpClient.StartContentBuffering.AnonymousMethod__14(System.Threading.Tasks.Task contentTask)   Unknown
    mscorlib.dll!System.Threading.Tasks.Task.Execute()  Unknown
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution) Unknown
    mscorlib.dll!System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued)    Unknown
    mscorlib.dll!System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued)  Unknown
    mscorlib.dll!System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(System.Threading.Tasks.Task task, bool needsProtection)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations()  Unknown
    mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)    Unknown
    mscorlib.dll!System.Threading.Tasks.TaskCompletionSource<System.__Canon>.TrySetResult(System.__Canon result)    Unknown
    System.Net.Http.dll!System.Net.Http.HttpContent.LoadIntoBufferAsync.AnonymousMethod__9(System.Threading.Tasks.Task copyTask)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task.Execute()  Unknown
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution) Unknown
    mscorlib.dll!System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued)    Unknown
    mscorlib.dll!System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued)  Unknown
    mscorlib.dll!System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(System.Threading.Tasks.Task task, bool needsProtection)    Unknown
    mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations()  Unknown
    mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)    Unknown
    mscorlib.dll!System.Threading.Tasks.TaskCompletionSource<System.__Canon>.TrySetResult(System.__Canon result)    Unknown
    System.Net.Http.dll!System.Net.Http.StreamToStreamCopy.SetCompleted(System.Exception error) Unknown
    System.Net.Http.dll!System.Net.Http.StreamToStreamCopy.StartRead()  Unknown
    System.Net.Http.dll!System.Net.Http.StreamToStreamCopy.BufferReadCallback(System.IAsyncResult ar)   Unknown
    System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Unknown
    System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken)   Unknown
    System.dll!System.Net.LazyAsyncResult.InvokeCallback(object result) Unknown
    System.dll!System.Net.ChunkParser.CompleteUserRead(object result)   Unknown
    System.dll!System.Net.ChunkParser.CompletePayloadReadOperation(int bytesRead)   Unknown
    System.dll!System.Net.ChunkParser.HandlePayload()   Unknown
    System.dll!System.Net.ChunkParser.ProcessResponse() Unknown
    System.dll!System.Net.ChunkParser.ReadCallback(System.IAsyncResult ar)  Unknown
    System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Unknown
    System.dll!System.Net.ContextAwareResult.CompleteCallback(object state) Unknown
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
    System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken)  Unknown
    System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken)   Unknown
    System.dll!System.Net.LazyAsyncResult.InvokeCallback(object result) Unknown
    System.dll!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped)  Unknown
    mscorlib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP) Unknown
    [Native to Managed Transition]  
    [Async Call]    
    Seq.Api.dll!Seq.Api.ResourceGroups.ApiResourceGroup.GroupListAsync<Seq.Api.Model.AppInstances.AppInstanceEntity>(string link, System.Collections.Generic.IDictionary<string,object> parameters) Line 37 C#
    [Async Call]    
    Seq.Api.dll!Seq.Api.ResourceGroups.AppInstancesResourceGroup.ListAsync() Line 23    C#
    [Async Call]    
    FlowCal.LogsModule.Tests.dll!FlowCal.LogsModule.Tests.DataRepository.SeqNotificationRepositoryImplementationTests.ClearAllAmpAppInstances() C#
bbrandt commented 8 years ago

Here's the content of the stream coming back from Seq:

"[{\"Title\":\"Test Timeout\",\"IsManualInputOnly\":true,\"AppId\":\"hostedapp-2\",\"Settings\":{\"Timeout\":\"360\",\"Repeat\":\"False\",\"Name\":\"Test\"},\"ArrivalWindow\":\"00:00:30\",\"SignalIds\":[],\"Id\":\"appinstance-10\",\"Links\":{\"Self\":\"api/appinstances/appinstance-10\",\"Group\":\"api/appinstances/resources\",\"Invoke\":\"api/appinstances/appinstance-10/invoke{?eventId}\"}},{\"Title\":\"Test Threshold\",\"IsManualInputOnly\":true,\"AppId\":\"hostedapp-6\",\"Settings\":{\"WindowSeconds\":\"60\",\"EventsInWindowThreshold\":\"5\",\"SuppressionSeconds\":\"360\",\"ThresholdName\":\"Threshold Test\"},\"ArrivalWindow\":\"00:00:30\",\"SignalIds\":[],\"Id\":\"appinstance-12\",\"Links\":{\"Self\":\"api/appinstances/appinstance-12\",\"Group\":\"api/appinstances/resources\",\"Invoke\":\"api/appinstances/appinstance-12/invoke{?eventId}\"}},{\"Title\":\"Error Archive\",\"IsManualInputOnly\":false,\"AppId\":\"hostedapp-4\",\"Settings\":{\"PathFormat\":\"F:\\\\src\\\\logs\\\\error-{Date}.log\"},\"ArrivalWindow\":null,\"SignalIds\":[\"signal-65\"],\"Id\":\"appinstance-16\",\"Links\":{\"Self\":\"api/appinstances/appinstance-16\",\"Group\":\"api/appinstances/resources\",\"Invoke\":\"api/appinstances/appinstance-16/invoke{?eventId}\"}},{\"Title\":\"Warning Archive\",\"IsManualInputOnly\":false,\"AppId\":\"hostedapp-4\",\"Settings\":{\"PathFormat\":\"F:\\\\src\\\\logs\\\\warning-{Date}.log\"},\"ArrivalWindow\":null,\"SignalIds\":[\"signal-194\"],\"Id\":\"appinstance-196\",\"Links\":{\"Self\":\"api/appinstances/appinstance-196\",\"Group\":\"api/appinstances/resources\",\"Invoke\":\"api/appinstances/appinstance-196/invoke{?eventId}\"}},{\"Title\":\"Below Warning\",\"IsManualInputOnly\":false,\"AppId\":\"hostedapp-4\",\"Settings\":{\"PathFormat\":\"F:\\\\src\\\\logs\\\\below-warning-{Date}.log\"},\"ArrivalWindow\":null,\"SignalIds\":[\"signal-193\"],\"Id\":\"appinstance-198\",\"Links\":{\"Self\":\"api/appinstances/appinstance-198\",\"Group\":\"api/appinstances/resources\",\"Invoke\":\"api/appinstances/appinstance-198/invoke{?eventId}\"}},{\"Title\":\"New Errors\",\"IsManualInputOnly\":false,\"AppId\":\"hostedapp-199\",\"Settings\":{},\"ArrivalWindow\":null,\"SignalIds\":[\"signal-65\"],\"Id\":\"appinstance-201\",\"Links\":{\"Self\":\"api/appinstances/appinstance-201\",\"Group\":\"api/appinstances/resources\",\"Invoke\":\"api/appinstances/appinstance-201/invoke{?eventId}\"}},{\"Title\":\"Test Email\",\"IsManualInputOnly\":true,\"AppId\":\"hostedapp-3\",\"Settings\":{\"From\":\"ben.brandt@flowcal.com\",\"To\":\"ben.brandt@flowcal.com\",\"SubjectTemplate\":\"\",\"Host\":\"smtp.office365.com\",\"Port\":\"587\",\"EnableSsl\":\"True\",\"BodyTemplate\":\"\",\"Username\":\"ben.brandt@flowcal.com\",\"Password\":\"[seq-preserve]\"},\"ArrivalWindow\":\"00:00:30\",\"SignalIds\":[],\"Id\":\"appinstance-8\",\"Links\":{\"Self\":\"api/appinstances/appinstance-8\",\"Group\":\"api/appinstances/resources\",\"Invoke\":\"api/appinstances/appinstance-8/invoke{?eventId}\"}}]"

Beautified:

[
   {
      "Title":"Test Timeout",
      "IsManualInputOnly":true,
      "AppId":"hostedapp-2",
      "Settings":{
         "Timeout":"360",
         "Repeat":"False",
         "Name":"Test"
      },
      "ArrivalWindow":"00:00:30",
      "SignalIds":[

      ],
      "Id":"appinstance-10",
      "Links":{
         "Self":"api/appinstances/appinstance-10",
         "Group":"api/appinstances/resources",
         "Invoke":"api/appinstances/appinstance-10/invoke{?eventId}"
      }
   },
   {
      "Title":"Test Threshold",
      "IsManualInputOnly":true,
      "AppId":"hostedapp-6",
      "Settings":{
         "WindowSeconds":"60",
         "EventsInWindowThreshold":"5",
         "SuppressionSeconds":"360",
         "ThresholdName":"Threshold Test"
      },
      "ArrivalWindow":"00:00:30",
      "SignalIds":[

      ],
      "Id":"appinstance-12",
      "Links":{
         "Self":"api/appinstances/appinstance-12",
         "Group":"api/appinstances/resources",
         "Invoke":"api/appinstances/appinstance-12/invoke{?eventId}"
      }
   },
   {
      "Title":"Error Archive",
      "IsManualInputOnly":false,
      "AppId":"hostedapp-4",
      "Settings":{
         "PathFormat":"F:\\\\src\\\\logs\\\\error-{Date}.log"
      },
      "ArrivalWindow":null,
      "SignalIds":[
         "signal-65"
      ],
      "Id":"appinstance-16",
      "Links":{
         "Self":"api/appinstances/appinstance-16",
         "Group":"api/appinstances/resources",
         "Invoke":"api/appinstances/appinstance-16/invoke{?eventId}"
      }
   },
   {
      "Title":"Warning Archive",
      "IsManualInputOnly":false,
      "AppId":"hostedapp-4",
      "Settings":{
         "PathFormat":"F:\\\\src\\\\logs\\\\warning-{Date}.log"
      },
      "ArrivalWindow":null,
      "SignalIds":[
         "signal-194"
      ],
      "Id":"appinstance-196",
      "Links":{
         "Self":"api/appinstances/appinstance-196",
         "Group":"api/appinstances/resources",
         "Invoke":"api/appinstances/appinstance-196/invoke{?eventId}"
      }
   },
   {
      "Title":"Below Warning",
      "IsManualInputOnly":false,
      "AppId":"hostedapp-4",
      "Settings":{
         "PathFormat":"F:\\\\src\\\\logs\\\\below-warning-{Date}.log"
      },
      "ArrivalWindow":null,
      "SignalIds":[
         "signal-193"
      ],
      "Id":"appinstance-198",
      "Links":{
         "Self":"api/appinstances/appinstance-198",
         "Group":"api/appinstances/resources",
         "Invoke":"api/appinstances/appinstance-198/invoke{?eventId}"
      }
   },
   {
      "Title":"New Errors",
      "IsManualInputOnly":false,
      "AppId":"hostedapp-199",
      "Settings":{

      },
      "ArrivalWindow":null,
      "SignalIds":[
         "signal-65"
      ],
      "Id":"appinstance-201",
      "Links":{
         "Self":"api/appinstances/appinstance-201",
         "Group":"api/appinstances/resources",
         "Invoke":"api/appinstances/appinstance-201/invoke{?eventId}"
      }
   },
   {
      "Title":"Test Email",
      "IsManualInputOnly":true,
      "AppId":"hostedapp-3",
      "Settings":{
         "From":"ben.brandt@flowcal.com",
         "To":"ben.brandt@flowcal.com",
         "SubjectTemplate":"",
         "Host":"smtp.office365.com",
         "Port":"587",
         "EnableSsl":"True",
         "BodyTemplate":"",
         "Username":"ben.brandt@flowcal.com",
         "Password":"[seq-preserve]"
      },
      "ArrivalWindow":"00:00:30",
      "SignalIds":[

      ],
      "Id":"appinstance-8",
      "Links":{
         "Self":"api/appinstances/appinstance-8",
         "Group":"api/appinstances/resources",
         "Invoke":"api/appinstances/appinstance-8/invoke{?eventId}"
      }
   }
]
bbrandt commented 8 years ago

Not sure if the exception I was observing is expected or not by Seq.Api, so here's the actual failure being reported in my implementation test:

ImplementationTestSetUp : System.AggregateException : One or more errors occurred.
  ----> Newtonsoft.Json.JsonSerializationException : Error converting value {null} to type 'System.TimeSpan'. Path '[2].ArrivalWindow', line 1, position 908.
  ----> System.ArgumentException : Could not cast or convert from {null} to System.TimeSpan.
TearDown : System.AggregateException : One or more errors occurred.
  ----> Newtonsoft.Json.JsonSerializationException : Error converting value {null} to type 'System.TimeSpan'. Path '[2].ArrivalWindow', line 1, position 908.
  ----> System.ArgumentException : Could not cast or convert from {null} to System.TimeSpan.
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at FlowCal.LogsModule.Tests.DataRepository.SeqNotificationRepositoryImplementationTests.SetUp() in SeqNotificationRepositoryImplementationTests.cs: line 119
--JsonSerializationException
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader)
   at Seq.Api.Client.SeqApiClient.<HttpGetAsync>d__1f`1.MoveNext() in SeqApiClient.cs: line 112
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Seq.Api.ResourceGroups.ApiResourceGroup.<GroupListAsync>d__5`1.MoveNext() in ApiResourceGroup.cs: line 37
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Seq.Api.ResourceGroups.AppInstancesResourceGroup.<ListAsync>d__4.MoveNext() in AppInstancesResourceGroup.cs: line 23
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at FlowCal.LogsModule.Tests.DataRepository.SeqNotificationRepositoryImplementationTests.<ClearAllAmpAppInstances>d__18.MoveNext() in SeqNotificationRepositoryImplementationTests.cs: line 136
--ArgumentException
   at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
   at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
--TearDown
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at FlowCal.LogsModule.Tests.DataRepository.SeqNotificationRepositoryImplementationTests.TearDown() in SeqNotificationRepositoryImplementationTests.cs: line 126
--JsonSerializationException
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader)
   at Seq.Api.Client.SeqApiClient.<HttpGetAsync>d__1f`1.MoveNext() in SeqApiClient.cs: line 112
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Seq.Api.ResourceGroups.ApiResourceGroup.<GroupListAsync>d__5`1.MoveNext() in ApiResourceGroup.cs: line 37
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Seq.Api.ResourceGroups.AppInstancesResourceGroup.<ListAsync>d__4.MoveNext() in AppInstancesResourceGroup.cs: line 23
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at FlowCal.LogsModule.Tests.DataRepository.SeqNotificationRepositoryImplementationTests.<ClearAllAmpAppInstances>d__18.MoveNext() in SeqNotificationRepositoryImplementationTests.cs: line 136
--ArgumentException
   at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
   at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
nblumhardt commented 8 years ago

Thanks for the report Ben, I'll have a look.

bbrandt commented 8 years ago

Thanks for the quick resolution. This morning I was able to reproduce the issue with the old version, update Seq.Api to 2.1.32, and confirm that the issue has been resolved.