Assets Discovery tool scan fails with "Error loading AssetHistory"

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Summary

Problem

Assets Discovery tool is unable to perform scanning with errors below in the log.

1 2 3 4 5 6 7 8 9 10 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 Assets Discovery tool

Cause

The cause of why AssetHistory can't be loaded/added with new items is unknown

Solution

Workaround

  1. Stop the Discovery service.

  2. Remove the AssetHistory.dat file from the Discovery folder.

  3. Start the Discovery service again and launch a scan that failed previously or wait for the next scheduled scan.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.