Closed kyle-ssg closed 1 year ago
Experiencing slow updates everywhere. I am considering only running check updates once a week per user to avoid this. Would much prefer a proper solution than this hack, but haven't been able to find a solution to the slow updates and it really impacts the user's experience to wait 3-20 seconds each time they open their app.
Today I release the update, and experiencing very slow updates/or no updates at all, I tried debugging most of the times it says Network request failed
even with the perfect internet
[CodePush] Network request failed
Also we can see on our network monitoring most of the request are failing with appcenter
In fairness, I've seen updates take <2 seconds in UK. But UAE is definitely very very slow - in our case, we had to fork / increase the download timeout of 60 seconds. From my understanding it's an issue with azure where the bundles are stored, we found that UAE took a couple minutes to download a PDF vs 1 second in UK.
Also it became clear that we needed to implement a progress handler (in fact thats how we diagnosed the download speed was so slow).
With an additional fork of react-native-bootsplash we were able to also get around the horrible slow blank screen when it's installing the downloaded update.
function CodePushStatusDidChange(syncStatus) {
switch (syncStatus) {
default:
case codePush.SyncStatus.DOWNLOADING_PACKAGE:
updating = true
rootPush(RouteUrls.AppUpdatingScreen, {}, 'AppUpdating')
break
case codePush.SyncStatus.INSTALLING_UPDATE:
RNBootSplash.show()
break
case codePush.SyncStatus.UNKNOWN_ERROR:
rootPop()
}
}
function CodepushProgressUpdate: DownloadProgressCallback = (val) => {
setCodepushProgress({
percent: parseInt(
`${((val.receivedBytes || 0) / (val.totalBytes || 1)) * 100}`,
),
...val,
})
}
Result:
https://user-images.githubusercontent.com/8608314/225668907-235e6854-f4d5-412d-844f-4dd033c6a60d.mov
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.
This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
Steps to Reproduce
Expected Behavior
Downloads in a reasonable time
Actual Behavior
Takes 3-4 minutes on a 250mb line (in app it times out)
This is making CodePush unusable for people within this region.
I think could be a a general issue with Azure Blob storage, not sure where to raise though.