Insight Discovery tool scan fails with "Error loading AssetHistory"
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Insight Discovery tool is unable to perform scanning with errors below in the log.
9/23/2021 9:06:29 AM : Error loading AssetHistory.
9/23/2021 9:06:29 AM : Exceptions:
9/23/2021 9:06:29 AM : Attempting to deserialize an empty stream.
at Insight.Discovery.Tools.ObjectSerializer.DeserializeObject[T](String file, SerializeType sType) in C:\SourceCode\discovery_repo\DiscoTools\ObjectSerializer.cs:line 125
at Insight.Discovery.InfoClasses.AssetHistoryList.Load(String appPath) in C:\SourceCode\discovery_repo\InfoClasses\AssetHistoryList.cs:line 415
...
9/23/2021 9:06:38 AM : Error adding item to history list.
9/23/2021 9:06:38 AM : Exceptions:
9/23/2021 9:06:38 AM : Object reference not set to an instance of an object.
at Insight.Discovery.InfoClasses.AssetHistoryList.Add(AssetHistoryDto item) in C:\SourceCode\discovery_repo\InfoClasses\AssetHistoryList.cs:line 90
Diagnosis
Environment
All versions of the Insight Discovery tool
Cause
The cause of why AssetHistory can't be loaded/added with new items is unknown
Workaround
Stop the Discovery service.
- Remove the AssetHistory.dat file from the Discovery folder.
- Start the Discovery service again and launch a scan that failed previously or wait for the next scheduled scan.