Run Xcode Server bots in simulator - ios

I have created some Bots to build, analyze and run unit tests, but I have not been able to make it work in a simulator. All integrations always finish with 12 errors, one for every simulated device.
Assertion: Test target MyAppTests encountered an error (The operation couldn’t be completed. (OSStatus error -1712.) If you believe this error represents a bug, please attach the log file at /Library/Developer/XcodeServer/Integrations/Integration-7d62a04eb43957f1d3098c8ffb64cc13/Session-2016-06-22_20:00:39-svEh7I.log)
This same error repeats itself 12 times. I believe it has something to do with the simulators because the tests only pass on the real devices.
Is there some trick that needs to be done for the simulators to work? The bot configuration for devices is to test with All iOS Devices and Simulatos.
Thanks in advance.

Related

Unit Testing, iOS, DTXProxyChannel error 1

I sometimes start to get the following error
2017-04-02 18:55:22.645937+0200 Stamps[730:111791] Connection peer
refused channel request for
"dtxproxy:XCTestDriverInterface:XCTestManager_IDEInterface"; channel
canceled Failed to run tests: The operation
couldn’t be completed. (DTXProxyChannel error 1.)
Last time, when this happened, I just did some random actions with clean my project, remove derived data etc., and it was fixed. Now, it happens again - just after a start of the app, it closes and log contains this error.
What does it mean and is there any workaround here?
I use XCode 8.3, Swift 3.1, test on device 6s with 10.3 installed.
Surprisingly, to fix this, I just replugged my iPhone to another port

IOS bot error: Early unexpected exit, operation never finished bootstrapping -

I have a question regarding build error that occurs when bots perform UI testing.
When I just run the UI tests, it just works fine. However, whenever I use bots to run the UI tests, there is build error and I keep getting build error saying:
"Early unexpected exit, operation never finished bootstrapping -"
XCode bot error: Early unexpected exit, operation never finished bootstrapping -
Some proposed solution says that I have to skip the APNs.. In my case the alert came up since the application was trying to register of APNS and the
"App Name" would like to enable Notifications alert was displayed. Skipping the APNS registration for UI Tests will prevent the issue from popping again.
How can I confirm that the alerts are causing the problem? I was not able to check it since simulator shows nothing on CI machine when the tests are performed by bot. Also, could you please specify what steps should be taken to skip the APNS registration for UI Tests? I am using iphone 6s simulator.
I have been stuck here forever.
I would really appreciate your help!
Thanks!
The solution that worked for me was to use iphone 6s simulator (iphone 6s or iphone 6s plus). I was using iphone 6 and it caused me a lot of errors including this one.
The actual reason was that APNS registration could not be skipped using iphone 6 simulator whereas it could be skipped using iphone 6s simulator for me (App would like to enable push notification..). After that, addUIInterruptionMonitorWithDescription successfully worked for me!

calabash-ios physical device test, app starts but crashes

Running calabash-ios cucumber for simple iPhone app. Simulator is working perfectly. When trying on physical device, app loads, crashes, then loads again, and crashes again, on a loop.
Error message:
Unable to start. Make sure you've set APP_BUNDLE_PATH to a build supported by this simulator version
Calabash::Cucumber::Launcher::StartError: Time out waiting for UIAutomation run-loop Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError.
Logfile /var/folders/9s/yttj4cz93m98hqs6bfw2x8xr0000gn/T/run_loop20150522-12657-dr3m49/run_loop.out
2015-05-22 19:58:11 +0000 Fail: An error occurred while trying to run the script.
Instruments Trace Complete (Duration : 2.594758s; Output : /var/folders/9s/yttj4cz93m98hqs6bfw2x8xr0000gn/T/run_loop20150522-12657-dr3m49/trace.trace)
to run the script. UIAScriptAgentSignaledException
(Calabash::Cucumber::Launcher::StartError)
/Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:766:in `new_run_loop'
/Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:631:in `relaunch'
Steps:
loaded app-cal on device
ran in command-line using:
$ DEVICE_TARGET=udid BUNDLE_ID=com.company.app DEVICE_ENDPOINT=http://ip:37265
Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError
The probably cause of this is that the device is not enabled for UIAutomation. The device must be enabled for development. A device is enabled for development if it appears in Xcode's Device's window (Shift + Command +2) and you must enable on-device testing manually by visiting the device's Settings.app > Developer tab.
If you have recently upgraded the iOS version we recommend that you check the UIAutomation settings again and perform a restart. Often, after an upgrade, Xcode cannot download debugging information from the device. Look at Xcode's Device's window. The device must appear without any warnings.
Sometimes devices get into a bad state and Xcode cannot communicate with it. We recommend trying to interact with the device with Apple's Instruments to clear this bad state.
All this information and more can be found on the Calabash iOS Hot Topics page. https://github.com/calabash/calabash-ios/wiki/Hot-Topics#6-errnoeintr-interrupted-system-call

Custom Keyboard: Hub connection error

recently I was playing around with the custom keyboard extension in iOS 8 Beta with Swift (Xcode beta 6), but I keep getting this error when I run it on a simulator, it seems to be quite random and I've no idea what causes it:
plugin com.name.app.extensionName interrupted
Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 "The operation couldn’t be completed. (Cocoa error 4097.)" (connection to service named com.name.app.extensionName) UserInfo=0x7b087720 {NSDebugDescription=connection to service named com.name.app.extensionName}
I have no idea what to do. I can't test the app on a real device at the moment, therefore I'm stuck here. It happens on all types of simulators, I already reset them and restarted Xcode and my computer.
I hope you can give me any advice or maybe even know a fix!
I had this problem in Today Extension written in Objective-C. After updating to XCode 6.0.1 and building my project it started saying about missing ARM64 Architecture. When added arm64 it started working well. Try to play with it
I tried a variety of things to resolve this and ultimately what fixed it was "cleaning" my application (on the "Product" menu). I don't know what that really does, but I "cleaned" it, then restarted the simulator and suddenly everything is working again.

iOS8/Simulator - error in SFHFKeychainUtils, SFHFKeychainUtilsErrorDomain error -34018

I have just downloaded XCode 6 and adjusted my application to run under it.
It seems to work just fine, however I use SFHFKeychainUtils, and when I run the application in the simulator I get the error:
error getting UUID: The operation couldn’t be completed. (SFHFKeychainUtilsErrorDomain error -34018.)
Looking at the code, I'm not quite sure why I would get that error. I also do not get that error running my application on an iOS7 device running from XCode6, just the simulator, so I think it's an iOS 8 error.
Any thoughts on resolving this?
Error code 34018. It happens when client has neither application-identifier nor keychain-access-groups entitlements.
iOS 8 is BETA version and doesn’t support Keychain Access developer APIs on the simulator at the moment.
iOS 8 beta Release Notes

Resources