react-native icon indicating copy to clipboard operation
react-native copied to clipboard

React native app upgrade showing icons misplaced in android

Open Sinson48 opened this issue 3 years ago • 10 comments

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

Screen Shot 2022-05-10 at 1 39 41 PM

Search icon showing here instead of a save-card icon.

Sinson48 avatar May 10 '22 09:05 Sinson48

Hi, did you find a solution for this? We're facing this with images

purut18 avatar Jun 08 '22 16:06 purut18

We are also seeing this issue. Anyone found solution? @purut18

mohdmunaf avatar Jun 27 '22 09:06 mohdmunaf

same issue

cuiken avatar Jul 19 '22 06:07 cuiken

@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?

mohdmunaf avatar Jul 19 '22 06:07 mohdmunaf

Native code snippet for you to bridge.

  @ReactMethod
  public void clearAppCache() {
    try {
      File dir = this.getReactApplicationContext().getCacheDir();
      deleteDir(dir);
    } catch (Exception e) { e.printStackTrace();}
  }

mohdmunaf avatar Jul 19 '22 06:07 mohdmunaf

enabled Hermes

no, im not

cuiken avatar Jul 20 '22 03:07 cuiken

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!

Screenshot_20220923_201201_Jackett

nikunj1314 avatar Sep 23 '22 15:09 nikunj1314

@nikunj1314 I have mentioned the solution above. https://github.com/facebook/react-native/issues/33798#issuecomment-1188653748

mohdmunaf avatar Sep 27 '22 16:09 mohdmunaf

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)

KiranRadish avatar Mar 08 '23 16:03 KiranRadish

@mohdmunaf could you please elaborate your solution?

KiranRadish avatar Mar 09 '23 10:03 KiranRadish

@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 avatar Jun 27 '23 03:06 pandiyanmadhan

@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

KiranRadish avatar Jun 27 '23 05:06 KiranRadish

Same issue

kashan20 avatar Jul 21 '23 07:07 kashan20

@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

kashan20 avatar Jul 21 '23 07:07 kashan20

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

github-actions[bot] avatar Jul 26 '23 10:07 github-actions[bot]

icon misplace happening on update on existing app. This issue is only happening on update. Not in fresh installation

somasekharkakarla avatar Sep 19 '23 07:09 somasekharkakarla

Up

nguyentuanit97 avatar Nov 01 '23 01:11 nguyentuanit97

Up, I haved same issue.

lshuyan avatar Jan 17 '24 09:01 lshuyan

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.

github-actions[bot] avatar Jul 16 '24 05:07 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

react-native-bot avatar Jul 23 '24 05:07 react-native-bot