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

[.NET MAUI] - Application is crashing after Intune wrapper #218

Closed leoslima13 closed 8 months ago

leoslima13 commented 8 months ago

Intune Android App SDK for .NET MAUI Issue

Summary

There's a couple of scenarios of this odd behavior

1- A new device, the user does not have Company Portal installed In that case, the application will correctly handle the Registration for MAM, during this process the app will receive a notification asking for the user to install the Company Portal app. After that, our application will be restarted, and after the restart, we'll acquire the token from MSAL SDK, but during this process the application is crashing for no reason, BUT if the user opens the application again, the app starts to work normally.

2- A device that already has Company Portal installed (not logged in) In that case it much more worse than the previous one, because when the application starts, an Activity, handled by MS Intune SDK, will be displayed and the one of our policies will be applied (PIN), after the user set the PIN, we'll display our Login Page, so the user should enter his credentials, but before MSAL opens the WebView requesting the credentials, the application crashes immediately and never gets back to work, unless I open the Android Settings, go to the Company Portal App and clean all the storage and caches, then the application will request the credentials and the process will flow normally

3- A device that already has Company Portal Installed (logged in) In that case the application will work correctly with no crashes.

I captured the logs and send it to Microsoft, and the log latest log identifier is S87KKTNR from Company Portal

Details

For runtime issues, please include:

log identifier: S87KKTNR (Company Portal)

MSBuild Logs

Company Portal Logs

S87KKTNR

For guidance, see Report a problem in Company Portal or Intune app for Android

NuGet Dependencies

If your app includes third-party NuGet libraries, please list them here:

<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.6" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.6" />
<PackageReference Include="AlohaKit.Animations" Version="1.0.0" />
<PackageReference Include="CommunityToolkit.Maui" Version="5.3.0" />
<PackageReference Include="DryIoc.Microsoft.DependencyInjection.Extension" Version="1.0.0.2" />
<PackageReference Include="IeuanWalker.Maui.Switch" Version="1.0.4" />
<PackageReference Include="LiveChartsCore.SkiaSharpView.Maui" Version="2.0.0-rc2" />
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.2" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.2" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="7.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.57.0" />
<PackageReference Include="Mopups" Version="1.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Polly" Version="7.2.4" />
<PackageReference Include="ReactiveProperty" Version="9.3.1" />
<PackageReference Include="Refit.HttpClientFactory" Version="7.0.0" />
<PackageReference Include="SkiaSharp.Views.Maui.Controls" Version="2.88.7" />
<PackageReference Include="TimePeriodLibrary.NET" Version="2.1.3" />

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? YES
  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.
  4. Are you using the latest Microsoft.Intune.Maui.Essentials.android NuGet package version? YES
Archit-Pikle commented 8 months ago

Hi @leoslima13 I'm not seeing any crash in the provided logs.

Can you please provide separate Powerlift logs for scenarios [1] and [2]?

leoslima13 commented 8 months ago

Hey @Archit-Pikle this is not happening on latest version anymore. This ticket can be closed