React-native-code-push: Very slow sync

Created on 30 Jul 2019  路  3Comments  路  Source: microsoft/react-native-code-push

This issue has been getting progressively worse for us over the past few months - but our app startup time is taking a real hit due to CodePush at the moment.

A bit of information around our usage (iOS & Android). We run a manual sync on app launch:

codePush.sync(
  {
    updateDialog: false,
    installMode: codePush.InstallMode.IMMEDIATE,
  },
  this.codePushStatusDidChange,
  this.codePushDownloadDidProgress,
)

Where codePushStatusDidChange and codePushDownloadDidProgress are simply used to display update progress to the user if there's an update available.

When our sync starts, the SyncStatus will hang on SyncStatus.CHECKING_FOR_UPDATE for up to 10-30s before switching to SyncStatus.DOWNLOADING_PACKAGE.

As part of this, we're also getting fairly regular 403's (see #1641) which block our users out of the app entirely until they close in frustration. This error is easily (but sporadically) reproducible simply by visiting an update check URL e.g.

https://codepush.azurewebsites.net/updateCheck?deploymentKey=xxx&appVersion=x.x.x&packageHash=xxx&isCompanion=&label=v60&clientUniqueId=xxxx-xxxx-xxxx

I'm not sure there's much we can do, apart from removing CodePush until these issues are resolved?

Environment

  • react-native-code-push version: 5.6.1
  • react-native version: 0.57.8
  • iOS/Android/Windows version: Any
  • Does this reproduce on a debug build or release build? Both
  • Does this reproduce on a simulator, or only on a physical device? Both

Most helpful comment

We're experiencing the very same issue for quite a while already. When looking into this with charles proxy it shows that the latency of the GET /updateCheck request differs drastically. 5+ seconds for the request are not uncommon.

IMG_3419
IMG_3420

All 3 comments

This issue has been very bad for us over the past few days as well. In particular, in our testing the CodePush backend takes 5-30 seconds to respond to a check for update request. We've tested on multiple physical devices using iOS and Android, as well as the simulator/emulator. We don't believe it is being caused by our office networking or ISP. Like @djw27, our app checks for update on startup, and this delay kills the experience for our users.

Environment

react-native-code-push version: 5.6.0
react-native version: 0.59.9
iOS/Android/Windows version: Various iOS and Android versions
Does this reproduce on a debug build or release build? Both
Does this reproduce on a simulator, or only on a physical device? Both

We're experiencing the very same issue for quite a while already. When looking into this with charles proxy it shows that the latency of the GET /updateCheck request differs drastically. 5+ seconds for the request are not uncommon.

IMG_3419
IMG_3420

Hi all,
Thanks for reporting!

Looks like this is issue occured becasue we were updating CodePush server side. We are sorry for that. :disappointed:
It works correctly now.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kevando picture kevando  路  4Comments

Phredward picture Phredward  路  3Comments

SudoPlz picture SudoPlz  路  4Comments

cgerikj picture cgerikj  路  3Comments

EdmundMai picture EdmundMai  路  4Comments