Xcode Cloud fails to install/launch macOS test runner

When running a SwiftUI Multiplatform app in Xcode Cloud I'm getting the following error:

CIWatcher encountered an error in CIWatcherTests failed with: Failed to install or launch the test runner. (Underlying Error: Could not launch “CIWatcherTests”. Runningboard has returned error 5. Please check the system logs for the underlying cause of the error. (Underlying Error: The operation couldn’t be completed. Launch failed. (Underlying Error: Launchd job spawn failed)))

This runs fine on iOS and all those tests pass.

The SwiftUI app on Mac is a menu bar app so I'm not sure if this could be the issue as it's not launching for some reason on the Xcode Cloud system? Maybe I need to add some run option to make this work?

When run locally both iOS and macOS pass all the tests successfully

Xcode Cloud fails to install/launch macOS test runner
 
 
Q