Skip to content

FATAL: Unity 2022.2.11 broke native Android crash reporting #536

@Tommigun1980

Description

@Tommigun1980

Description

https://unity.com/releases/editor/whats-new/2022.2.11 contains the "fix":
“Android: Unity will no longer wrap native crashes into java exceptions on Android, as has been the case, and will correctly forward signals to the previous handlers.”

This seems to have broken native crash reporting on Android.

Newer Unity versions no longer print

06-09 01:21:59.724 13024 13052 D AppCenterCrashes: Saving uncaught exception.
06-09 01:21:59.726 13024 13052 D AppCenterCrashes: Saved JSON content for ingestion into /data/user/0/com.ACompanyNme.CrashMaster/files/error/200b8936-b830-4c68-8e3d-d55270b9dbb9.json
06-09 01:21:59.726 13024 13047 D AppCenter: Cleared pending log states
06-09 01:21:59.727 13024 13047 D AppCenter: Channel completed shutdown.

when the app crashes, and Crashes.HasCrashedInLastSessionAsync() never returns true.
Reverting to an older Unity version fixes the issue.

Older Unity versions perform some logging from Unity's AndroidRuntime when an app crashes, after which AppCenter saves the exception. Newer Unity versions don't do this, instead they log about forwarding signals, and AppCenter never saves the crash.

This is of course a fatal issue as newer Unity versions contain mandatory fixes but are incompatible with AppCenter. In other words the later Unity releases are incompatible with AppCenter. Is there an ETA for a fix and an emergency patch release?

Thank you.

Repro Steps

Please list the steps used to reproduce your issue.

  1. Integrate the AppCenter SDK to a fresh Unity project, or use an existing Unity project that has the AppCenter SDK integrated.
  2. Use a pre-2022.2.11 Unity version (I used 2022.2.7), invoke a native crash on Android and verify that the crash report appears in the AppCenter dashboard.
  3. Update Unity to 2022.2.11 or later (I used 2022.2.19), invoke a native crash on Android and verify that the crash report does not appear in the AppCenter dashboard.

I am pretty sure Unity 2022.2.11 is the exact version that broke it, but I did not explicitly verify this.

Details

  1. Which SDK version are you using?
    • Latest Unity SDK release
  2. Which platform did you experience the issue on?
    • Android
  3. What device version did you see this error on? Were you using an emulator or a physical device?
    • Any
  4. What third party plugins are you using?
  5. Please enable verbose logging for your app using Initial Log Level setting and include the logs here:
    AC_NEW.txt
    AC_OLD.txt
  6. Please share a screenshot of App Center Settings (without app secrets)
  7. Please share a screenshot of Build and Player Settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions