fastlane: Test target x encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
New Issue Checklist
- Updated fastlane to the latest version
- I have read the Contribution Guidelines
Issue Description
We have 3 separate build machines all which run the same code, I am getting this error on the newest mac we just got which has the same specs as another which the builds pass on. All running exact same fastfile etc. I assume something must be up with my build on the computer. All are running xcode 8.1.
Complete output when running fastlane, including the stack trace and command used
Executed 619 tests, with 0 failures (0 unexpected) in 22.376 (22.746) seconds
2016-11-10 09:54:04.256 xcodebuild[40376:613510] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
Testing failed:
Test target x encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **
Environment
Please run fastlane env
and copy the output below. This will help us help you 👍
If you used --capture_output
option please remove this block - as it is already included there.
| Gem | Version | Update-Status |
| ------------------- | ------- | ------------- |
| credentials_manager | 0.16.2 | âś… Up-To-Date |
| fastlane_core | 0.55.0 | âś… Up-To-Date |
| spaceship | 0.37.0 | âś… Up-To-Date |
| deliver | 1.15.0 | âś… Up-To-Date |
| snapshot | 1.16.3 | âś… Up-To-Date |
| frameit | 3.0.0 | âś… Up-To-Date |
| pem | 1.4.0 | âś… Up-To-Date |
| cert | 1.4.4 | âś… Up-To-Date |
| sigh | 1.11.2 | âś… Up-To-Date |
| produce | 1.3.0 | âś… Up-To-Date |
| gym | 1.12.0 | âś… Up-To-Date |
| pilot | 1.12.0 | âś… Up-To-Date |
| scan | 0.14.1 | âś… Up-To-Date |
| supply | 0.7.1 | âś… Up-To-Date |
| match | 0.11.0 | âś… Up-To-Date |
| fastlane | 1.108.0 | âś… Up-To-Date |
| screengrab | 0.5.5 | âś… Up-To-Date |
### Loaded fastlane plugins:
**No plugins Loaded**
<details><summary><b>Loaded gems</b></summary>
| Gem | Version |
| ------------------------- | ------------ |
| executable-hooks | 1.3.2 |
| bundler-unload | 1.0.2 |
| rubygems-bundler | 1.4.4 |
| bundler | 1.13.3 |
| highline | 1.7.8 |
| commander | 4.4.0 |
| terminal-table | 1.4.5 |
| multipart-post | 2.0.0 |
| faraday | 0.9.2 |
| faraday_middleware | 0.10.0 |
| dotenv | 2.1.1 |
| net-ssh | 3.2.0 |
| net-sftp | 2.1.2 |
| plist | 3.1.0 |
| rubyzip | 1.1.7 |
| security | 0.1.3 |
| krausefx-shenzhen | 0.14.11 |
| slack-notifier | 1.5.1 |
| rouge | 1.11.1 |
| xcpretty | 0.2.4 |
| addressable | 2.4.0 |
| claide | 1.0.1 |
| xcode-install | 2.0.7 |
| word_wrap | 1.0.0 |
| multi_json | 1.12.1 |
| colored | 1.2 |
| babosa | 1.0.2 |
| gh_inspector | 1.0.2 |
| credentials_manager | 0.16.2 |
| fastlane_core | 0.55.0 |
| multi_xml | 0.5.5 |
| unf_ext | 0.0.7.2 |
| unf | 0.1.4 |
| domain_name | 0.5.20160826 |
| http-cookie | 1.0.3 |
| faraday-cookie_jar | 0.0.6 |
| fastimage | 1.6.8 |
| mini_magick | 4.5.1 |
| xcpretty-travis-formatter | 0.0.4 |
| i18n | 0.7.0 |
| thread_safe | 0.3.5 |
| tzinfo | 1.2.2 |
| activesupport | 4.2.7.1 |
| json | 1.8.3 |
| excon | 0.54.0 |
| xcodeproj | 1.3.3 |
</details>
*generated on:* **2016-11-11**
</details>
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 48 (10 by maintainers)
Bad news, my only solution was to completely re-install the OSX. That worked. I’m all set
Update: It’s back. Lord help us.
I also ran into this issue with Xcode 8.3.2 using Cocoapods and the latest fastlane. Following these notes helped solving the issue! All I had to do is add
$(FRAMEWORK_SEARCH_PATHS)
to theLD_RUNPATH_SEARCH_PATHS
of the test targetsActually this was not at all related to the discussion here. Same symptom - I saw
Error Domain=IDETestOperationsObserverErrorDomain
but as it turned out, this was from a crash right on launch in the application stack that we were able to get fixed. Unfortunately, I assumed this was fastlane - since I had just upgraded to the new release. Always check the device log!I had this issue occur, but mine might be a little different. I’ll list my issue and solution in case it might help you out. I had a test bundle with empty test. Whenever scan ran on it, it would just timeout there.
What’s the status on this ongoing issue? Lots of people still seeing this issue I guess (including me).
In my case, specifying iPhone and iOS version helped. (make sure that simulator with chosen version is installed)
fastlane scan --scheme "integration" --device "iPhone 7 (10.2)" --clean
This is happening to me as well. It seems to start happening right after I updated to Swift 4 / Xcode 9. Not sure if running multiple simulators affects it or not. I am using TeamCity on a Mac mini macOS 10.12.
Using
fastlane v2.59.0
Here is the output:This seems to be happening on Bitrise for my team as well. It’s fairly random (although some days it’s around 50% of the time for PRs), and most of the time if I re-run the build, I can get it to run successfully.
Stack: Xcode 8.3.x, on macOS 10.12 (Sierra) (full details)
Log output:
Proposed fixed don’t seem to work. Is this still a problem for someone?
I recently had the problem where a number of builds failed because the simulator could not be communicated with.
I started running this script before using fastlane scan - to kill the simulator and wipe it clean. It has eliminated much of these errors. It still happens occasionally but much less frequently.
Hallo,
i got the same error now on two machines (10.11 and 10.10). First it worked correctly. I only use snapshot.
Resetting & Deleting of the simulators does not fix the the problem.
Also having this issue on Travis after updating osx_image to Xcode 9.1 Everything was working fine on Xcode 8.2 image.
EDIT: I have made 2 changes and the build has finally passed.
device: "iPhone 7 (10.2)"
toscan
options in myFastfile
.ENV["FASTLANE_EXPLICIT_OPEN_SIMULATOR"] = "2"
from my test lane tobefore_all
lane.Any suggestions to get this issue fixed? We are receiving the following error on every CI run. Had Xcode 8.3.3, switched to Xcode 9 and swift4 but then reverted to old xcode is when we started seeing the following issue: any pointers?
xcodebuild[79910:1503189] Error Domain=IDETestOperationsObserverErrorDomain Code=6 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
Testing failed: Test target xx encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted) ** TEST FAILED **
I tend to have the simulator up and running first before any test is run. Can you try to put this in your fastfile:: ENV[“FASTLANE_EXPLICIT_OPEN_SIMULATOR”] = “2”
I’ve seen this error and tracked it down to different problems each time (none with Fastlane):
I had this and fixed it by deleting an empty test target as mentioned by someone above.
It just started happening to me on my Jenkins build slaves tonight. After I upgraded to fastlane 2.22.0.
On my own dev computer fastlane scan runs my tests just fine.
Hello to all.
I got the same error with
fastlane scan
. I spent many hours before found the problem. Maybe someone will get the same.The real bug is not the
Early unexpected exit, operation never finished bootstrapping - no restart will be attempted
. Before this message I found in logs the another message, more important:Cannot launch simulated executable: no file found at /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gltkodapbbvlitfeuqbhsjilahgz/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/MyApp.app
Here is a full example:
When I looked into the Session-MyAppTests-2017-03-06_154355-xpXd2q.log I found the launch command, something like this:
Then I realized that something strange in the end of string:
test-without-building
— this is the real problem! But why? Because my .env config contained incorrect value of theSCAN_TEST_WITHOUT_BUILDING=0
environment variable. The strangest fix that I could imagine… ta-da-a:SCAN_TEST_WITHOUT_BUILDING=false
. Yep, zero value is not equal false in Ruby.