microsoft / appcenter-sdk-android

Development repository for the App Center SDK for Android
Other
281 stars 134 forks source link

Crash when installing in app update #1587

Closed R9DCHDC closed 2 years ago

R9DCHDC commented 2 years ago

Description

Got crash report after migrating to 4.4.1

Stacktrace

com.microsoft.appcenter.distribute.InstallerUtils.createIntentSender (InstallerUtils.java:193);
com.microsoft.appcenter.distribute.InstallerUtils.installPackage (InstallerUtils.java:175);
com.microsoft.appcenter.distribute.ReleaseInstallerListener.startInstall (ReleaseInstallerListener.java:101);
com.microsoft.appcenter.distribute.Distribute.installUpdate (Distribute.java:1945);
com.microsoft.appcenter.distribute.Distribute.resumeDistributeWorkflow (Distribute.java:833);
com.microsoft.appcenter.distribute.Distribute.onActivityResumed (Distribute.java:548);
androidx.fragment.app.FragmentActivity.onResume (FragmentActivity.java:433);

Reason

java.lang.IllegalArgumentException: net.dchdc: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

Repro Steps

Do an in app update on Android 12 device.

Details

  1. Which SDK version are you using? 4.4.1
  2. Which OS version did you experience the issue on? Android 12
  3. What device version did you see this error on? Were you using an emulator or a physical device? Physical device
  4. What third party libraries are you using? Not related
  5. Please enable verbose logging for your app using AppCenter.setLogLevel(Log.VERBOSE) before your call to AppCenter.start(...) and include the logs here:
AnastasiaKubova commented 2 years ago

Hi! Thanks for getting in touch with us! I will label this issue as a bug.

AnastasiaKubova commented 2 years ago

Hi! The fix has been released, so I'm going to close this issue. Feel free to reopen it if you will have additional questions.