wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.97k stars 1.32k forks source link

Resources$NotFoundException: Resource ID #0x7f080087 #18546

Closed sentry-io[bot] closed 1 year ago

sentry-io[bot] commented 1 year ago

Sentry Issue: JETPACK-ANDROID-1C1

Resources$NotFoundException: Resource ID #0x7f080087
    at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:215)
    at android.content.res.Resources.getValue(Resources.java:1316)
    at androidx.compose.ui.res.PainterResources_androidKt.painterResource(PainterResources.android.kt:61)
    at org.wordpress.android.ui.accounts.login.components.LoopingTextWithBackgroundKt.LoopingTextWithBackground(LoopingTextWithBackground.kt:30)
    at org.wordpress.android.ui.accounts.login.LoginPrologueRevampedFragmentKt.LoginScreenRevamped(LoginPrologueRevampedFragment.kt:119)
...
(165 additional frame(s) were not displayed)
peril-wordpress-mobile[bot] commented 1 year ago
Fails
:no_entry_sign: Please add a feature label to this issue. e.g. 'Stats'

Generated by :no_entry_sign: dangerJS

sentry-io[bot] commented 1 year ago

Sentry issue: WORDPRESS-ANDROID-2JKE

sentry-io[bot] commented 1 year ago

Sentry issue: JETPACK-ANDROID-719

sentry-io[bot] commented 1 year ago

Sentry issue: JETPACK-ANDROID-7Y7

sentry-io[bot] commented 1 year ago

Sentry issue: JETPACK-ANDROID-7MJ

thomashorta commented 1 year ago

I spent some time investigating this issue and I believe I found some relevant information. I created a Sentry Dashboard for better visualization of the data.

What seems to be happening is that almost all crashes that happened with this signature were from apps installed from a source different than the Google Play Store (com.android.vending), which means those users did not get the app officially. The few crashes that were from com.android.vending install source seem suspicious and might not be the official GP.

Since we distribute the app via AAB this means those users probably installed an APK that was generated for other device (from the AAB) and not for their device configuration (e.g.: a user with a xhdpi phone downloading the mdpi APK) which causes the APK to not have the resource for their configuration, resulting in the Resources$NotFoundException crash in runtime.

irfano commented 1 year ago

To reproduce:

  1. Build Bundle(s) from Android Studio.

  2. Use bundletool to extract apks from aab.

    bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks
  3. Decompress apks. You'll see files like this:

  4. Install base-master.apk.

  5. The app will crash with Resources$NotFoundException.

thomashorta commented 1 year ago

@irfano Thanks for finding out a way for reproducing this crash 🙇 This seems to make sense to me though I still wonder how these users get those partial split APKs.

irfano commented 1 year ago

@irfano Thanks for finding out a way for reproducing this crash 🙇 This seems to make sense to me though I still wonder how these users get those partial split APKs.

There are sites that offer various variants of APKs for WordPress and Jetpacks. Unfortunately, I couldn't find a sample site where I can create the crash, but I believe these sites might be the cause of the crash.

ravishanker commented 1 year ago

Yeah, there're a lot of them. Many of these devices could be from other than major manufacturers like Google, Samsung...

fluiddot commented 1 year ago

I noticed in the devices list associated with the Sentry event that the top one seems to be an emulator (AOSP on IA Emulator). This reinforces the theory that this crash might be produced due to installing a partial variant of the app.

Screenshot 2023-08-11 at 13 13 47
irfano commented 1 year ago

This issue occurred three times in the last two versions (23.0 and 23.1-rc versions). The count is much lower now, but I can't understand why it's still coming. Since the crash count is too low, I won't take any more action for now.