Could not run simple demo UITest for IOS at Xamarin Studio - xamarin.ios

I am trying to run the demo for UITest on iOS platform here.
I can not run the UI test, even though building the project without a problem.
This is the error information:
SetUp : Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to launch simulator
ExitCode: 134
2016-11-23 12:00:01.767 iOSDeviceManager[36474:1504101] CoreSimulator: Loading from /Applications/Xcode 8.2-beta.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework
2016-11-23 12:00:01.772 iOSDeviceManager[36474:1504101] CoreSimulator: Successfully loaded
2016-11-23 12:00:01.773 iOSDeviceManager[36474:1504101] CoreSimulator: SimDevice has correct path of /Applications/Xcode 8.2-beta.app
2016-11-23 12:00:01.773 iOSDeviceManager[36474:1504101] SimulatorKit: Loading from /Applications/Xcode 8.2-beta.app/Contents/Developer/Library/PrivateFrameworks/SimulatorKit.framework
2016-11-23 12:00:01.795 iOSDeviceManager[36474:1504101] SimulatorKit: Successfully loaded
2016-11-23 12:00:01.795 iOSDeviceManager[36474:1504101] SimulatorKit: SimDeviceFramebufferService has correct path of /Applications/Xcode 8.2-beta.app
2016-11-23 12:00:01.796 iOSDeviceManager[36474:1504101] Loaded All Private Frameworks [CoreSimulator, SimulatorKit]
2016-11-23 12:00:01.883 iOSDeviceManager[36474:1504101] Completed Pool Preconditons
2016-11-23 12:00:01.939 iOSDeviceManager[36474:1504101] *** Assertion failure in -[FBSimulatorConfiguration initWithNamedDevice:os:auxillaryDirectory:], /Users/chrisf/FBSimulatorControl/FBSimulatorControl/Configuration/FBSimulatorConfiguration.m:32
2016-11-23 12:00:02.056 iOSDeviceManager[36474:1504101] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: os'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff832256fb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff97a2ca2a objc_exception_throw + 48
2 CoreFoundation 0x00007fff8322a252 +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fff84c7d390 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 FBSimulatorControl 0x000000010d2cef3f -[FBSimulatorConfiguration initWithNamedDevice:os:auxillaryDirectory:] + 444
5 FBSimulatorControl 0x000000010d2cf0a3 __48+[FBSimulatorConfiguration defaultConfiguration]_block_invoke + 108
6 libdispatch.dylib 0x00007fff982d3128 _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff982d30e5 dispatch_once_f + 38
8 FBSimulatorControl 0x000000010d2cf034 +[FBSimulatorConfiguration defaultConfiguration] + 45
9 FBSimulatorControl 0x000000010d2fc253 +[FBSimulatorConfiguration(CoreSimulator) inferSimulatorConfigurationFromDevice:error:] + 347
10 FBSimulatorControl 0x000000010d2f657f +[FBSimulator fromSimDevice:configuration:launchdSimProcess:containerApplicationProcess:set:] + 178
11 FBSimulatorControl 0x000000010d2f8157 -[FBSimulatorInflationStrategy inflateSimulators:availableDevices:previouslyIdentifiedContainerApplications:] + 810
12 FBSimulatorControl 0x000000010d2f7db8 -[FBSimulatorInflationStrategy inflateFromDevices:exitingSimulators:] + 891
13 FBSimulatorControl 0x000000010d2d615d -[FBSimulatorSet allSimulators] + 129
14 FBSimulatorControl 0x000000010d2d45d5 -[FBSimulatorSet query:] + 108
15 iOSDeviceManager 0x000000010d1609c1 +[Simulator simulatorWithDeviceID:] + 238
16 iOSDeviceManager 0x000000010d1614f5 +[Simulator launchSimulator:] + 88
17 iOSDeviceManager 0x000000010d161ec7 +[LaunchSimulatorCommand execute:] + 74
18 iOSDeviceManager 0x000000010d15cd4a +[CLI process:] + 1171
19 iOSDeviceManager 0x000000010d121504 main + 104
20 libdyld.dylib 0x00007fff98309255 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

I am using Xamarin test cloud to run UITest of Xamarin android and xamarin ios project. I have tried both. For Xamarin.ios project, my setup method looks like below,
app = ConfigureApp
.iOS
.PreferIdeSettings()
.StartApp();
As instructed in default UITest, you need to perform below steps.
Edit the AppDelegate class and add the following snippet to the FinishedLaunching method...
#if ENABLE_TEST_CLOUD
Xamarin.Calabash.Start();
#endif
Make sure you are adding "ENABLE_TEST_CLOUD" debug variable in debug configuration of project or remove if, endif (always allow Xamarin.calabash.start().
and post the UiTest to xamarin test cloud from release configuration build.
Just make sure in this case, remove above statement when you are submiiting your app to app store.
In unit test window (of Xamarin studio), add ios app and then run the test with test cloud. Make sure you have xamarin account to run test on test cloud.
Then it asks devices on which test will be running. You can select 1 or many.

Related

doppl SOInterface is not visible from class loader error

I am getting an error with the doppl SOAndroid app. I have successfully been through the PartyClickerSample.
iosApp[40373:656090] *** Terminating app due to uncaught exception 'JavaLangIllegalArgumentException', reason: 'java.lang.IllegalArgumentException: interface co.doppl.so.api.SOInterface is not visible from class loader'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ef0c12b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010b51ff41 objc_exception_throw + 48
2 doppllib 0x0000000108b2d0a6 JavaLangReflectProxy_getProxyClass0WithJavaLangClassLoader_withIOSClassArray_ + 1791
3 doppllib 0x0000000108b2d233 JavaLangReflectProxy_newProxyInstanceWithJavaLangClassLoader_withIOSClassArray_withJavaLangReflectInvocationHandler_ + 45
4 doppllib 0x0000000108aab120 -[Retrofit2Retrofit createWithIOSClass:] + 240
5 doppllib 0x0000000108ac39c5 SOARepository_init + 389
6 doppllib 0x0000000108ac4134 new_SOARepository_init + 52
7 doppllib 0x0000000108ac3bb0 +[SOARepository initialize] + 64
Why is the SOInterface not visible when it is in the config?
...
include 'co/doppl/so/api/**'
...
translatedPathPrefix 'co.doppl.so.api', 'SOAPI'
Also with the iosTest, the tests pass but get some BoringSsl statement:
********** Result for co.doppl.so.RepositoryTest **********
Success
Total: 1
Failures: 0
2018-02-23 09:50:58.086219-0600 iosTest[41775:778685] [BoringSSL] Function boringssl_session_errorlog: line 2871 [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert
I keept searching and found the answer:
https://github.com/doppllib/SOAndroid/issues/1
"Need to add 'prefixes.properties' to the main app bundle".
Same as was done with the testIOS app.

Call to CIContext.FromOptions crashes in iOS

In my Xamarin iOS app, I continuously receive CIImage instances that I need to convert to CGImage instance. Here is the relevant code:
CIContext cicontext = CIContext.FromOptions(null);
CGImage cgimage = cicontext.CreateCGImage(ciimage, ciimage.Extent);
...
cgimage.Dispose();
cicontext.Dispose();
Things work fine for the first 100 or so calls. After that, I get a crash in the application. Here is the stack trace:
critical: 2 libsystem_platform.dylib 0x21866077 _sigtramp + 42
critical: 3 CoreImage 0x24a352b9 <redacted> + 64
critical: 4 CoreImage 0x24a6c005 <redacted> + 292
critical: 5 CoreImage 0x24a6c237 <redacted> + 18
critical: 6 CoreImage 0x24a4b431 <redacted> + 512
critical: 7 CoreImage 0x24a47d5b <redacted> + 734
critical: 8 CoreImage 0x24a47a55 <redacted> + 52
critical: 9 MyApp 0x00fa4eb4 wrapper_managed_to_native_ObjCRuntime_Messaging_IntPtr_objc_msgSend_IntPtr_intptr_intptr_intptr + 108
critical: 10 MyApp 0x00f41a5c CoreImage_CIContext_FromOptions_Foundation_NSDictionary + 120
critical: 11 MyApp 0x00f41868 CoreImage_CIContext_FromOptions_CoreImage_CIContextOptions + 48
Basically, some logic in CIContext.FromOptions causes it to crash.
For now, I have made cicontext object a static variable that is initialized just once. This seems to take care of the crash. However, I would appreciate it if you have any insight. Regards.
For those running into this problem, this fix worked for us:
Call cicontext = CIContext.FromOptions(null) just once and hold on to the return value, either as a member variable or a static variable.
After calling CreateCGImage call cicontext.ClearCaches(). If this is not done, you will eventually run out of memory.
Hope this helps. Regards.

gnugk, openmcu and tandberg VC Unit

im testing gnugk, openmcu along with a few tandberg vc units for a video conference call.
my config is....
gnugk + openmcu => 10.21.34.2
tandberg vc =>10.21.34.151..
When i invite VC for conference for the fist time from openmcu web interface, it connect for a while and it shows connecting but soon the call terminates itself.
A few log messages from gnugk are (at the time of conecting and disconnecting)...
011/06/27 17:59:57.968 3 ProxyChannel.cxx(965) Q931d Received: Alerting CRV=24075 from 10.21.34.151:1720
2011/06/27 18:00:01.978 3 ProxyChannel.cxx(965) Q931d Received: Connect CRV=24075 from 10.21.34.151:1720
2011/06/27 18:00:01.978 2 gkacct.cxx(1043) GKACCT Successfully logged event 32 for call no. 18
2011/06/27 18:00:01.978 3 ProxyChannel.cxx(4400) H245 Set h245Address to 10.21.34.2:53057
2011/06/27 18:00:01.981 3 ProxyChannel.cxx(4319) H245 Connected from 10.21.34.2:46867 on 10.21.34.2:53057
2011/06/27 18:00:01.982 3 ProxyChannel.cxx(4351) H245 Connect to 10.21.34.151:11011 from 10.21.34.2:0 successful
2011/06/27 18:00:02.080 3 ProxyChannel.cxx(1163) H245 ERROR DECODING H.245 from 10.21.34.2:43717
2011/06/27 18:00:11.993 3 ProxyChannel.cxx(965) Q931s Received: ReleaseComplete CRV=24075 from 10.21.34.2:43717
2011/06/27 18:00:11.993 1 RasTbl.cxx(3534) CDR|18|06 78 94 d6 26 9f e0 11 90 3b 00 0c 29 21 33 74|10|Mon, 27 Jun 2011 18:00:01 +0530|Mon, 27 Jun 2011 18:00:11 +0530|10.21.34.2:43717|4125_endp|10.21.34.151:1720|4121_endp|10.21.34.151:1720|OpenH323 MCU v2.2.1:h323_ID|GnuGk;
Any help can enlighten me...
Thx.
It looks like your GnuGk can't decode one of the H.245 messages. Are you using the latest version (2.3.4) ?
This might be something to ask on the GnuGk mailinglist (subscribe through www.gnugk.org).

App runs fine in iOS Simulator, crashes on device

My monotouch iPhone/iPod app (named Assement) runs fine in the iOS simulator, no warnings and no errors anywhere. However when I deploy it to a device, it crashes immediately on startup.
I took a look a the crash dump (complete .crash file can be downloaded here), but it doesn't even look like it gets out of Application.Main():
14 Assessment 0x002a0ffc mono_handle_exception (mini-exceptions.c:1831)
15 Assessment 0x002c64cc mono_arm_throw_exception (exceptions-arm.c:158)
16 Assessment 0x00197cc4 throw_exception + 4018 CoreFoundation 0x000a4daa __handleUncaughtException + 206
--> 17 Assessment 0x003fda68 monotouch_exception_handler (monotouch-glue.m:834)
--> 18 CoreFoundation 0x000a4daa __handleUncaughtException + 206
19 libobjc.A.dylib 0x000088cc _objc_terminate + 148
20 libstdc++.6.dylib 0x00063100 __cxxabiv1::__terminate(void (*)()) + 76
21 libstdc++.6.dylib 0x00063178 std::terminate() + 16
22 libstdc++.6.dylib 0x000632a0 __cxa_throw + 100
23 libobjc.A.dylib 0x00006f28 objc_exception_throw + 104
24 CoreFoundation 0x000a4abc +[NSException raise:format:arguments:] + 64
25 CoreFoundation 0x000a4af0 +[NSException raise:format:] + 24
26 UIKit 0x00290af8 -[UINib instantiateWithOwner:options:] + 1724
27 UIKit 0x00292638 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 132
28 UIKit 0x00051b10 -[UIApplication _loadMainNibFile] + 136
29 UIKit 0x0004b9e4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 248
30 UIKit 0x000052dc -[UIApplication handleEvent:withNewEvent:] + 1468
31 UIKit 0x00004b14 -[UIApplication sendEvent:] + 60
32 UIKit 0x000043ac _UIApplicationHandleEvent + 6816
33 GraphicsServices 0x00005c80 PurpleEventCallback + 1040
34 CoreFoundation 0x000365c4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 22
35 CoreFoundation 0x00036582 __CFRunLoopDoSource1 + 158
36 CoreFoundation 0x0002882e __CFRunLoopRun + 574
37 CoreFoundation 0x00028504 CFRunLoopRunSpecific + 220
38 CoreFoundation 0x00028412 CFRunLoopRunInMode + 54
--> 39 UIKit 0x0004a54c -[UIApplication _run] + 540
--> 40 UIKit 0x00047550 UIApplicationMain + 964
--> 41 Assessment 0x00024bcc wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 232
--> 42 Assessment 0x001e9420 X2_AssessmentApp_Application_Main_string__ + 144
43 Assessment 0x001673f8 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 192
Application.Main is the standard one that is generated when the project is created (Neither code below works, the namespace-qualified commented version has the same result):
namespace XXXXXX.App //anonymized
{
public class Application
{
static void Main (string[] args)
{
//UIApplication.Main(args, null, "XXXXXX.App.AppDelegate");
UIApplication.Main(args, null, "AppDelegate");
}
}
// The name AppDelegate is referenced in the MainWindow.xib file.
public partial class AppDelegate : UIApplicationDelegate
{
// This method is invoked when the application has loaded its UI and its ready to run
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
System.Console.WriteLine("Finished Launching"); ...
Am I correct in assuming that it is failing when loading the main nib? That would just be simply MainWindow.xib, again out-of-the-box, as the first thing I do in the UIApplicationDelegate.FinishedLaunching() method is load my own viewcontroller and view... I would almost expect that there could be an error in that code, but it's not even getting that far.
Environment:
MonoTouch Professional 3.2.6
MonoDevelop 2.4.2 release 20402004
iPod Touch 2nd Gen (4.2.1)
Anyone have any ideas?
Goeff lead me to the correct answer.
I had somehow changed the MainWindow.xib build action from Page to Content.... Completely user error.
The Console log for the device clearly stated the problem (unlike the crash dump):
<Notice>: Unhandled Exception: MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Could not load NIB in bundle: 'NSBundle </var/mobile/Applications/11DD588C-E16C-499D-AE0C-E56F59D90391/Assessment.app> (loaded)' with name 'MainWindow'

application terminates after this error message in Console : terminate called after throwing an instance of 'NSException'

kill
quit
The Debugger has exited with status 0.
[Session started at 2011-03-18 14:27:30 +0530.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Wed Jul 21 10:53:12 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 4478.
2011-03-18 14:27:32.460 TabBarAndNav[4478:207] WARNING: Using legacy cell layout due to delegate implementation of tableView:accessoryTypeForRowWithIndexPath: in <MoviesListViewController: 0x5f319a0>. Please remove your implementation of this method and set the cell properties accessoryType and/or editingAccessoryType to move to the new cell layout behavior. This method will no longer be called in a future release.
2011-03-18 14:27:34.400 TabBarAndNav[4478:207] WARNING: Using legacy cell layout due to delegate implementation of tableView:accessoryTypeForRowWithIndexPath: in <Community: 0x5f37a50>. Please remove your implementation of this method and set the cell properties accessoryType and/or editingAccessoryType to move to the new cell layout behavior. This method will no longer be called in a future release.
2011-03-18 14:27:45.272 TabBarAndNav[4478:207] -[TestFile <null selector>]: unrecognized selector sent to instance 0x5f38ff0
2011-03-18 14:27:45.277 TabBarAndNav[4478:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TestFile <null selector>]: unrecognized selector sent to instance 0x5f38ff0'
*** Call stack at first throw:
(
0 CoreFoundation 0x02515b99 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0266540e objc_exception_throw + 47
2 CoreFoundation 0x025176ab -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x024872b6 ___forwarding___ + 966
4 CoreFoundation 0x02486e72 _CF_forwarding_prep_0 + 50
5 Foundation 0x0004221a __NSFireDelayedPerform + 441
6 CoreFoundation 0x024f6f73 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
7 CoreFoundation 0x024f85b4 __CFRunLoopDoTimer + 1364
8 CoreFoundation 0x02454dd9 __CFRunLoopRun + 1817
9 CoreFoundation 0x02454350 CFRunLoopRunSpecific + 208
10 CoreFoundation 0x02454271 CFRunLoopRunInMode + 97
11 GraphicsServices 0x02d7000c GSEventRunModal + 217
12 GraphicsServices 0x02d700d1 GSEventRun + 115
13 UIKit 0x002d1af2 UIApplicationMain + 1160
14 TabBarAndNav 0x00002004 main + 102
15 TabBarAndNav 0x00001f95 start + 53
16 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
(gdb)
Look at the following lines in the console message,
2011-03-18 14:27:45.272 TabBarAndNav[4478:207] -[TestFile <null selector>]: unrecognized selector sent to instance 0x5f38ff0
2011-03-18 14:27:45.277 TabBarAndNav[4478:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TestFile <null selector>]: unrecognized selector sent to instance 0x5f38ff0'
It says that your calling a selector for TestFile object.

Resources