Disclaimer: I understand that stackoverflow is development oriented and this might be more a server question, but I think that many developers use CI and this is the right place to reach these developers.
I am using macOS Server
app to run a continuous integration.
Since a recent update, which allows you to run tests as a different user, the server is often unable to sign in as the testing user to run the tests.
Expected behaviour would be, that by clicking Switch user
button, it would sign in and start running Xcode bots. What happens is that it makes me sign in as the user, but it stays disconnected.
Restarting the machine doesn't solve the issue.
Please see the image for clarification.
I am going to answer my own question as I spend quite a few time trying to solve it.
The only resolution that I found and works every-time is to setup the Xcode app again.
Choose Xcode..
and select xcode app that you want to use to run the buildsHope this will help somebody!