react-native
react-native copied to clipboard
React native app upgrade showing icons misplaced in android
Description
We are developing a react-native application. When we uploaded the new version of the current play store app and tried to update the app which is already on the device, then some of the icons are misplaced and it showed the other sections of the app in ANDROID. This is really strange for us. When I deleted the app and reinstall the application it will be fine. But when updating the app the icons are placed somewhere in the app on Android.
Also in iOS, there are no such issues. In the earlier versions, everything was fine in android and it showed weird results on some of the icons while updating the new version.
example:- If I place an icon named "cart" it's supposed to show a cart icon, but instead I'm getting a chat icon. But these icons are what we are showing from the assets folder. The issue is like this link:- (https://github.com/facebook/react-native/issues/29645)
Version
0.66.3
Output of npx react-native info
System: OS: macOS 12.1 CPU: (8) x64 Apple M1 Memory: 27.16 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 17.4.0 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 8.3.1 - /usr/local/bin/npm Watchman: 2022.01.24.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 23, 28, 29, 30, 31, 32 Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0 System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-31 | Google APIs ARM 64 v8a, android-32 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8139111 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild Languages: Java: 1.8.0_292 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.66.3 => 0.66.3 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
When we tried to update the app which is already on the device, then some of the icons are misplaced and it showed the other sections of the app in ANDROID. But once re-install there is no issue remains.
Snack, code example, screenshot, or link to a repository

Search icon showing here instead of a save-card icon.
Hi, did you find a solution for this? We're facing this with images
We are also seeing this issue. Anyone found solution? @purut18
same issue
@cuiken @purut18 I have found a temporary solution. This issue gets resolved if we clear the cache of the app. So I am programmatically clearing the cache after the app gets updated from playstore.
@cuiken Have you enabled Hermes?
Native code snippet for you to bridge.
@ReactMethod
public void clearAppCache() {
try {
File dir = this.getReactApplicationContext().getCacheDir();
deleteDir(dir);
} catch (Exception e) { e.printStackTrace();}
}
enabled Hermes
no, im not
did anyone find the solution for this issue? I am facing same issue in android after updating app from play store. All images and icons are messed up!

@nikunj1314 I have mentioned the solution above. https://github.com/facebook/react-native/issues/33798#issuecomment-1188653748
I got same issue in production today. has anyone got solution for this?? One thing i noticed is after uninstalling old version and reinstalling new version from play store it works fine (i.e Inside app icon shows properly)
@mohdmunaf could you please elaborate your solution?
@mohdmunaf Where i need to update below code @ReactMethod public void clearAppCache() { try { File dir = this.getReactApplicationContext().getCacheDir(); deleteDir(dir); } catch (Exception e) { e.printStackTrace();} }
@pandiyanmadhan use this
in android/app/build.gradle
implementation 'com.facebook.fresco:animated-gif:2.5.0'
clear project uninstall app and run again.
this issue is causing with 2.6.0. version of fresco
let me know if this work for you
Same issue
@pandiyanmadhan use this in android/app/build.gradle
implementation 'com.facebook.fresco:animated-gif:2.5.0'clear project uninstall app and run again.
this issue is causing with 2.6.0. version of fresco
let me know if this work for you
i think you are right i also see this issue https://github.com/facebook/fresco/issues/2667
| :warning: | Missing Reproducible Example |
|---|---|
| :information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
icon misplace happening on update on existing app. This issue is only happening on update. Not in fresh installation
Up
Up, I haved same issue.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.