Solution
The cause of this error can be a difference in the LabVIEW Run-Time (RTE) versions used by the IO Configuration step and the VI Call step.
Check the LabVIEW adapter settings Configure>>Adapters…>>LabVIEW Adapter Configurations

if Auto detect using VI version is selected, then TestStand uses a specific LabVIEW runtime version.
The default behavior for the IO configuration steps is:
TestStand 2020 uses LabVIEW RTE 2019 for the IO Configuration steps
TestStand 2021 uses LabVIEW RTE 2020 for the IO Configuration steps
For example, if you have LabVIEW 2021 and Teststand 2021 this would mean that the IO Configuration Step uses LabVIEW RTE 2020 while the VI Call Step uses LabVIEW RTE 2021. Therefore, the session handle is invalid.
To mitigate the issue, there are two options:
- If you want to change the default version for the IO Configuration steps, you must change the value for key 'DEFAULT_LV_RTE_VERSION_FOR_IPXI_VI' in IOConfigurationsStrings.ini file to the desired value e.g., '2021'.
- You can change the adapter setting to use only a specific version of the LabVIEW RTE compatible with your VIs. For example, setting it to only use LabVIEW 21.0.