Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

xcode - Test target `MyAppTests` encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)

Problem arise with continuous integration when try to run bot on device.

Test target MyAppTests encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)

Do you know why it happens? Any ideas?

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The following worked for me.
I don't know if some of the steps can be skipped, so I'm posting all of it.

  1. Update CocoaPods to version min. 1.1.0 on both dev machine and server sudo gem update cocoapods.
  2. As per terminal output during CocoaPods set Always Embed Swift Standard Libraries to No in the projects settings. I did it for the main, test and UI test targets.
  3. Upgrade OS X Server to latest version (see more below).
  4. Upgrade Xcode to latest version both on dev machine and server.
  5. Select Xcode through server app again.
  6. Create and log in as the test user Xcode required for UI tests. (trouble shooting below)
  7. Open Xcode on the server and install missing components (it will ask on launch).
  8. Reboot server.

My integrations did an upgrade afterwards and the errors you mentioned were gone.

I should mention that on my bots I have a pre-Integration Script that re-installs all of my CocoaPods on server. I also clean solution before each build.


Upgrade OS X to latest version.
You might get away with upgrading to your minimum target OS version of your app. This might be the reason for your UI test failures. I traced my logs and found the output folder for the Bot. The app was not launch-able as the target OS version was greater than the server itself.


Troubleshooting Xcode Server user is "disconnected".
I had an issue where the user was "Disconnected" and the Xcode service on the user session was hanging on "Refreshing".
enter image description here
enter image description here

I had to re-select Xcode in the server app and create a new Xcode Server user for unit testing. The problem went away immediately after that. If someone knows how to fix the existing user, please let me know.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...