microsoft / react-native-code-push

React Native module for CodePush
http://appcenter.ms
Other
8.92k stars 1.46k forks source link

[Android] Update is invalid, Code push changes released successfully, android can't get the change but ios can. #2085

Closed yanwzhang closed 3 years ago

yanwzhang commented 3 years ago

The code push changes are not reflecting as expected on android, works fine for iOS, the integration was done properly following android setup guide : https://github.com/microsoft/react-native-code-push/blob/HEAD/docs/setup-android.md

Steps to Reproduce

  1. Create a release build
  2. Do some changes, to test
  3. Ran code push release command: appcenter codepush release-react -a / -d Production
  4. Code push changes released successfully
  5. IOS get the change, but Android can't get the change

Expected Behavior

IOS and Android both get the change

Actual Behavior

Only IOS get the change, but android don't

  there is no error 

Reproducible Demo

Environment

(The more info the faster we will be able to address it!)

Jumpis commented 3 years ago

Having exactly same issue here.

Environment

hero70312 commented 3 years ago

Having exactly same issue here.

Environment react-native-code-push 6.3.0 react-native 0.64.0

liplylie commented 3 years ago

Same here.

"react-native": "0.63.4", "react-native-code-push": "6.2.1",

Noticed that codepush will work for Android inconsistently.

Get this error:

IllegalStateException
java.lang.IndexOutOfBoundsException: index=1 count=0
hero70312 commented 3 years ago

Both android and iOS work normally at react-native 0.63.0. But android update fail while I use react-native 0.64.0. (iOS work normally at react-native 0.64.0)

hkbrain commented 3 years ago

Same issue facing React-native: 0.61.5 codepush: 6.1.1

Seems android device is never running or able to get update. App center shows code push information with zero installation.

hero70312 commented 3 years ago

Both android and iOS work normally at react-native 0.63.0. But android update fail while I use react-native 0.64.0. (iOS work normally at react-native 0.64.0)

When I used codepush.sync() function, I got a CodePush.SyncStatus.UNKNOWN_ERROR from SyncStatusChangedCallback function.

vestronv commented 3 years ago

When we'll be getting 0.64 RN support, team ? :)

skdev24 commented 3 years ago

Having same issue, no update reflecting in android, iOS works.

"react-native": "0.63.4"
"react-native-code-push": "^7.0.1"
adnxy commented 3 years ago

Facing the same issue:

"react-native": "0.63.4", "react-native-code-push": "6.2.1"

Any updates on this?

elliotmrodriguez commented 3 years ago

Same here. 0.63.4 RN, code push 6.4.0

The following is written to the log: [Thu May 13 2021 16:30:31.700] LOG [CodePush] Sync already in progress. [Thu May 13 2021 16:30:31.120] LOG [CodePush] Checking for update. [Thu May 13 2021 16:30:31.117] LOG [CodePush] Reporting binary update (2.0.30) [Thu May 13 2021 16:30:34.201] LOG [CodePush] Awaiting user action. [Thu May 13 2021 16:30:37.649] LOG [CodePush] Downloading package. [Thu May 13 2021 16:30:37.669] LOG [CodePush] An unknown error occurred. [Thu May 13 2021 16:30:37.670] LOG [CodePush] Error in getting binary resources modified time

EDIT - the build.gradle workaround worked for me, Android Studio 4.2, Gradle 6.7

ManhVuAmela commented 3 years ago

Downgrade tools.build to 4.0.1 in android/build.gradle classpath("com.android.tools.build:gradle:4.0.1") and can fix this

limminyeong commented 3 years ago

I experienced the same problem. This solution works. (App crashes also be solved.)

https://github.com/microsoft/react-native-code-push/issues/1961#issuecomment-710698621

watadarkstar commented 3 years ago

Same problem for us!

yanwzhang commented 3 years ago

Downgrade tools.build to 4.0.1 in android/build.gradle classpath("com.android.tools.build:gradle:4.0.1") and can fix this

Yes, it works to me, thank you!

hero70312 commented 3 years ago

Downgrade tools.build to 4.0.1 in android/build.gradle classpath("com.android.tools.build:gradle:4.0.1") and can fix this

It works to me, too. Thank you!

GarryLaly commented 3 years ago

Downgrade tools.build to 4.0.1 in android/build.gradle classpath("com.android.tools.build:gradle:4.0.1") and can fix this

It's work for me. Thanks

karthick-cs commented 2 years ago

I have tried not working!

JamesGs1994 commented 1 year ago

I am using React native Version 0.70.5 GradlePropertie wrapper version distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip Build gradle classpath("com.android.tools.build:gradle:7.2.1")

My LOGS after I run APP

LOG [CodePush] Sync already in progress. LOG [CodePush] Checking for update. LOG [CodePush] Reporting binary update (1.0) LOG [CodePush] Downloading package.

`

"react": "18.1.0", "react-native": "0.70.5", "react-native-code-push": "7.0.4", "react-native-config": "^1.4.11", "react-native-countdown-circle-timer": "^3.0.9", "react-native-device-info": "^10.3.0", "react-native-vision-camera": "2.14.1", "redux-saga": "^1.2.1", "redux-saga-firebase": "^0.15.0", "vision-camera-code-scanner": "0.2.0", "vision-camera-face-detector": "0.1.8", `

I am getting every information in [Code Push] has syncing and checking but Update is not happening

I tried to add default config in android android/app/build.gradle defaultConfig { ..... resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis()) } After adding this as reference given https://github.com/microsoft/react-native-code-push/issues/2063 also not working

Olixfills commented 1 year ago

I am using React native Version 0.70.5 GradlePropertie wrapper version distributionUrl=https://services.gradle.org/distributions/gradle-7.5.1-all.zip Build gradle classpath("com.android.tools.build:gradle:7.2.1")

My LOGS after I run APP

LOG [CodePush] Sync already in progress. LOG [CodePush] Checking for update. LOG [CodePush] Reporting binary update (1.0) LOG [CodePush] Downloading package.

`

"react": "18.1.0", "react-native": "0.70.5", "react-native-code-push": "7.0.4", "react-native-config": "^1.4.11", "react-native-countdown-circle-timer": "^3.0.9", "react-native-device-info": "^10.3.0", "react-native-vision-camera": "2.14.1", "redux-saga": "^1.2.1", "redux-saga-firebase": "^0.15.0", "vision-camera-code-scanner": "0.2.0", "vision-camera-face-detector": "0.1.8", `

I am getting every information in [Code Push] has syncing and checking but Update is not happening

I tried to add default config in android android/app/build.gradle defaultConfig { ..... resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis()) } After adding this as reference given https://github.com/microsoft/react-native-code-push/issues/2063 also not working

Did you find a solution? i'm facing the same issue

PallavAtUnacademy commented 1 year ago

+1