Skip to content

Encountered NullReferenceException in DeltaResponseHandler.GetObjectProperties() #93

@andtu

Description

@andtu

It appears DeltaResponseHandler has an issue casting one of the objects in the response as an JObject, causing that one object to be null. This resulted in a NullReferenceException. We suspect it to be related to the manager@delta complex object attribute in User DQ.

Expected behavior

DeltaResponseHandler returns changelist without error.

Actual behavior

Received stack trace after calling GetAsync() on a DQ nextPageRequest using DeltaResponseHandler:

Caught exception System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Graph.DeltaResponseHandler.<GetObjectProperties>d__6.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 Microsoft.Graph.DeltaResponseHandler.<GetObjectProperties>d__6.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 Microsoft.Graph.DeltaResponseHandler.<DiscoverChangedProperties>d__5.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 Microsoft.Graph.DeltaResponseHandler.<GetResponseBodyWithChangelist>d__4.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 Microsoft.Graph.DeltaResponseHandler.<HandleResponse>d__2`1.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 Microsoft.Graph.BaseRequest.<SendAsync>d__34`1.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 Microsoft.Graph.UserDeltaRequest.<GetAsync>d__2.MoveNext()

Steps to reproduce the behavior

We weren't able to log the response's requestId due to the exception, but we queried the deltalink that kept running into this issue for 2 hours separately to see the response body.

requestId: c1fe4e9c-f59b-4e6f-b3cb-c3b6eda4de7e
timestamp: 28 Feb 2020 23:45:43 UTC
Can provide response body internally.

GraphSDK: 1.20
GraphSDK.Core: 1.21

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions