michielpost / Q42.HueApi

C# helper library to talk to the Philips Hue bridge
MIT License
411 stars 114 forks source link

NullReferenceException occurred (v 3.4.1 new properties for Bridge) #112

Closed Rep-Hueman closed 7 years ago

Rep-Hueman commented 7 years ago

line 40: _conv = await _client.GetBridgeAsync();

System.NullReferenceException occurred HResult=0x80004003 Message=Object reference not set to an instance of an object. Source= StackTrace: at Q42.HueApi.HueClient.DeserializeResult[T](String json) at Q42.HueApi.HueClient.d3.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at HueMan.Views.Configuratie.d5.MoveNext() in C:\Data\Projecten\HueMan\HueMan\Views\Configuratie.xaml.cs:line 40

michielpost commented 7 years ago

Can you supply the incoming json?

Rep-Hueman commented 7 years ago

incomming-json.txt

Rep-Hueman commented 7 years ago

can you see the problem?

old: [DataMember(Name = "internetservices")] public string InternetServices { get; set; }

new: [DataMember(Name = "internetservices")] public InternetServices InternetServices { get; set; }

extra file: Internetservices.cs.txt

michielpost commented 7 years ago

Thanks, fixed in version 3.4.2, now on NuGet