Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppCenter SDK Analytics.TrackEvent() throws errors on Xamarin.iOS 14 #1445

Closed
KennyDM opened this issue Sep 22, 2020 · 25 comments
Closed

AppCenter SDK Analytics.TrackEvent() throws errors on Xamarin.iOS 14 #1445

KennyDM opened this issue Sep 22, 2020 · 25 comments
Labels

Comments

@KennyDM
Copy link

KennyDM commented Sep 22, 2020

Description

Since we moved to Xamarin.iOS 14 , we are experiencing issues when using Analytics.TrackEvent(), which were not there on the previous versions of Xamarin.iOS.

Repro Steps

  1. Create a simple iOS app that is integrating with the AppCenter SDK version 3.4.2 (Xamarin.iOS)
  2. Use event tracking to track a simple event, for example: Analytics.TrackEvent("test",null);
  3. Build and run the app on Xamarin.iOS 14. This issue does not occur with previous versions of Xamarin.iOS
  4. The TrackEvent() call throws the following error on any call to the method, with any parameter possible.

Objective-C exception thrown. Name: NSInvalidArgumentException Reason: +[MSAnalytics trackEvent:withProperties:]: unrecognized selector sent to class 0x1fa831430

Details

  1. What is your app platform (Xamarin.Android or Xamarin.iOS or UWP)?
    • e.g. Xamarin.iOS
  2. If using Xamarin.Forms or if using portable/shared code to call our SDK APIs, are you using shared project, PCL code or .NET standard code for the application? Which .NET standard version or which PCL profile?
    • NET standard 2.0.
  3. Which SDK version are you using?
    • e.g. 3.4.2
  4. Which OS version did you experience the issue on?
    • e.g. iOS 14
  5. What device version did you see this error on? Were you using an emulator or a physical device?
    • e.g. iPhone 6s physical device
  6. What third party libraries are you using?
    • N/A
  7. Please enable verbose logging for your app using AppCenter.LogLevel = LogLevel.Verbose before your call to AppCenter.Start(...) and include the logs here:

Objective-C exception thrown. Name: NSInvalidArgumentException Reason: +[MSAnalytics trackEvent:withProperties:]: unrecognized selector sent to class 0x1fa831430
Native stack trace:
0 CoreFoundation 0x00000001a39f0128 F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 1155368
1 libobjc.A.dylib 0x00000001b7216cb4 objc_exception_throw + 56
2 CoreFoundation 0x00000001a3904e6c F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 192108
3 CoreFoundation 0x00000001a39f2758 F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 1165144
4 CoreFoundation 0x00000001a39f46cc _CF_forwarding_prep_0 + 92
5 QPark.MobilePark.iOS 0x000000010977bb34 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 112842028
6 QPark.MobilePark.iOS 0x0000000109775b7c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 112817524
7 QPark.MobilePark.iOS 0x0000000109774874 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 112812652
8 QPark.MobilePark.iOS 0x00000001030f89b0 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 5350312
9 QPark.MobilePark.iOS 0x0000000103355850 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7828040
10 QPark.MobilePark.iOS 0x0000000103355564 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827292
11 QPark.MobilePark.iOS 0x00000001033557d8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827920
12 QPark.MobilePark.iOS 0x000000010331e05c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7600724
13 QPark.MobilePark.iOS 0x000000010331de5c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7600212
14 QPark.MobilePark.iOS 0x000000010335bab8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7853232
15 QPark.MobilePark.iOS 0x00000001033556f0 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827688
16 QPark.MobilePark.iOS 0x00000001033555c8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827392
17 QPark.MobilePark.iOS 0x0000000103327db8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7641008
18 QPark.MobilePark.iOS 0x0000000103bec800 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 16835064
19 QPark.MobilePark.iOS 0x0000000103329e78 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7649392
20 QPark.MobilePark.iOS 0x0000000103a18f10 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 14919944
21 QPark.MobilePark.iOS 0x000000010983ce14 mono_pmip + 28148
22 QPark.MobilePark.iOS 0x00000001098f9de4 mono_pmip + 802244
23 QPark.MobilePark.iOS 0x000000010993d430 mono_pmip + 1078288
24 QPark.MobilePark.iOS 0x000000010993ad0c mono_pmip + 1068268
25 QPark.MobilePark.iOS 0x00000001099464a4 mono_pmip + 1115268
26 QPark.MobilePark.iOS 0x0000000109946328 mono_pmip + 1114888
27 libsystem_pthread.dylib 0x00000001e9296b70 _pthread_start + 288
28 libsystem_pthread.dylib 0x00000001e929b880 thread_start + 8

Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: +[MSAnalytics trackEvent:withProperties:]: unrecognized selector sent to class 0x1fa831430
Native stack trace:
0 CoreFoundation 0x00000001a39f0128 F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 1155368
1 libobjc.A.dylib 0x00000001b7216cb4 objc_exception_throw + 56
2 CoreFoundation 0x00000001a3904e6c F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 192108
3 CoreFoundation 0x00000001a39f2758 F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 1165144
4 CoreFoundation 0x00000001a39f46cc _CF_forwarding_prep_0 + 92
5 QPark.MobilePark.iOS 0x000000010977bb34 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 112842028
6 QPark.MobilePark.iOS 0x0000000109775b7c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 112817524
7 QPark.MobilePark.iOS 0x0000000109774874 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 112812652
8 QPark.MobilePark.iOS 0x00000001030f89b0 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 5350312
9 QPark.MobilePark.iOS 0x0000000103355850 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7828040
10 QPark.MobilePark.iOS 0x0000000103355564 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827292
11 QPark.MobilePark.iOS 0x00000001033557d8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827920
12 QPark.MobilePark.iOS 0x000000010331e05c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7600724
13 QPark.MobilePark.iOS 0x000000010331de5c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7600212
14 QPark.MobilePark.iOS 0x000000010335bab8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7853232
15 QPark.MobilePark.iOS 0x00000001033556f0 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827688
16 QPark.MobilePark.iOS 0x00000001033555c8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827392
17 QPark.MobilePark.iOS 0x0000000103327db8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7641008
18 QPark.MobilePark.iOS 0x0000000103bec800 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 16835064
19 QPark.MobilePark.iOS 0x0000000103329e78 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7649392
20 QPark.MobilePark.iOS 0x0000000103a18f10 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 14919944
21 QPark.MobilePark.iOS 0x000000010983ce14 mono_pmip + 28148
22 QPark.MobilePark.iOS 0x00000001098f9de4 mono_pmip + 802244
23 QPark.MobilePark.iOS 0x000000010993d430 mono_pmip + 1078288
24 QPark.MobilePark.iOS 0x000000010993ad0c mono_pmip + 1068268
25 QPark.MobilePark.iOS 0x00000001099464a4 mono_pmip + 1115268
26 QPark.MobilePark.iOS 0x0000000109946328 mono_pmip + 1114888
27 libsystem_pthread.dylib 0x00000001e9296b70 _pthread_start + 288
28 libsystem_pthread.dylib 0x00000001e929b880 thread_start + 8

at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:407
at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/runtime/Delegates.generated.cs:128
at (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr)
at (wrapper managed-to-native) ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr(intptr,intptr,intptr,intptr)
at Microsoft.AppCenter.Analytics.iOS.Bindings.MSAnalytics.TrackEvent (System.String eventName, Foundation.NSDictionary properties) [0x00020] in <956beacb74264aa6a825ca9cd7b094aa>:0
at Microsoft.AppCenter.Analytics.Analytics.TrackEvent (System.String name, System.Collections.Generic.IDictionary`2[TKey,TValue] properties) [0x0000a] in <5a9e1f22609148d9acf10da2d1e94b5c>:0
at QPark.MobilePark.iOS.Abstractions.IOSAppCenterAnalyticsProvider+<>c__DisplayClass4_0.b__0 () [0x00002] in /Users/kennydm/Documents/Source Control/QPark/QPark.MobilePark/QPark.MobilePark.iOS/Abstractions/IOSAppCenterAnalyticsProvider.cs:31
--- End of stack trace from previous location where exception was thrown ---

at (wrapper managed-to-native) ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr(intptr,intptr,intptr,intptr)
at Microsoft.AppCenter.Analytics.iOS.Bindings.MSAnalytics.TrackEvent (System.String eventName, Foundation.NSDictionary properties) [0x00020] in <956beacb74264aa6a825ca9cd7b094aa>:0
at Microsoft.AppCenter.Analytics.Analytics.TrackEvent (System.String name, System.Collections.Generic.IDictionary`2[TKey,TValue] properties) [0x0000a] in <5a9e1f22609148d9acf10da2d1e94b5c>:0
at QPark.MobilePark.iOS.Abstractions.IOSAppCenterAnalyticsProvider+<>c__DisplayClass4_0.b__0 () [0x00002] in /Users/kennydm/Documents/Source Control/QPark/QPark.MobilePark/QPark.MobilePark.iOS/Abstractions/IOSAppCenterAnalyticsProvider.cs:31 0 CoreFoundation 0x00000001a39f0128 F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 1155368
1 libobjc.A.dylib 0x00000001b7216cb4 objc_exception_throw + 56
2 CoreFoundation 0x00000001a3904e6c F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 192108
3 CoreFoundation 0x00000001a39f2758 F80FCA31-BF76-3293-8BC6-1729588AE8B6 + 1165144
4 CoreFoundation 0x00000001a39f46cc _CF_forwarding_prep_0 + 92
5 QPark.MobilePark.iOS 0x000000010977bb34 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 112842028
6 QPark.MobilePark.iOS 0x0000000109775b7c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 112817524
7 QPark.MobilePark.iOS 0x0000000109774874 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 112812652
8 QPark.MobilePark.iOS 0x00000001030f89b0 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 5350312
9 QPark.MobilePark.iOS 0x0000000103355850 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7828040
10 QPark.MobilePark.iOS 0x0000000103355564 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827292
11 QPark.MobilePark.iOS 0x00000001033557d8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827920
12 QPark.MobilePark.iOS 0x000000010331e05c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7600724
13 QPark.MobilePark.iOS 0x000000010331de5c ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7600212
14 QPark.MobilePark.iOS 0x000000010335bab8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7853232
15 QPark.MobilePark.iOS 0x00000001033556f0 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827688
16 QPark.MobilePark.iOS 0x00000001033555c8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7827392
17 QPark.MobilePark.iOS 0x0000000103327db8 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7641008
18 QPark.MobilePark.iOS 0x0000000103bec800 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 16835064
19 QPark.MobilePark.iOS 0x0000000103329e78 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 7649392
20 QPark.MobilePark.iOS 0x0000000103a18f10 ZN9GMSx_absl13base_internal10AtomicHookIPFvPKciS3_S3_S3_EE13DummyFunctionES3_iS3_S3_S3 + 14919944
21 QPark.MobilePark.iOS 0x000000010983ce14 mono_pmip + 28148
22 QPark.MobilePark.iOS 0x00000001098f9de4 mono_pmip + 802244
23 QPark.MobilePark.iOS 0x000000010993d430 mono_pmip + 1078288
24 QPark.MobilePark.iOS 0x000000010993ad0c mono_pmip + 1068268
25 QPark.MobilePark.iOS 0x00000001099464a4 mono_pmip + 1115268
26 QPark.MobilePark.iOS 0x0000000109946328 mono_pmip + 1114888
27 libsystem_pthread.dylib 0x00000001e9296b70 _pthread_start + 288
28 libsystem_pthread.dylib 0x00000001e929b880 thread_start + 8

@ivanicin
Copy link

ivanicin commented Sep 22, 2020

Actually as of today Xamarin.iOS 14.00 has been released and this is happening.

Though for me it is happening even on this line (if I omit Analytics and try that TrackEvent then I have the same result):
Microsoft.AppCenter.AppCenter.Start("mystring", typeof(Microsoft.AppCenter.Analytics.Analytics), typeof(Microsoft.AppCenter.Crashes.Crashes));

It results in:
SpeechCentral.iOS[3070:1164318] +[MSAnalytics sharedInstance]: unrecognized selector sent to class 0x206a85430

If one organisation worked even remotely professionally, this couldn't happen, this could be tested for few months by now. So I have no idea whether this will be taken as a serious issue or the 'we don't care' approach will just continue.

But it would be nice if we could get some feedback to switch to something else if this is not expected to work very soon.

@ivanicin
Copy link

Also of note, it seems that this is happening only if this is both compiled on Xamarin.iOS 14 and deployed on iOS 14 device, in all other cases it still works (even on iOS 14 simulator!), but very soon this will be majority of cases.

@KennyDM KennyDM changed the title AppCenter SDK Analytics.TrackEvent() throws errors on Xamarin.iOS 13.99 AppCenter SDK Analytics.TrackEvent() throws errors on Xamarin.iOS 14 Sep 23, 2020
@KennyDM
Copy link
Author

KennyDM commented Sep 23, 2020

Actually as of today Xamarin.iOS 14.00 has been released and this is happening.

You are right, I was mistaken in version, for me it is also with Xamarin.iOS 14, deployed on iOS 14. I corrected the original post.

I agree that this is unfortunate to see these kinds of errors in this stage of the release cycle, if we want to release our next version to the public, we are having zero analytics and diagnostics capabilities.

@Jamminroot
Copy link
Contributor

Hey, thanks for bringing this to our sight. We are currently working on this issue, and I'll report back here once it is addressed.

@ianthetechie
Copy link

Geez, how does this stuff keep happening? MS should be paying us to work with Xamarin. This is incredibly unprofessional and getting old fast.

@nbsoftware
Copy link

Hit by the bug too. I must admit I'm a bit astonished to say the least and don't understand how this can happen.
Come on guys, you're Microsoft right?
Very disappointing.

@mmunchandersen
Copy link

We have this too. It appears only to happen when we use both Crashes and Analytics.
Using either Crashes or Analytics we don't have the crash.

@mark0wnik
Copy link

Happens to crash in my project too :/ Seems like iOS14-related, wasn't happening in xcode-12-beta/ios-14-beta though (we have tested earlier versions to check for upcoming problems).

@ivanicin
Copy link

@Jamminroot pleaase provide us with estimate when this will be fixed. There are many developers blocked by this (and there will be many many more) and if we have estimate we can decide what to do next - if you can fix it in a week I guess most devs will wait, but if it is a month most devs will find whatever alternative they can.

Also please try to provide an estimate in some reasonable time period (like today or tomorrow) as this is the thing that already shouldn't happen, so it is very necessary to restore the trust by acting professionally.

@Jamminroot
Copy link
Contributor

My apologies for inconvinience, I assure you - we're actively working on this (not like this work item is stuck in sorting \ triaging).

As of fix - I'll I will leave an update in this thread upon further progress. No ETA for now - but I don't think it should be all too long.

As for fixed release - we'll release the fix as soon as PR with the fix is merged.

@MatkovIvan MatkovIvan added bug and removed support labels Sep 24, 2020
@AndyNetDuma
Copy link

I am getting the same issue just running start. Hope it's fixed very soon as I want to prep a release soon

@rpendleton
Copy link

rpendleton commented Sep 25, 2020

I've posted an explanation of why this is happening in #1446. The root cause is that the App Center SDK uses a two-letter class prefix, which Apple has documented as being reserved for Apple's use only. That's also causing apps to be rejected by Apple since they now refer to classes from private frameworks.

To fix this issue, all classes should be switched from using the MS class prefix (which overlaps with Apple's private MailServices framework) and changed to something that's three characters instead.

@nunohorta
Copy link

@rpendleton thank you for the explanation. Is there anything you've managed to do to get things going besides changing the target version for iOS 13 or waiting for MS to change the two-letter class prefix? I believe this is affecting people differently and in my case is when the app starts when calling AppCenter.Start, so the app just crashes right away. The exception is the same as describe by you in #1446

@BillFulton
Copy link

In this scenario I also get the same crash when I build and run in debug mode on a physical device running iOS14. However when I repeat in release mode, the app just runs.

In debug mode on iOS 12.4, the app runs as expected.

@mmunchandersen reported above that omitting either crashes or analytics in start avoided the problem - did not do so in my case.

What a showstopper!

Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: +[MSAnalytics trackEvent:withProperties:]: unrecognized selector sent to class 0x1f49e0430

@MatkovIvan
Copy link
Contributor

@BillFulton yep, in release mode it works. It's because of the linker setting. Setting it to "Link SDK assemblies only" fixes the crash in Debug mode too.

However, I doubt that it helps with #1466. So, I wouldn't call it as workaround.

@mmunchandersen
Copy link

mmunchandersen commented Sep 25, 2020

In this scenario I also get the same crash when I build and run in debug mode on a physical device running iOS14. However when I repeat in release mode, the app just runs.

In debug mode on iOS 12.4, the app runs as expected.

@mmunchandersen reported above that omitting either crashes or analytics in start avoided the problem - did not do so in my case.

What a showstopper!

Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: +[MSAnalytics trackEvent:withProperties:]: unrecognized selector sent to class 0x1f49e0430

We had to target iOS version to 13 to avoid the crash at startup. Our initial "fix" turned out not to be a proper fix

@jbachelor
Copy link

Same issue here.

@rpendleton
Copy link

Is there anything you've managed to do to get things going

@nunohorta Unfortunately not. Even if you get things running, I think it's still likely you'll get the ITMS rejection mentioned in #1446 due to the MS* classes. In the meantime, my team has just been disabling our App Center integration for debug builds so that we can continue to work.

We're planning on submitting a build to Apple sometime today or Monday that will still include the App Center SDK, so we'll see if we get a rejection notice as well or if Apple has relaxed the restriction since #1446 was logged. We don't have high hopes though, so we've told our product management team that they'll likely need to plan on pushing our release (which was scheduled for Wednesday) until Microsoft releases an officially fixed SDK.

@BillFulton
Copy link

Thanks @MatkovIvan - changing the linker setting did allow me to continue debugging.

@MatkovIvan
Copy link
Contributor

Hi there. We've just released 3.4.3 with a hotfix for this issue.
In this patch, only MSAnalytics is renamed to MSACAnalytics to avoid conflict with Apple's private framework. It should solve the problem and unblock you. Changing the prefix for all classes requires more time and introduces breaking changes for Objective-C/Swift so it will be a bump of major version for iOS SDK.

Please check it out and let us know if you have any issues with the new version.
Thanks.

@KennyDM
Copy link
Author

KennyDM commented Sep 28, 2020

Please check it out and let us know if you have any issues with the new version.

We will try it today and keep you posted, thanks.

@MatkovIvan
Copy link
Contributor

Closing this for now, but feel free to comment or reopen if the problem is still here or you have any questions.

@fraxedas
Copy link

I just tried 3.4.3 and the error is gone.

@MitchBomcanhao
Copy link

@MatkovIvan would it possible to do a similar fix for the 2.6.X versions of appcenter packages?
We cannot update to v3 packages due to multiplatform dependency issues and this is suddenly a massive blocker for us...

@MatkovIvan
Copy link
Contributor

@MitchBomcanhao No, the next release will be 4.0, we don't have plans to release any 2.*. Please open support ticket or separate issue with the problem that prevents you to update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests