sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

[Android] Support dynamic page size for Android 15+ devices

Open markushi opened this issue 1 year ago • 3 comments

Description

Related sentry-native issue: https://github.com/getsentry/sentry-native/issues/989

Android 15 devices with page size 16kb enabled, will face a startup crash when using our Sentry SDK.

As outlined here, https://github.com/getsentry/sentry-native/pull/1028 NDK 27 is required in order to produce 16kb friendly libraries, which in turn requires min SDK level 21 (we're currently on 19)

After some discussion we decided to release this change, including the breaking min. SDK bump, as a minor SDK 7.x.x version - The downside of every app crashing doesn't outweigh sticking to semver, especially when 99% of devices are on 21+ already.

markushi avatar Aug 26 '24 10:08 markushi

related:

  • https://android-developers.googleblog.com/2024/08/adding-16-kb-page-size-to-android.html
  • https://developer.android.com/guide/practices/page-sizes
    • wrt. NDK <=26: https://developer.android.com/guide/practices/page-sizes#compile-r26-lower

kahest avatar Aug 26 '24 12:08 kahest

Hi @markushi,

Does your team already have an estimated date when this will be released? We are preparing our app currently for Android 15 and Sentry not supporting 16kb page sizes yet is currently a blocker for us.

Thx in advance for a reply!

maxoertel avatar Sep 02 '24 09:09 maxoertel

@maxoertel we don't have a specific ETA yet, but we're prioritising this.

kahest avatar Sep 03 '24 07:09 kahest

Hey everyone, quick update: We just shipped a 7.17.0-alpha.1 release of our SDK which provides 16KB page size support. If you have testing capabilities, please give it a try and let us know if the underlying 16KB change works as expected.

markushi avatar Oct 24 '24 14:10 markushi

@maxoertel any chance you could give this a try?

markushi avatar Nov 01 '24 09:11 markushi

@markushi Will check it next week!

maxoertel avatar Nov 01 '24 09:11 maxoertel

@maxoertel did you have any chance to give it a try?

markushi avatar Nov 07 '24 06:11 markushi

@markushi it's planned for tomorrow.

maxoertel avatar Nov 07 '24 06:11 maxoertel

@markushi I gave it a try and looks good, the alignment script now prints ALIGNED. We cannot yet test running on a 16kb emulator, since not yet all our dependencies are 16kb aligned. Once they are I'll let you know, but I would assume if the script prints ALIGNED it should be fine.

Image

Thx for taking this on!

maxoertel avatar Nov 08 '24 08:11 maxoertel

Hey everyone, we've finally shipped this within the 7.18.0 release, or if you're on the bleeding edge within the 8.0.0-beta.2 release.

markushi avatar Nov 19 '24 07:11 markushi

Do we have a timeline on when 7.18.0 would be included in a sentry-dart release, At present app is crashing on launch on devices running Android 15. Or can you suggest any temporary workaround for this. Thanks

naresh-fluidra avatar Nov 21 '24 09:11 naresh-fluidra

@naresh-fluidra it will be one of the next releases - please follow the corresponding issue on sentry-dart: https://github.com/getsentry/sentry-dart/issues/2237

kahest avatar Nov 21 '24 09:11 kahest

@naresh-fluidra You can try out sentry-dart 8.11.0-beta.1 which bumped sentry-java to 7.18.0. We'd love to have some feedback if everything is working as expected.

denrase avatar Nov 25 '24 15:11 denrase

@denrase The crash seems to be gone now, and working as expected. Thanks

naresh-fluidra avatar Nov 26 '24 07:11 naresh-fluidra