Post marked as unsolved
33
Views
I occasionally run out of hard drive space on my servers, depending on how many Xcode bots are being used at a time by the development team.
Using GrandPerspective, I see an enormous file that I'd like to get rid of. xcsd.output.log dwarfs all other files in the system, at 67.4GB.
It's a log file, so presumably I can just throw it away and it will regenerate fresh. However, keeping *some* history would be nice.
Is there a strategy for keeping this file under control, rather than letting it just grow infinitely? Or do I just have to remember to clean it out manually from time to time?
Post marked as unsolved
377
Views
I have a very nice build server running on a Mac Mini which creates new integration bots to integrate against new branches our team pushes to github. This systems relies heavily on the availability of the Xcode Server API, specifically the ability to overwriteBlueprint on a bot. (basically there are raw template bots on the server, and the script duplicates one, receives a JSON definition for the bot, modifies that JSON, and writes back to update the bot)I'm quite distressed to see that all documentation regarding this API is gone. However, I cannot find information that explicitly says the API is deprecated. Has there been any announcement about the status of this API? Watching Xcode Server via Charles shows that the API is being used and has some new (?) api calls, but there is no information about this that I can find.If this API is removed, my whole server is dead in the water.I can work toward a replacement solution, but with no information on the matter, I don't know how long I have or if I'm actually safe.
Post marked as unsolved
207
Views
We have an Xcode forum grouping. We have a Beta forum grouping.Neither of those have an "Xcode Beta" forum.Add "Beta 11" to the Xcode subsection, or add "Xcode Beta" to the Beta subsection, please.
Post marked as unsolved
562
Views
Now that iPadOS has been split off into its own unique entity, how does this affect xcodebuild?Until now, I have been using "-destination generic/platform=com.apple.platform.iphoneos" to make my .xcarchives.In looking through Xcode.app/Contents/Developer/Platforms I see explict references to tvOS, macOS, watchOS and iPhoneOS.iPadOS is not referenced at all. So... do we just keep using "iphoneos" to build for both iPhone and iPad?It *seems* to be the case, but just wanted to see if someone knows something I'm overlooking or didn't hear about.
Post marked as unsolved
616
Views
I have two Mac Minis: one running Xcode Server 10 (production) and one running Xcode Server 11 beta (development & testing)These two machines share a developer account only used for server-related things.Until this week, everything was moving smoothly on my Xcode 11b3 server, then I started having UI test failures.The tests don't even start, and the error seems to be related to Code Signing.Looking at my integration bot, under Signing > Options > Developer Teams I see, multiple times a day, "Your server has been removed from this team and needs to be added again.""Allow Xcode SErver to manage my certificates and profiles" is checked ON."Automatically register devices in my developer account" is checked ON.Code Signing for the project is set to (and has remained unchanged from) "Automatically manage signing"Last week, on Xcode 11b3, I had no problems. This issue appeared suddenly and *seemed* to coincide with the release of 11b4?But installing 11b4 yesterday did not resolve the issue.Anyone else having similar issues with Xcode 11b3 or 11b4?
Post marked as unsolved
514
Views
On May 31 I switched my UI test environment as follows:BEFORE:- iPhone SE (Simulator) with iOS 11.4- iPad (6th Gen, Simulator) with iOS 12.2- iPhone 8 (real hardware) with iOS 12.4AFTER:- iPhone SE (Simulator) with iOS 11.4- iPad (6th Gen, Simulator) with iOS 12.2- iPhone Xs (Simulator) with iOS 12.2- iPhone 8 (real hardware) with iOS 12.4This seemed fine for one or two runs, but then the tests completely failed for iPhone SE (Simulator, iOS 11.4).The problem is the same every single time:Device Testing reports, "Unknown Status"Issue reports, "Failed to establish communication with the test runner. The operation couldn't be completed. DTXProxyChannel error 1.Log reports, Closing socket to testmanagerd for Sim iPhone SE. Failed to make test runner session: Channel disconnected.Removed the iPhone Xs (Simulator, iOS 12.2) from the mix and testing worked again (i.e. no change to codebase being tested).Server environment:Xcode 10.2.1 (10E1001)macMini (late 2014), 3Ghz i7, 16GBmacOS Mojave 10.14.5
Post marked as unsolved
360
Views
I have an iOS hardware device (iPhone 8) running iOS 12.0.1It is set to run UI tests along with a set of Simulators (iOS 10.x, 11.x and 12.x)The hardware device is crashing during UI tests sometimes, but the crash log is not symbolicated.This wasn't a problem before, but I honestly don't know if it started with Xcode 10.0 or Xcode 10.1Is there a new flag or setting somewhere I'm overlooking, or is this just broken?
Post marked as unsolved
546
Views
When running a UI test the other day, an assertion failure terminated the test early when an expected button did not come onto screen. In looking at the screenshots, it appears the hosting app died during the test, leaving the UI test runner staring at the Springboard, rather than the main app, during accessibility element evaluation.In looking through the log files (Xcode Server > xcbot_name > Logs > Download Logs...) I see logs about the test runner and its attempts to find an on-screen button. But I see nothing about the main hosting app itself and why it crashed.Are these crash logs kept only in the Simulator?(I really hope not, as the nature of our project requires constant Simulator resets to avoid app cache conflicts between branch integrations)
Post marked as unsolved
1.1k
Views
I have an integration bot performing a simple set of UI tests which exercise basic functionality of my app on a scheduled basis. One part of this is to query the table view and count on-screen cells of a specific accesibilityIdentifier pattern. A scroll of the table view is performed, and a new count of on-screen cells is performed.I'm encountering two new problems with Xcode 9.3The tests take a huge amount of time. I've seen it perform a full set of passed tests in 2 hours, and other tests run for 4 or 5 hours before completing. In the past, the tests took 1 hr 15 minutes very very consistently (give or take 5 minutes). Now it takes 2 hrs minimum and up to 5 hours. Very strangePlease look at this simple code...let tableView = (my routine for finding a specific table view in question)
let searchPredicate = NSPredicate(format:predicateString)
let allCells = tableView?.cells.otherElements.matching(searchPredicate).allElementsBoundByIndex
sleep(5) //I've often found that a sleep is needed to give the system time to reify reused objects; am I wrong?
allCells?.forEach { oneCell in
if oneCell.exists {
let isHittable = oneCell.isHittableOn most, but not every, run at least one simulator reports a failed test assertion: "Failed to determine hittability of <my cell identifier> Other: Error copying attributes -25202". How can I reliably check if a cell isHittable without running into this trouble? How can it pass the existence test but fail to be queryable for isHittable?
Post marked as unsolved
257
Views
I have a simple UITest that excercises some simple functionaltiy of my app. Due to the dynamic nature of the app, I scan for an array of tappable elements with specific accessibilityIdentifer prefix, tap one, scroll its content some random number of times, tap the next one, scroll its content, etc.In 10.3 Simulator (running in Xcode 9.1 on a Mac Mini), this test finishes in about 10 minutes.On 10.3 device (iPad 2, in this case), this test finished in 1 hour 10 minutes.This time differential seems excessive to me.Object discovery appears to be the main culprit in the slowness.What are ways to ensure on-device testing is efficient?Any specific API calls that should be avoided?I'm sure there are optimizations I can perform on my test code, but given the relative quickness of Simulator runs I have been opting for correctness over speed. Are hardware UITest runs more susceptible to inefficiencies in testing code?
Post marked as unsolved
1.4k
Views
Using Xcode 9 GM Server to build our product for iOS 11 compatible submission. Bot integration created .ipa and .xcarchives fine. All looks good.In the integration details > Summary > Build Results > Archive there is a dropdown menu that allows us to Save, Show in Organizer, and Submit to App Store...All options come back with a warning, "The request timed out."From the server web view I can download the integration assets, which includes the .xcarchive. This .xcarchive can be manually added to the Organizer and Submit to App Store works. (with the warning iTMS-90704: "Missing Marketing Icon....", as discussed here)When I select an archive dropdown menu option in the bot integration summary, I can't seem to find any console output to watch and understand why "the request timed out."Just Xcode 9 GM growing pains? Or perhaps something is wrong with my server setup that is preventing the normal tools from working?
Post marked as unsolved
4.5k
Views
Because UI tests run as a separate process from the main app, I'm using UI tests as an opportunity to learn Swift.The project is Objective C++ (there are a handful of .mm files), and the UI tests are a contained in a separate target, with nothing but a single .swift file containing tests.My understanding is that no bridging header is necessary because the UI tests are not talking to the Objective-C code in the host application.(and at any rate, adding such a file result in absolutely no change to the below-written behavior)In Xcode 8.3.3, I found that the Swift 3.1 tests ran fine in all Simulators, but entering a breakpoint and runningpo app.debugDescription(app is a local var initialized as XCUIApplication.init()worked properly in Simulator 10.x, but in Simulator 9.x returned the errorerror: in auto-import:
failed to get module '<REDACTED>UITests' from AST context:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "UIKitOverlayShims.h"With Xcode 9 (up to and including Beta 5), the above error happens in every Simulator regardless of how trivial the Swift UI test code. override func setUp() {
super.setUp()
continueAfterFailure = false
let app = XCUIApplication.init()
app.launch()
}Adding a line into the setUp() method (for example) works fine...print(app.debugDescription)The Variables View shows proper output. And in the console runningfr v appat least doesn't complain and attempts to spit out some useful information.But trying to po anything from the Swift REPL now shows the above errors.This makes for a huge productivity block, as I cannot rely on an interactive debugging session to understand failures in XCUIElement discovery.
Post marked as unsolved
681
Views
macOS: 10.12.5 (16F73)Xcode: 8.3.2 (8E2002)Simulator: 10.0 (SimulatorApp-745.10 CoreSimulator-375.21)Project: Objective-C for entire app code base; Swift 3 only for UITestsHere's a list of the problems I've encountered over the past day, investigating why some UITests fail in iOS Simulator 9.3, but not in 10.3. Curious to know if anyone else has encountered these and/or knows fixes. Otherwise, it's off to Bug Reporter I go...UITabBar reports back *two* found instances for a unique button label. Logging out the app heirarchy to console shows every tab bar button has two accessibility buttons, one with the localized string label and one with the localization string label. The localization string labels are set in Interface Builder, but if the button title is set *again* manually in viewDidLoad, the localization string is replaced with the localized string, and now *both* gain the localized string as an identifier.Accessibility Inspector flat out does not work with Simulator 9.3? Even just in the Springboard, running Accessibility Inspector does not seem to recognize anything about the Simulator window at all. Simulator 10.3 seems OK. In Accessibility Inspector, selecting my Mac > Simulator as the targer mostly works, but does not provide fine-grained accessibility information (I cannot inspect a button embedded in a view placed in the navigation bar, for example)After hitting a breakpoint in a test, in Simulator 10.3 I can `po someLivingObject` in the console and inspect that XCUIElement's accessibility heirarchy. In Simulator 9.3 this does not work for any object with the error "error: could not build Objective-C module '_SwiftXCTestOverlayShims'"Cannot type text into search fields using UITest framework. Code that works in Simulator 10.3 fails to get keyboard focus in Simulator 9.3. Thinking it was, perhaps, some change in APIs from 9.3 to 10.3, I had Xcode record my action in Simulator 9.3 and play it back. The below Xcode-generated code (via recording) fails at line #3 during playback with the error "Neither element nor any descendent has keyboard focus. Element: " Hardware keyboard is disabled, onscreen keyboard is properly displayed, input cursor is flashing and awaiting input, but no dice.let searchBarElement = app.navigationBars["SearchView"].otherElements["search-bar"]
searchBarElement.tap()
app.typeText("foobar")
Post marked as unsolved
1.5k
Views
This has happened more than once.This time occurred relatively soon after an upgrade of Xcode from 8.3 to 8.3.2.However, not immediately after because we saw no problems with the bots for the remainder of that day.We run Server 5.3.The problem:Bots keep failing due to "The devices configured for testing were not found." though those bots were running happily before.We have dozens of bots. "Edit bot..." on any bot and check "Devices"We only run CI tests on two simulators, so I want to set to run on those and exclude all others.Select "Specific iOS Devices" and I'm told "No devices found" though a check under Window > Devices shows a huge list of available simulators.Opening Simulator also reveals the list of devices.In Xcode under Product > Destination > iOS Simulators, I see everything I expect.Only the bots cannot connect to the simulators, which defeats the utility of having bots.Following various advice found around the internet (restarting Xcode, xcrun simctl erase all, rebooting the system entirely, deleting userdata from the project file) have all failed to let my bots see the simulators. I haven't tried reinstalling Xcode, but we just upgraded to a new version Wednesday, and it has been working. It is a sudden occurance and has happened twice now in three months.
Post marked as unsolved
754
Views
I am having a devil of a time figuring out a sound strategy for getting a new instance of Xcode Server to match a known, good state from another instance.The root problem here is that during the first month of using Xcode Server for CI purposes, we've already seen a mysterious fatal error occur with the server which could only be fixed by resetting Xcode Server from scratch. macOS Server 5.3 complains that it cannot connect to Xcode Server because of "Error reading settings". Reading around online, it seems the macOS Server exhibits this problem for other modules, like the Wiki pages and repositories. So, I have come to believe that it is a somewhat fragile system to rely on without a reliable backup system.So, I want to do the minimal-critical backup for the server, such that it can be restored to glory. It seems to me that the server couchdb and perhaps the local Xcode build archives would be enough. However, I cannot get access to the couchdb to do a backup, even using sudo in the command line. Opening the xcs database in Futon results in "you don't have access to this database" and an explicit log-in to Futon shows me that my admin account is not the admin, because my admin account has no couchdb account at all.I believe the user _xcscouch has access, but I have no idea what password it decided to use for itself. Without an admin account, I believe the server's couchdb file is useless, if installed into another machine, or if the main machine is wiped and server reinstalled from scratch.I know of no utilities within Xcode Server or macOS Server for doing a proper backup/restore.I'm at a loss!