React-native-code-push: [CodePush] An unknown error occurred

Created on 23 Oct 2019  路  11Comments  路  Source: microsoft/react-native-code-push

Steps to Reproduce

  1. react-native init codetest

  2. yarn add react-native-code-push
    autolink

  3. strings.xml
    key

  4. android/app/src/main/assets/appcenter-config.json
    {
    "app_secret": "key"
    }

Actual Behavior

What actually happens?
this is log when I start react-native project
LOG Running "codetest" with {"rootTag":31}
LOG [CodePush] Checking for update.
LOG [CodePush] Downloading package.
LOG [CodePush] An unknown error occurred.
LOG [CodePush] Error in getting binary resources modified time

codepush does not work properly. What is the reason?

Environment

  • react-native-code-push version:5.7.0
  • react-native version:0.61.2
  • iOS/Android/Windows version:Android
    buildToolsVersion = "28.0.3"
    minSdkVersion = 16
    compileSdkVersion = 28
    targetSdkVersion = 28
  • Does this reproduce on a debug build or release build?debug build
  • Does this reproduce on a simulator, or only on a physical device? simulator

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

Most helpful comment

The solution that worked for me was manually linking it. To do that, you just need to follow all instructions on this link: Android Setup RN 0.60+

All 11 comments

Same on Anrdroid debug and release build
iOS works fine

react-native-code-push version:5.7.0
react-native version:0.61.2

same issue

for react native v61 you can add into MainApplication
@Override
protected String getJSBundleFile() {
return CodePush.getJSBundleFile();
}

Works on android with manually linked code-push.

@qwertypomy We're having issues getting this to work on RN 0.61.4 on iOS - how did you get this working? We are plagued with the following problem:

https://github.com/microsoft/react-native-code-push/issues/1704

Would you mind providing some quick guidance on how you got this properly setup on iOS?

UPDATE: Downgrading react-native to 0.60.5 fixed our issues.

The same issue.

I use debug build and physical device.

image

@quanzaiyu removing the --development flag from my codepush release build process resolved this error for me.

The solution that worked for me was manually linking it. To do that, you just need to follow all instructions on this link: Android Setup RN 0.60+

Hi all,

Yeah, @guiherzog is right. Thanks!
Please ensure that you have did all in that docs: https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-android.md#plugin-installation-and-configuration-for-react-native-060-version-and-above-android

Also, please update your react-native-code-push to 6+ version if you would like to use [email protected]+ versions.

I'm going to close this issue for now. Please feel free to reopen it if you have any questions.

Thanks @guiherzog your solution works !

bro, thank you very much @guiherzog

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SudoPlz picture SudoPlz  路  4Comments

djw27 picture djw27  路  3Comments

Adr1ann picture Adr1ann  路  3Comments

fanzhiri picture fanzhiri  路  3Comments

quanzaiyu picture quanzaiyu  路  3Comments