Reputation: 2826
I'm trying to do some automated UI testing using Calabash, everything works great when I'm running on iOS 8 simulators, however, the minute I switch to an iOS 7 simulator, it doesn't seem to be able to fully start up the app.
The app will open, finish the splash screen, then shortly after it will crash and calabash will retry again. This continues indefinitely until I manually quit it.
The only thing changing between running is my device target, currently I'm using the following for device target:
DEVICE_TARGET="iPhone 5 (7.1 Simulator)"
And when I run on an 8.4 device, it looks like the following:
DEVICE_TARGET="iPhone 5 (8.4 Simulator)"
Any ideas why this isn't working? Is 7.1 not supported on calabash-ios?
More info:
I'd appreciate any help you can provide!
Upvotes: 0
Views: 234
Reputation: 2480
UPDATE This SO answer has some suggestions about how to fix this problem.
Officially, Calabash iOS supports iOS >= 7.1 simulators on Yosemite and iOS >= 7.0.3 on Mavericks.
Do you have the same problem on physical devices?
If you have:
you must restart your Mac to get the CoreSimulator environment into a good shape.
With that said, I am working on integration tests for run-loop and I am seeing unexplained errors launching iOS 7.1 Simulators in Xcode 6.4 on Yosemite. It looks like UIAutomation is not available on iOS 7.1 Simulators on Yosemite.
$ DEBUG=1 be run-loop instruments \
launch --app ./CalSmoke-cal.app \
--device "iPhone 5s (7.1 Simulator)"
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00000001032a6286 __pthread_kill + 10
1 libsystem_sim_c.dylib 0x0000000102fd4e59 abort + 101
2 com.apple.ScreenReaderCore 0x00000001047d3114 SCRCUncaughtExceptionHandler + 97
3 com.apple.CoreFoundation 0x0000000100691bf5 __handleUncaughtException + 629
4 libobjc.A.dylib 0x00000001025bebf5 _objc_terminate() + 94
5 libc++abi.dylib 0x0000000102e4de91 std::__terminate(void (*)()) + 8
6 libc++abi.dylib 0x0000000102e4d91d __cxa_throw + 124
7 libobjc.A.dylib 0x00000001025bea9d objc_exception_throw + 298
8 com.apple.CoreFoundation 0x000000010060d2ad +[NSException raise:format:] + 205
9 com.apple.UIAutomation 0x0000000100de96f7 +[UIAXElement initializeAccessibility] + 540
10 com.apple.UIAutomation 0x0000000100dec791 +[UIAXElement uiaxSystemWideElement] + 36
11 com.apple.UIAutomation 0x0000000100dff833 -[UIATarget init] + 300
12 com.apple.UIAutomation 0x0000000100dff6f9 +[UIATarget localTarget] + 53
13 ScriptAgent 0x0000000100008ea8 0x100000000 + 36520
14 ScriptAgent 0x0000000100004b17 0x100000000 + 19223
15 ScriptAgent 0x0000000100006e22 0x100000000 + 28194
16 libdyld.dylib 0x00000001031795c9 start + 1
I have tried a couple of patches on run-loop, but nothing is working.
There is also this from the Console.app
com.apple.CoreSimulator.CoreSimulatorService[81434]: Failed to open
/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib:
dlopen(/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib, 1): no suitable image found.
Did find:
/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib:
mmap() error 1 at address=0x11837B000, size=0x00002000 segment=__TEXT in Segment::map()
mapping /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib
Upvotes: 1