Routing the source using the RunRouteAction method will attempt to start the device usage tracker, causing the null reference exception.
Additional context
Added a null reference check on the UsageTracker to RunRouteAction to prevent the exception:
// Start usage timer on routed source
if (sourceListItem.SourceDevice is IUsageTracking && (sourceListItem.SourceDevice as IUsageTracking).UsageTracker != null)
{
(sourceListItem.SourceDevice as IUsageTracking).UsageTracker.StartDeviceUsage();
}
Was this bug identified in a specific build version? Essentials 1.16.0-rc-2374
Describe the bug Attempting to invoke
UsageTracker.StartDeviceUsage()
on a source with"type": "laptop"
will cause a null exception.Stacktrace
Include a stack trace of the exception if possible.
To Reproduce Steps to reproduce the behavior:
RunRouteAction
method will attempt to start the device usage tracker, causing the null reference exception.Additional context Added a null reference check on the
UsageTracker
toRunRouteAction
to prevent the exception: