Upgrading Sitecore Experience Accelerator (SXA) from 9.3 to 10.2 version might fail when having both Sitecore JavaScript Services (JSS) and SXA sites and settings in the Content Tree. The issue occurs while updating the existing content after the new SXA package has been installed.
When you click the Upgrade link, the PowerShell Script Results dialog displays all the upgrade steps for your installation. An upgrade of the Fix Jss Sites Dictionary:
Upgrade step result: Error (without details)and the following message in the console:
WhatIf: Performing the operation "Import functions" on target "master:\system\Modules\PowerShell\Script Library\SXA\SXA - Scaffolding\Functions\Cmdlets\Get-UniqueItem".
ERROR Error while performing timed 'script execution in ScriptSession '$scriptSession$|pz2lzmowpkjrwsrjums5xktp|21b7d3c8-32d8-4f8e-9c4a-724c08ed44fe'' operation within 2273 ms. Exception logged at operation origin point.
ERROR Error while executing PowerShell script.
Exception: System.Management.Automation.RuntimeException
Message: Upgrade step 'Fix Jss Sites Dictionary' returns incorrect result of type [System.Object[]]. But should be [Sitecore.XA.Foundation.Upgrade.Model.UpgradeStepResult]
Source: System.Management.Automation
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Spe.Core.Host.ScriptSession.ExecuteCommand(Boolean stringOutput, Boolean marshallResults)
...
To resolve the issue, download and install the corresponding cumulative hotfix available in KB1001328.