expo: [expo-image] [android] Image components render wrong image

Minimal reproducible example

https://gist.github.com/buraks/ed0e69c0267d1c92c9bdb0b61d4e21e7

Summary

On iOS, the exact same code works perfectly fine. However, on Android, we are experiencing the problems of image components getting rendered incorrectly. The blurry image comes from the placeholder, which is 50x50 scaled up to the full space. We have noticed that the placeholders themselves get mixed up as well, not just the full-size image.

We suspect that the Image components get recycled incorrectly on Android.

We have tried updating the expo-image to the latest version: 1.2.2 and the issue remains.

https://github.com/expo/expo/assets/2693237/ec5b05b1-05b0-4084-8459-b233616617bd

Environment

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.3.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.9.0 - ~/.nodenv/versions/18.9.0/bin/node
      Yarn: 1.22.19 - ~/.nodenv/versions/18.9.0/bin/yarn
      npm: 8.19.1 - ~/.nodenv/versions/18.9.0/bin/npm
      Watchman: 2023.03.13.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
      Android SDK:
        API Levels: 30, 31, 32, 33
        Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 32.1.0, 33.0.0, 33.0.1
        System Images: android-32 | Google APIs ARM 64 v8a, android-33 | Google Play ARM 64 v8a
        Android NDK: 24.0.8215888
    IDEs:
      Android Studio: 2022.1 AI-221.6008.13.2211.9514443
      Xcode: 14.3/14E222b - /usr/bin/xcodebuild
    npmGlobalPackages:
      eas-cli: 3.12.1
    Expo Workflow: managed

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@danieljimeneznz Thanks for the update. I switched to FastImage for now because this was causing problems to a lot of our users

Here is the repository I have created: https://github.com/buraks/expo-image-proguard-test

I have updated to the latest expo and expo-image versions. The problem only happens when proguard is enabled, I have tried disabling Proguard and building another release apk, and it works fine. I am now 100% sure that it’s about the proguard.

Here is a video I have recorded:

https://github.com/expo/expo/assets/2693237/5ee4dbbc-6f8c-4be9-b8c4-32c438575d06

FYI @Kudo @tsapeta @EvanBacon

Summary: expo-image misbehaves on Android when Proguard is enabled. You can check the repo

I would be happy to help with fixing it if you can provide me with some pointers, or if you fix it, I would be happy to help with testing.