microsoft / cordova-plugin-code-push

Cordova plugin for CodePush
http://appcenter.ms
Other
644 stars 324 forks source link

Errors yesterday when doing .sync() (possibly transient) #650

Closed slothentic closed 3 years ago

slothentic commented 3 years ago

Description

When doing .sync() yesterday, I noticed a few times that it was failing to update when attempting to fetch the package from the servers. I actually got an app rejection for it as it happened while Apple was testing and it put the app into an unhandled state.

The errors logged:

[CodePush] Checking for update.
[CodePush] An update is available. {"isDownloading":false,"appVersion":"3.0.4","deploymentKey":"xxx","downloadUrl":"https://codepushupdates.azureedge.net/storagev2/c0nXrfaypUTW3Nm_ARiVSqvqBgl915cd2dad-05b5-4a75-92eb-xxx","isMandatory":true,"label":"v41","packageHash":"xxx","packageSize":4817664,"failedInstall":false}
[CodePush] Downloading update
[CodePush] Could not access local package. Stage:undefinedError code: undefined. StackTrace: Error: Could not access local package. Stage:undefinedError code: undefined at onFileError_1 (file:///android_asset/www/plugins/cordova-plugin-code-push/bin/www/remotePackage.js:53:33) at file:///android_asset/www/plugins/cordova-plugin-advanced-http/www/helpers.js:285:7 at Object.callbackFromNative (file:///android_asset/www/cordova.js:289:52) at :1:9
[CodePush] Could not access local package. Stage:undefinedError code: undefined. StackTrace: Error: Could not access local package. Stage:undefinedError code: undefined at onFileError_1 (file:///android_asset/www/plugins/cordova-plugin-code-push/bin/www/remotePackage.js:53:33) at file:///android_asset/www/plugins/cordova-plugin-advanced-http/www/helpers.js:285:7 at Object.callbackFromNative (file:///android_asset/www/cordova.js:289:52) at <anonymous>:1:9
[CodePush] An error occurred during sync. Could not access local package. Stage:undefinedError code: undefined. StackTrace: Error: Could not access local package. Stage:undefinedError code: undefined at onFileError_1 (file:///android_asset/www/plugins/cordova-plugin-code-push/bin/www/remotePackage.js:53:33) at file:///android_asset/www/plugins/cordova-plugin-advanced-http/www/helpers.js:285:7 at Object.callbackFromNative (file:///android_asset/www/cordova.js:289:52) at :1:9
[CodePush] An error occurred during sync. Could not access local package. Stage:undefinedError code: undefined. StackTrace: Error: Could not access local package. Stage:undefinedError code: undefined at onFileError_1 (file:///android_asset/www/plugins/cordova-plugin-code-push/bin/www/remotePackage.js:53:33) at file:///android_asset/www/plugins/cordova-plugin-advanced-http/www/helpers.js:285:7 at Object.callbackFromNative (file:///android_asset/www/cordova.js:289:52) at <anonymous>:1:9
[CodePush] undefined:[object Object]

This particular instance of it the error happened on Android, I also witnessed it on iOS but was unable to capture logs unfortunately, they were roughly the same as this ^^^

Reproduction

Unfortunately this is not reproducible. I noticed it several times yesterday after not making any related changes, just noticed that it failed to update a few times, which was a condition I hadn't yet handled.

Additional Information

This was only observed on devices, both on iOS and Android.

List of plugins:

code-push 3.0.1 "CodePushAcquisition"
cordova-admob-plus 0.0.0 "@admob-plus/cordova"
cordova-ios-plugin-no-export-compliance 0.0.5 "iOS No Export Compliance"
cordova-launch-review 4.0.0 "Launch Review"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-advanced-http 3.0.0 "Advanced HTTP plugin"
cordova-plugin-androidx 2.0.0 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.1 "cordova-plugin-androidx-adapter"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-code-push 1.12.5 "CodePush"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-enable-applesignin 1.0.0 "EnableAppleSignin"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-firebasex 10.1.2-cli "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-keyboard 1.2.0 "Keyboard"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-purchase 10.2.0 "Purchase"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-wkwebview-engine 1.2.1 "Cordova WKWebView Engine"
cordova-plugin-wkwebview-file-xhr 2.1.4 "Cordova WKWebView File XHR Plugin"
cordova-plugin-wkwebview-inputfocusfix 1.0.4 "WKWebView Input Focus Fix"
cordova-plugin-zip 3.1.0 "cordova-plugin-zip"
ionic-plugin-deeplinks 1.0.20 "Ionic Deeplink Plugin"
sentry-cordova 0.17.0 "Sentry"
julia-fix commented 3 years ago

Same error occured few times today while I was debugging my Android app. And when I tried 3 hours later, updates were installed with no errors. Have you found the reason?

slothentic commented 3 years ago

It seemed to be a transient failure. I've seen it occasionally, it looks like it may just be related to lower level networking, and not necessarily a bug.