Hello, I also get this issue, but in my CI/CD pipeline on GitHub Actions.
I'm testing this locally with fastlane and it works fine, but when I run the tests in the server, I receive the same error as some has mentioned above.
Failed to get automation session for com.***.mobile.ios.xx.***:19096: Timed out while requesting automation session for com.***.mobile.ios.***.xx (pid:19096).
I've tried:
Running on different simulators, iPhone 11, iPhone 8 etc.
prelaunch_simulator <-- ended in a a loop
I found this in the log
SimDevice: iPhone 8 (D24B8183-F18A-4A00-87FD-8B49D06619A6, iOS 14.4, Shutdown)
Does it mean that it's not launching the simulator?
EDIT: Had a clean build on the project. This solved my issue!