microsoft / appcenter-sdk-dotnet

Development repository for the App Center SDK for .NET platforms, including Xamarin
Other
311 stars 141 forks source link

Xamarin.iOS .Net6 app crashes when call AppCenter.Start #1707

Closed ginger-777 closed 2 years ago

ginger-777 commented 2 years ago

Description

I migrated Xamarin.iOS app to .Net6, using AppCenter 5.0.0 version and when I call AppCenter.Start(actualAppSecret, typeof(Analytics), typeof(Crashes)); app crashes

But for Xamarin.Android .Net6 app everything works fine.

Details

Logs

Exception: System.TypeLoadException: VTable setup of type Microsoft.AppCenter.Analytics.Analytics failed
   at System.RuntimeType.GetPropertiesByName(String name, BindingFlags bindingAttr, MemberListType listType, RuntimeType reflectedType)
   at System.RuntimeType.GetPropertyCandidates(String name, BindingFlags bindingAttr, Type[] types, Boolean allowPrefixLookup)
   at System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
   at System.Type.GetProperty(String name, BindingFlags bindingAttr)
   at System.Type.GetProperty(String name)
   at Microsoft.AppCenter.AppCenter.GetBindingType(Type type)
   at Microsoft.AppCenter.AppCenter.GetServices(IEnumerable`1 services)
   at Microsoft.AppCenter.AppCenter.PlatformStart(String appSecret, Type[] services)
   at Microsoft.AppCenter.AppCenter.Start(String appSecret, Type[] services)
MikhailSuendukov commented 2 years ago

Hi @ginger-777 and thank you for contacting us. Unfortunately, we were unable to reproduce your issue using a sample application. It would be great if you could provide a small demo project that will reproduce this error.

ginger-777 commented 2 years ago

Hmm. Strange in the new empty ios .net6 app I also could not reproduce this crash

MikhailSuendukov commented 1 year ago

Thanks for confirming, please keep us updated on how you resolved the issue in your project.