Scan Failed - "There Was A Problem With Initializing The Patch Scanner" - Bad Custom Patch XML

Version 2

    Purpose

     

    The purpose of this article is to troubleshoot when a scan failures specific to this error:

     

    There was a problem initializing the patch scanner. To fix this problem, go to Help > Refresh Files on the main program menu" and performing the Help > Refresh Files does not resolve the issue.

     

    Symptoms

     

    1) Once the scan fails at Step 3: Resolve machines to scan and you click on View Errors in the Operations Monitor, you see the following:

    refreshfiles1.png

     

    2) In the Protect.Managed log, you will see the following:


    WorkItemScanPatch.cs:307|System.Runtime.InteropServices.COMException (0x80004005): class STCore::CInvalidOperationException at Crypto.cpp:562: Invalid data format

      at ST.STPatchAssessmentSrv.Interop.PatchAssessmentClass.Initialize(InvokableEngineInitialize& initializationParameters)

      at ST.UI.Controllers.Scans.PatchAssessmentController..ctor(Tuple`2 traceParameters, IXPathNavigable scanInstructions)

      at ST.UI.Controllers.Tasks.WorkItemScanPatch.<InitializeScanAndStartAsync>d__1a.MoveNext()

    WorkItemScanPatch.cs:276|InitializeScanAndStartAsync|Leaving.

    WorkItemScanPatch.cs:92|RunAsync|Leaving.

    OperationPresenter.cs:273|Completed ST.UI.Controllers.Scheduling.PatchScan operation: ray

    PatchScanTaskView.cs:309|Scan id -1: There was a problem with initializing the patch scanner.

    PatchScanTaskView.cs:309|Scan id -1: To fix this problem, go to Help->Refresh Files on the main program menu.


    In the hf.'username'@'consolemachine'.log:


    CustomPatchFile.cpp:563 Failed to load custom xml file with error 'class STXml::CXmlException at XmlReader.h:492: Possible null character in stream'. Attempting legacy load.

     

    3) Going to Help > Refresh Files does not resolve the issue.

     

    Cause

     

    There is an issue with the Custom Patch XML that is being imported into the database.

     

    Resolution

     

    You can disable the bad Custom Patch information in two ways: through the Shavlik Protect GUI or manually through Data Files reconfiguration.


    To do this through the GUI:

     

    1) Open Shavlik Protect and select Manage > Custom Patches.

    badxml.png

    2) Uncheck the custom patches you are importing and select OK.

    badxml2.png

    3) Retry scanning

     

    To do this the manual way, you will need to delete these 2 things in the C:\ProgramData\LANDESK\Shavlik Protect\Console folder:

     

    1) ST.CustomPatch.config

    2) The custom XML files


    NOTE: If you do need these Custom Patches, you will have to recreate them in Tools > Custom Patch Editor after doing this step.

    badxml3.png

    3) Retry scanning

     

    Additional Information

     

    If you do need the Custom Patches, it is recommended you make a copy of them and place them in a different directory before deleting them. This will help the work effort when you recreate them in Custom Patch Editor.

     

    Affected Product(s)


    Protect 9.x