-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test target x encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted) #6968
Comments
@seanscal Can you erase the simulators on the machine in question? That should clear this up in most cases. Thanks! |
@TKBurner this has just started happening with one of the other builds on different machines as well. It happens every time on the one machine with all of our builds that run tests, and then sporadically is happening on the other machines as well now within the last two or three days |
also, do you mean reset all the simulators or uninstall then reinstall, I've tried both on the originally failing machine |
@seanscal Is it occurring more on a slower machine? It looks like a timeout of some sort. Thanks! |
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.
|
@TKBurner sorry i dont know why I didnt see this, but this is a early 2015 macbook that we run builds on which is faster than one other one and should be about the same speed as our third. I'm not sure why timeouts would happen on this and not the slowest machine, where jenkins builds take like 12 minutes, while on these 2 they take around 4-5 @lam2558 thanks for the help, but I dont think it applies to my situation sadly :(. |
Hallo, i got the same error now on two machines (10.11 and 10.10). First it worked correctly. Resetting & Deleting of the simulators does not fix the the problem. |
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. |
Hello to all. I got the same error with The real bug is not the 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: |
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. |
I got it on a scan step on Travis ... I assume was simulator. But leaving here for info:
|
Actually this was not at all related to the discussion here. Same symptom - I saw |
For us it was caused either by Xcode asking for debugging permission credentials or because we had to deselect code coverage in the scheme, save and select code coverage again. So not exactly sure which one solved it. |
I had this and fixed it by deleting an empty test target as mentioned by someone above. |
I'm seeing this issue when trying to set up Travis for RxStarscream. No fastlane so it is definitely not fastlane specific. I'm really not sure what it is, I've tried everything and running the command locally works absolutely fine. https://travis-ci.org/freak4pc/RxStarscream/builds/227625861 https://github.com/freak4pc/RxStarscream/blob/feature/travis-ci/.travis.yml |
I've seen this error and tracked it down to different problems each time (none with Fastlane):
|
Update, just tried with fastlane It's as if the project somehow builds super fast and tries to run tests before simulator is ready. Like I said, this issue was occasional for us across multiple Xcode projects. Now with this one particular project and specific project change it is reliably reproducible on CI agents and on my laptop as well. For some reason Xcode that I'm using is
|
I tend to have the simulator up and running first before any test is run. |
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.
|
@lam2558 thanks for suggestion, though that didn't make any difference I'm using something similar: def kill_simulators
Action.sh("killall -9 Simulator 2>/dev/null || echo No simulators running")
end and then using # Reset simulator
if Env.reset_simulator?
puts "Reset simulator: iOS #{CIConfig.full_test_device_name}"
FastlaneCore::Simulator.reset(name: CIConfig.test_device_name, os_version: CIConfig.test_device)
kill_simulators # Kill simulators again (otherwise builds may get stuck)
end Probably the logic to reset simulator is missing some bits... Anyways, I've tried the steps you have suggested. The main difference is that now the tests fail with the same error, while simulator is showing progress bar, not a spinner :) |
OK, so in the end solution for my trouble was re-integrating cocoapods.
I've noticed that doing so changes some of the CocoaPods autogenerated files, such as "copy frameworks" shell script and few other xcconfigs. This may not be the case if you don't use cocoapods though... |
@mgrebenets Xcode 8.2.1 wasn't kind to us, are you still seeing issues using the most current fastlane and Xcode 8.3.2? |
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 |
Proposed fixed don't seem to work. Is this still a problem for someone? |
I too had the same problem when creating xcodebuild test from Jenkins. I Fixed the problem by manually do test from Xcode and then run the xcodebuild trest command/script from Jenkins . I was using Xcode 9 beta version. Try it out comment if this solution works for you guys |
Fix doesn't appear to work for me either. |
For me the problem was that the test target was not running locally either, because of missing cocoapods framework |
My team has been running into this issue quite a bit on our Jenkins builds. We have to constantly restart the simulators, then the builds until they pass.
|
Hey @ryang1428 what version of Xcode are you using? |
This is occurring to me as well, using Xcode 8.3.3 on a mac mini in the cloud. Xcode server consistently fails as a result of this issue. Edit: |
This seems to have started occurring once we added multiple test sub-targets to the test scheme. |
Sorry @ohayon I just saw your reply-- but we are seeing this on Xcode 8.3.3. I will get a more detailed log up next time I see this |
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:
|
Not sure if this helps or not, but I was getting a similar error (code |
Its been happening several times a day this week:
Xcode 8.3.3 |
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. Using
|
Any suggestions to get this issue fixed? We are receiving the following error on every CI run. 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: |
In my case, specifying iPhone and iOS version helped. (make sure that simulator with chosen version is installed)
|
I had this problem when running tests on iOS 9 simulator (Xcode 9, parallel run with iOS 10 simulator). After we decided to drop iOS 9 tests and only run the suite for iOS 10 and iOS 11, the problem was gone. |
I had this problem when I had both Xcode 9.0 and 9.1 one installed and the simulator that was chosen is not displayed in the latest Xcode (something weird there) so I ran |
What's the status on this ongoing issue? Lots of people still seeing this issue I guess (including me). |
Also having this issue on Travis after updating osx_image to Xcode 9.1 EDIT: I have made 2 changes and the build has finally passed.
|
Ok, so creating a naked project with file > new project > include unit tests > cmd + u works just fine. Started adding source files from my broken project, one at a time, to the new naked project. I also started adding framework dependencies one at a time. I reproduced the problem the moment I introduced a specific framework. The framework was built with Carthage. The Carthage documentation states a few steps that I normally skip. Now it seems, these steps are important. The following solved my issue. |
I applied @rob-nash's answer to my project, but I am still having the same problem, no results on success or failure of UI tests. |
Hey everyone, as you can see this issue was started over a year ago. I am going to close this issue and if anyone sees something similar to this, I think it would be best to open a new issue so that we can make sure that everything is up to date and we aren't conflating some things that might be caused by different problems given how much code has changed in the past 365+ days 😄 🚀 🐙 |
I was getting the same error while running
👉 Finally running test target via Xcode 9.2 helped me! Here are the steps which help me to fix the problem: 👉 1. Run all tests using Xcode. (What is important here, that only Xcode return a detailed error. I also try to run unit test AppCode, but unfortunately, it ended up without meaningful error) 👉 2. In my case it occurs that while Xcode runs the tests I will receive a runtime error:
Here is my code when I started receiving
and code before the error:
So, as Xcode said I called the setter of Summary: I guess in your case it could be a different error, but it is worth to run unit tests using Xcode because(in my case) that was only one way to get a detailed error. Hope it will help you 😉 |
New Issue Checklist
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
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.The text was updated successfully, but these errors were encountered: