AppCenter 崩溃和 Firebase Crashlytics - 两者都不起作用 - Xamarin.Forms iOS
Posted
技术标签:
【中文标题】AppCenter 崩溃和 Firebase Crashlytics - 两者都不起作用 - Xamarin.Forms iOS【英文标题】:AppCenter Crashes and Firebase Crashlytics - Both Together Not Working - Xamarin.Forms iOS 【发布时间】:2021-02-24 05:11:09 【问题描述】:尝试在单个应用程序中集成 Firebase Crashlytics 和 AppCenter Crashs。我明白了,这些都无法记录任何崩溃。
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
global::Xamarin.Forms.Forms.Init();
Firebase.Core.App.Configure();
Crashlytics.SharedInstance.Init();
AppCenter.Start("xxxxxxxxxxxxxxxxxxxx", typeof(Analytics), typeof(Crashes));
LoadApplication(new App());
return base.FinishedLaunching(app, options);
另外,我正在使用最新的 SDK。
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1451" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
<PackageReference Include="Microsoft.AppCenter.Analytics">
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Crashes">
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Firebase.ios.Core">
<Version>6.10.4</Version>
</PackageReference>
<PackageReference Include="Xamarin.Firebase.iOS.Crashlytics">
<Version>4.6.2</Version>
</PackageReference>
</ItemGroup>
另外,从 Visual Studio 控制台日志中,我收到以下错误日志。
[Crashlytics] The signal SIGABRT has a non-Crashlytics handler (sigabrt_signal_handler). This will interfere with reporting. 2021-02-24 12:26:30.173858+0530 DemoApp.iOS[12308:580294] 6.34.0 -
[Firebase/Crashlytics][I-CLS000000] Warning: NSUncaughtExceptionHandler is '_ZL17exception_handlerP11NSException' in '/Users/sakeridilipkumar/Library/Developer/CoreSimulator/Devices/CC5157E9-F6A5-46D8-BA9E-B2D67936538D/data/Containers/Bundle/Application/41E5D8C0-19FC-474C-84B9-EDFC5C9B024A/DemoApp.iOS.app/DemoApp.iOS'
[Crashlytics] The signal SIGBUS has a non-Crashlytics handler (mono_sigsegv_signal_handler). This will interfere with reporting.
[Crashlytics] The signal SIGFPE has a non-Crashlytics handler (mono_sigfpe_signal_handler). This will interfere with reporting.
[Crashlytics] The signal SIGILL has a non-Crashlytics handler (mono_crashing_signal_handler). This will interfere with reporting.
[Crashlytics] The signal SIGSEGV has a non-Crashlytics handler (mono_sigsegv_signal_handler). This will interfere with reporting.
[Crashlytics] The signal SIGSYS has a non-Crashlytics handler (mono_crashing_signal_handler). This will interfere with reporting.
[Crashlytics] The signal SIGTRAP has a non-Crashlytics handler (MSplcrash_signal_handler). This will interfere with reporting.
任何寻找根本原因的建议都是值得赞赏的。
【问题讨论】:
您是否在App.xaml.cs
文件的OnStart()
方法中添加了AppCenter.Start("ios=Your App Secret;android=Your App Secret;uwp=Your App Secret;windowsdesktop=Your App Secret", typeof(Analytics), typeof(Crashes));
。
据我所知,在 iOS 中 Crashlytics 不支持多个崩溃报告框架,因为可能存在冲突,您最后的日志似乎是对此的引用。
【参考方案1】:
解决了。
我只保留了以下软件包,它开始工作了。我还需要上传 dSYM 文件才能上传。请上传存档时生成的相同 dSYM。
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1451" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
<PackageReference Include="Microsoft.AppCenter.Analytics">
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Firebase.iOS.Core">
<Version>6.10.4</Version>
</PackageReference>
<PackageReference Include="Xamarin.Firebase.iOS.Crashlytics">
<Version>4.6.2</Version>
</PackageReference>
</ItemGroup>
【讨论】:
等等。Appcenter.Crashes
nuget 在哪里?以上是关于AppCenter 崩溃和 Firebase Crashlytics - 两者都不起作用 - Xamarin.Forms iOS的主要内容,如果未能解决你的问题,请参考以下文章
在 Xamarin Forms iOS 中启用 AppCenter 崩溃和分析时,本机链接失败,重复符号:“_cxa+throw”
我需要在每个 Activity 的 OnCreate 中启动 AppCenter 还是仅在第一个中启动 AppCenter?