microsoftconnect / ms-intune-app-sdk-android

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

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

Closed PramodKumarHK89 closed 10 months ago

PramodKumarHK89 commented 10 months ago

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

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.
Archit-Pikle commented 10 months ago

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

PramodKumarHK89 commented 10 months ago

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

Archit-Pikle commented 10 months ago

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

PramodKumarHK89 commented 10 months ago

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

Archit-Pikle commented 10 months ago

Great, closing this issue as resolved.