microsoftconnect / ms-intune-app-sdk-android

Intune App SDK for Android enables data protection features and mobile app management via Microsoft Intune
45 stars 18 forks source link

Crash occurring when using Intune with Realm Java SDK #253

Open paulvaldes opened 2 weeks ago

paulvaldes commented 2 weeks ago

Intune Android App SDK Policy Enforcement Issue - Crash

Questions to Ask Before Submission

  1. Have you completed the exit criteria for each phase in the Intune App SDK for Android Integration Guide? Yes
  2. Have you checked the Microsoft Intune App SDK for Android repository for similar issues? Yes
  3. Are you using the latest version of the SDK? Yes

Summary

We are experiencing an issue using Intune combined with Realm that results in a crash. When the app is used by a user that does not have an Intune policy, no issues/crashes occur.

When a user with an Intune policy logs in, the device is successfully registered and enrolled with Intune and authenticated with our backend.

Once data from the backend starts being written to the Realm files, the app will crash with a Decryption Failed, SIGABRT, or SIGSEGV error when trying to commit a transaction. The first 1-2 transactions will typically commit successfully.

Once the crash occurs, the app will not launch, and results in the app and Intune Company Portal needing to be deleted and re-installed in order for the app to launch again.

Repro Steps

  1. Login to app triggering Intune registration and enrollment
  2. Store data in Realm

Expectation: Data can be written to the Realm files

Observation: App crashes and Realm files are corrupt

Details

Logs

Company Portal Logs

[broker.0.txt](https://github.com/user-attachments/files/17637286/broker.0.txt)

App Logs/Callstack

[app_logs.txt](https://github.com/user-attachments/files/17637280/app_logs.txt)

AndroidX Dependencies

If your app includes any AndroidX libraries, please list them here, along with the version info:

Third-Party Library Dependencies

If your app includes any third-party libraries, please list them here, along with the version info: