Assets Discovery tool scan fails with "Error loading AssetHistory"

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

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

Problem

Assets 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 Assets Discovery tool

Cause

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

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.
Last modified on Jan 20, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.