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!
Related
I just updated to iOS 10 on my test phone and Xcode 8. I ran the code migration and was running tests successfully on my simulated devices.
However, once I started trying to test on my real device things stopped working smoothly. After running my Sprite Kit game for around 5 - 10 seconds it would crash and render the phone inoperable until I unplugged it from the computer. After I unplug it the game runs as normal and is still really smooth.
This are the startup notifications printed to the console:
2016-09-15 22:20:49.490959 AppName[411:38688] [DYMTLInitPlatform] platform initialization successful
2016-09-15 22:20:49.684189 AppName[411:38634] Metal GPU Frame Capture Enabled
2016-09-15 22:20:49.684758 AppName[411:38634] Metal API Validation Enabled
This is the error I receive after the app crashes when the phone is plugged in:
/BuildRoot/Library/Caches/com.apple.xbs/Sources/Metal/Metal-85.83/ToolsLayers/Debug/MTLDebugRenderCommandEncoder.mm:130: failed assertion `indexBufferOffset(12) + (indexCount(480) * 2) must be <= [indexBuffer length](960).'
(lldb)
try to disable Metal verification by editing the scheme:
(Command-Option-R)
go to the Options tab.
Set Metal API Validation to Disabled.
This worked for me...
I can resolve this, unchecking "Debug executable" in the Scheme
Command-Option-R
"Wait for executable to be launched"
manual run
works for me from time to time.
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.
I have a set of XCUITests that run with our iOS app. They used to run fine on Xcode 7.2.1, but upgrading to 7.3 causes tests to fail in the "Set Up -> Wait for app to idle" phase with the following error:
UI Testing Failure - Failed to perform AX action for monitoring the animations of <XCUIApplicationProcess: 0x7f82450288c0 [appName here] (25670)>, error: Error -25204 performing AXAction 2043
This failure is seen on every single UI test, both on bots and when running locally.
Has anyone else seen this or have any workarounds?
In case anyone still has this issue - for me it was activating the Optimizely framework that caused this error. Disabling the framework when running XCUITest solved it for me.
Note to self: Don't have code that crashes your app on purpose while tests are trying to run. D:
Basically there was a call to terminate the app within the launch phase of the app for a certain scheme (in our case, the TEST scheme). Be thorough in checking what the app is doing when it launches for testing, because there might be errant behavior.
When I use the iOS simulator I've no issues with attaching to a process. But when I want to attach to a process on my iPhone it doesn't work. When I type in the process name and click on Attach it takes a while before showing me the following error:
It seems that I get the same error for any process identifier, even when the process identifier doesn't exist:
I think this issue is due to my iPhone (5S iOS 8.3), because on another iPhone (5) I don't have this issue. Can someone please help me...
This issue was only occurring on my iPhone 5S and after a factory reset the issue didn't occur anymore.
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