React-native-code-push: RN0.60+ code-push Update failed,[CodePush] 404

Created on 14 Oct 2019  ·  4Comments  ·  Source: microsoft/react-native-code-push

### Steps :

  1. npm i react-native --save
  2. react-native link
  3. android/app/src/main/res/values/string.xml
<string moduleConfig="true" name="reactNativeCodePush_androidDeploymentKey">vtmJcymXefAy4GKlLrPkuFo0C2ED4ksvOXqog</string>
<string moduleConfig="true" name="reactNativeCodePush_androidServerURL">http://192.168.2.134:3000/</string>
  1. react-native run-android

Expected Behavior

ok

Actual Behavior

node cli.js info:

 LOG  Running "skt" with {"rootTag":11}
 LOG  [CodePush] Reporting binary update (1.0)
 LOG  [CodePush] Report status failed: {"appVersion":"1.0"}

check update code:

  CodePush.sync(
      { installMode: CodePush.InstallMode.IMMEDIATE, updateDialog: true },
      (status)=>{ console.log('status: ' + status) }
  }

debug console info:

 status: 5
 status: 3
 [CodePush] 404: {}

Environment

"dependencies": {
    "react": "16.9.0",
    "react-native": "0.61.2",
    "react-native-code-push": "^5.7.0"
  },
  "devDependencies": {
    "@babel/core": "7.6.4",
    "@babel/runtime": "7.6.3",
    "@react-native-community/eslint-config": "0.0.3",
    "babel-jest": "24.9.0",
    "eslint": "6.5.1",
    "jest": "24.9.0",
    "metro-react-native-babel-preset": "0.51.1",
    "react-test-renderer": "16.9.0"
  },
  • iOS/Android/Windows version: any
  • Does this reproduce on a debug build or release build? debug
  • Does this reproduce on a simulator, or only on a physical device? emulator
bug

Most helpful comment

@jiangmingwen any solution ?

All 4 comments

@jiangmingwen any solution ?

我已经成功集成rn 60 +所有版本你这个肯定是没删除服务器缓存 ,我遇到过。

是由于RN0.60以上采用了自动连接方式,所以以前自定义的serverUrl失效
2种方式解决:
一种是取消自定连接,自己写代码放在java种,按原来方式;
另一种在codepush的包下进行手动修改,此方式如果遇到更新就会被覆盖,需要重新设置。

Hi @jiangmingwen, @YajanaRao
Thanks for reporting!

Could you please upgrade your react-native-code-push version to 6+ version to get compatibility with [email protected]+ versions.
It should fix your issue.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

osdnk picture osdnk  ·  3Comments

sergey-akhalkov picture sergey-akhalkov  ·  4Comments

DeDuckProject picture DeDuckProject  ·  3Comments

EdmundMai picture EdmundMai  ·  4Comments

panarasi picture panarasi  ·  4Comments