Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribute crash when targetSDK is set to android 14 #1709

Closed
npresseault opened this issue Sep 15, 2023 · 17 comments
Closed

Distribute crash when targetSDK is set to android 14 #1709

npresseault opened this issue Sep 15, 2023 · 17 comments
Labels
next-release Will be included in the upcoming release

Comments

@npresseault
Copy link

Description

Distribute crashes when trying to get a version update.
Set your target SDK to 34 (Android 14)

One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when registering the receiver, I believe right here:

mContext.registerReceiver(mInstallStatusReceiver, InstallStatusReceiver.getInstallerReceiverFilter());

Ref: https://developer.android.com/about/versions/14/behavior-changes-14#runtime-receivers-exported

Repro Steps

  1. Set your target SDK to 34 (Android 14)
  2. Receive an app update, app downloads, install but crashes after that.

Details

  1. Which SDK version are you using?
    • 5.0.2
  2. Which OS version did you experience the issue on?
    • Android 14
  3. What device version did you see this error on? Were you using an emulator or a physical device?
    • Pixel 5
  4. What third party libraries are you using?
    • Not relevant
  5. Please enable verbose logging for your app using AppCenter.setLogLevel(Log.VERBOSE) before your call to AppCenter.start(...) and include the logs here:
Fatal Exception: java.lang.SecurityException: xxxxxxxxxxxxxx: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
       at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
       at android.os.Parcel.createException(Parcel.java:3041)
       at android.os.Parcel.readException(Parcel.java:3024)
       at android.os.Parcel.readException(Parcel.java:2966)
       at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5684)
       at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1852)
       at android.app.ContextImpl.registerReceiver(ContextImpl.java:1792)
       at android.app.ContextImpl.registerReceiver(ContextImpl.java:1780)
       at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755)
       at com.microsoft.appcenter.distribute.install.session.SessionReleaseInstaller.registerListeners(SessionReleaseInstaller.java:236)
       at com.microsoft.appcenter.distribute.install.session.SessionReleaseInstaller.install(SessionReleaseInstaller.java)
       at com.microsoft.appcenter.distribute.UpdateInstaller.install(UpdateInstaller.java:93)
       at com.microsoft.appcenter.distribute.Distribute.setInstalling(Distribute.java:1931)
       at com.microsoft.appcenter.distribute.ReleaseDownloadListener$3.run(ReleaseDownloadListener.java:97)
       at android.os.Handler.handleCallback(Handler.java:958)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:205)
       at android.os.Looper.loop(Looper.java:294)
       at android.app.ActivityThread.main(ActivityThread.java:8177)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
@MikhailSuendukov
Copy link
Contributor

Hi @npresseault and thank you for reaching out to us. I was able to reproduce this error, it seems to be related to a change in security protocols in Android SDK version 34. I created a ticket on our dashboard.

@fabiendem
Copy link

fabiendem commented Nov 2, 2023

Hi, can we consider this issue to be covered by #1713 ?
Do you have ETA for the merge?

@ETLopes
Copy link

ETLopes commented Nov 17, 2023

Hi! Just commenting to know if there is any deadline for it?

@avelycure
Copy link

Hello! How are you? Is there any progress in the task?

@troymccabe
Copy link

@MikhailSuendukov with #1713 merged, when can we expect a release with this included?

@keithburgoyne
Copy link

Any chance this will be released soon? Our beta flow is broken for Android 34 devices.

@MikhailSuendukov
Copy link
Contributor

Hi, we have planned to release this week.

@DmitriyKirakosyan DmitriyKirakosyan added next-release Will be included in the upcoming release and removed support labels Dec 6, 2023
@troymccabe
Copy link

@MikhailSuendukov sorry to be a bother, but we're starting to get a ton of feedback as users are updating. I see the tag is created, but when can we expect a release available that gradle can grab?

@DmitriyKirakosyan
Copy link
Contributor

This fix has been released in v5.0.4, so I'm closing this issue. Let me know if updating sdk version doesn't help.

@claudioredi
Copy link

claudioredi commented Mar 7, 2024

@DmitriyKirakosyan I don't see v5.0.4 released yet. Am I missing something?

https://www.nuget.org/packages/Microsoft.AppCenter.Distribute

@claudioredi
Copy link

@fabiendem but it didn't reach nuget, I don't have any update available from 5.0.3. I'm totally lost. Thoughts @keithburgoyne / @DmitriyKirakosyan ?

@MikhailSuendukov
Copy link
Contributor

MikhailSuendukov commented Mar 8, 2024

Hi @claudioredi!
Apparently you are trying to find AppCenter SDK .NET 5.0.4. That this fix has not yet been released for the AppCenter SDK .NET (currently the latest version is 5.0.3), only for the AppCenter SDK Android (5.0.4).

@claudioredi
Copy link

@MikhailSuendukov would you mind sharing a nuget link to AppCenter SDK Android 5.0.4? I'm afraid that I don't find it.

@natevarghese
Copy link

I am also looking for this 5.0.4 Nuget. The same error also affects Crashes and Analytics.
 
Google says the targetSdk will need to be 34+ for new apps and app updates by August 31, 2024. 
https://developer.android.com/google/play/requirements/target-sdk
 
This deadline is significantly before the app center retirement date of March 31, 2025. Without making this Nuget available, it effectually pushes the retirement date up to August 31, 2024.

@DmitriyKirakosyan
Copy link
Contributor

@claudioredi, This repository is for the AppCenter native Android SDK. The latest version available on Maven is 5.0.4. The .NET wrapper, which includes support for Android among other platforms, is hosted in a separate repository and follows separate versioning. The latest available version for the .NET Android SDK is 5.0.3.

@SarthakB26
Copy link

I am also looking for this 5.0.4 Nuget. The same error also affects Crashes and Analytics.   Google says the targetSdk will need to be 34+ for new apps and app updates by August 31, 2024.  https://developer.android.com/google/play/requirements/target-sdk   This deadline is significantly before the app center retirement date of March 31, 2025. Without making this Nuget available, it effectually pushes the retirement date up to August 31, 2024.

did you find any workaround for Xamarin/MAUI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next-release Will be included in the upcoming release
Projects
None yet
Development

No branches or pull requests