UI tests ran on simulator hang after a couple of minutes on M1 Mac

Hi there! I have a problem running UI tests on simulator, while using M1 Mac. After running for a couple of minutes, usually 3 minutes is enough, tests begin to fail every ±60s on

XCUIApplication().launch() 

with

Failed to terminate com.***.***:10552: Failed to terminate com.***.***:0 

At this point, my simulator window does not even react to any manual input. That issue have been happening since Xcode 13. Unit tests are running completely fine though. Also, that issue does not appear on an Intel-based Mac.

Sadly, I haven't found any information on that issue, however, there are some posts on SO mentioning the same issue, and only one of those posts has an answer, but it mentions unchecking 'Open using Rosetta' option for Xcode, which is not possible anymore.

I would appreciate any advice, as I feel like I have tried everything already :(

Post not yet marked as solved Up vote post of p_sedra Down vote post of p_sedra
534 views