We have found out during tests that an error occurs in debug mode when trying to repeatedly access the same excel file.
This started to happen after old pc’s were replaced with new, faster ones. The tests are run one by one and they all access the same file.
It seems that excel is being accessed, closed and when another tests starts and wants to access the same file, excel file is not yet properly closed giving an error.
The error is hard to reproduce as it happens only from time to time. Excel process scope is used so excel closes automatically and as far as I know there is no modern activities which can close excel file.
I know that this is given as a solution to one of the patterns but should we simply mix the modern and classic activites? I know that there is no limitation to this so we can flexibely use either but it does not seems like a best practice to me.
Studio version: 2022.10.5
Excel activities version: 2.16.2
There are two patterns for this error:
21:11:53.4234 => [ERROR] [UiPath.Studio.App.Logging.OutputLogger]  Setting Excel Process Scope: Access is denied.
21:11:53.4375 => [ERROR] [UiPath.Studio.App.Logging.OutputLogger]  Read configuration: Access is denied.
After retry(debug action) everything works as normal and tests progresses and finished.
22:00:34.9238 => [ERROR] [UiPath.Studio.App.Logging.OutputLogger]  Excel process scope: Launched object disconnected from client. (0x80010108 (RPC_E_DISCONNECTED))
If you use retry on this, the next erro will occur:
22:02:27.3255 => [ERROR] [UiPath.Studio.App.Logging.OutputLogger]  範囲を読み込み: COM object that has been separated from its underlying RCW cannot be used.
After this error appears, Studio cannot be restored to normal state and we need to restart the tests.