'Timed out waiting for result of ClearAppData2

I'm new to UI Tests for Xamarin. I thought it will work out of the box. It doesn't.

If I run the test on my external device via USB. Everything works just fine.

If I run any test using emulator (adb) I get an error: "System.Exception : Timed out waiting for result of ClearAppData2"

If I go to logs, I can see that adb is denied an access to some files.

Ok. I used "adb root".

Now it is showing this

10-04-2022 21:16:55.863 -04:00 - 45356 - AdbArguments: '-s emulator-5554 shell ls "/data/data/com.company.product.test/files/calabash_finished.out"'.
10-04-2022 21:16:55.901 -04:00 - 45393 - Finished with exit code 1 in 37 ms.
ls: /data/data/com.company.product.test/files/calabash_finished.out: No such file or directory

The log shows this message for several files.

Why every time I deal with "outOfTheBox" Microsoft solutions they do not work? Or maybe it's Visual Studio 2022 problem?

I tried to reinstall everything to no avail.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source