UnknownError: An unknown server-side error occurred while processing the command. Original error: Failed to locate opened application window with appId:

Hi,

The application works fine with pre-installed Windows desktop apps (I’ve tried with Notepad), but fails when I’m trying to automate the CCleaner desktop app installation process. The installer for CCleaner opens for multiply times, but then the Appium server throws 500 error with text " Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Failed to locate opened application window with appId: C:\Users\XXX\Documents\devsetup\projectsSourceCode\ccleaner\target\1e6407d5-880d-4df3-aaa7-ded5f19786c1\ccsetup612.exe, and processId: 26644"

Appium logs

code

It looks like that unpacking data before installing somehow triggers the Appium server in a negative way.

Could you help me out with such issue?

do you want to test the installer or the app itself? If the app then consider having it preinstalled before initializing the session. You could either use prerun capability to run the installer in unattended mode or do it in your test framework.

Actually, I want to test the installer itself. Any suggestions for such case?

Found a way to resolve the issue by adding such code
PowerShellData powerShellData = new PowerShellData();
powerShellData.withScript(“Start-Process -FilePath " + getAppData(“pathToFile”) + " -NoNewWindow;”);
options.setPrerun(powerShellData);

Not sure that it’s a correct way to fix the issue, but at least it works.