-
Notifications
You must be signed in to change notification settings - Fork 140
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
Comments
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): It results in: 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. |
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. |
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. |
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. |
Geez, how does this stuff keep happening? MS should be paying us to work with Xamarin. This is incredibly unprofessional and getting old fast. |
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. |
We have this too. It appears only to happen when we use both Crashes and Analytics. |
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). |
@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. |
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. |
I am getting the same issue just running start. Hope it's fixed very soon as I want to prep a release soon |
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 |
@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 |
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!
|
@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. |
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 |
Same issue here. |
@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 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. |
Thanks @MatkovIvan - changing the linker setting did allow me to continue debugging. |
Hi there. We've just released 3.4.3 with a hotfix for this issue. 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. |
Closing this for now, but feel free to comment or reopen if the problem is still here or you have any questions. |
I just tried 3.4.3 and the error is gone. |
@MatkovIvan would it possible to do a similar fix for the 2.6.X versions of appcenter packages? |
@MitchBomcanhao No, the next release will be 4.0, we don't have plans to release any |
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
Analytics.TrackEvent("test",null);
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
AppCenter.LogLevel = LogLevel.Verbose
before your call toAppCenter.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
The text was updated successfully, but these errors were encountered: