microsoftconnect/ms-intune-app-sdk-android

[.NET MAUI] App crash with error "JNI DETECTED ERROR IN APPLICATION" if Company portal app is installed on the device

PramodKumarHK89 opened this issue · 5 comments

Intune Android App SDK for .NET MAUI Issue

Summary

The app crashes with the below error if company portal is installed on the device.

JNI DETECTED ERROR IN APPLICATION: JNI ERROR (app bug): jobject is an invalid JNI transition frame reference: 0x79c073f9ee50 (use of invalid jobject)

App doesn't crash if I uninstall the company portal app. But of course, MAM doesn't apply.

Details

  • Microsoft.Intune.Maui.Essentials.android Version: : I'm using the latest prerelease but, version doesn't seem to affect the behaviour as I tried with 2 versions below as well.
  • Operating System (Mac, Linux, Windows) and Version: Pixel 7 PRO emulator with API 34
  • Visual Studio Version: Latest VS 2022.

Logs

Company Portal Logs

PowerLift ID:
S4UQ9Y6G

NuGet Dependencies

If your app includes third-party NuGet libraries, please list them here: Latest MSAL.NET reference

Questions to Ask Before Submission

  1. Does the app build and launch without including the Microsoft.Intune.Maui.Essentials.android package? Yes
  2. Does the issue reproduce if you rebuild after deleting the bin and obj output folders?N/A
  3. Have you checked the .NET MAUI repository for similar issues? If so, please follow the guidance there or add that information to this issue. yes, there are no such incidents.
  4. Are you using the latest Microsoft.Intune.Maui.Essentials.android NuGet package version? Yes.

Hi @PramodKumarHK89, are you using Fast Deploy to build your app?

Yes. I was using the fast deployment option. I flipped the switch NOT to use fast deployment, but the result is same.

Did you also set [Application(Debuggable = false)] in your MainApplication file?

By switching off the fast deployment and adding _[Application(Debuggable = false)]_seem to resolve the issue. Thanks

Great, closing this issue as resolved.