Plugin.Firebase: Crashlytics does not start with .NET 8

I’ve recently upgraded a project where Crashlytics was working fine.

Now when I run the project I am getting following errors:

[I-CLS000000] Crashlytics could not find the symbol for the app's main function and cannot start up. This can happen when Exported Symbols File is set in Build Settings. To resolve this, add "__mh_execute_header" as a newline to your Exported Symbols File.

[I-CLS000000] Crash reporting could not be initialized

I double checked that strip symbols option was not enabled also tried adding <DebugType>full</DebugType> but still the same issue.

Any idea on what might be the issue ?

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 21 (3 by maintainers)

Most upvoted comments

@miguelpxkadinha I was able to fix it adding this to the iOS project file (take into account that my project is a native Xamarin.iOS project so you might need to make it fit for Maui)

 <ItemGroup>
        <_ReferencesLinkerFlags Include="-u__mh_execute_header" Visible="false" />
        <_CustomLinkFlags Include="-exported_symbols_list" Visible="false" />
        <_CustomLinkFlags Include="symbols.list" Visible="false" />
 </ItemGroup

Where symbols.list is a file in the root of my iOS project that contains this

__mh_execute_header

I’m not 100% sure if this part is required

        <_ReferencesLinkerFlags Include="-u__mh_execute_header" Visible="false" />

It was at some point to fix a different similar issue with another symbol

Did anyone find solution about this problem? I am constantly getting

{Java.Lang.IllegalStateException: The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.--- …}

and cannot get around it.

@claudioredi Thank you! I was able to fix the issue following your comment. I had to change it a bit to adapt it to Maui

Like you said, I created a symbols.list (I named it exported_symbols.txt) and added it to the folder Platforms/iOS

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-ios'">
    <_ReferencesLinkerFlags Include="-u__mh_execute_header" Visible="false" />
    <_CustomLinkFlags Include="-exported_symbols_list" Visible="false" />
    <_CustomLinkFlags Include="$(ProjectDir)Platforms/iOS/exported_symbols.txt" Visible="false" />
</ItemGroup>

This still is not working for me either. I have followed all of the steps listed in https://github.com/TobiasBuchholz/Plugin.Firebase/blob/development/docs/crashlytics.md#android-specifics and am still not getting any indication that crashes are being reported on the dashboard.

image

Hi @TobiasBuchholz, I just opened a bug into GoogleApisForiOSComponents here