cordova-plugin-code-push icon indicating copy to clipboard operation
cordova-plugin-code-push copied to clipboard

After iOS app restart, old version is used.

Open marecektn opened this issue 7 years ago • 3 comments

Description

I run Cordova based app on iOS, on app resume, new version is fetched via CodePush. After app restart the old version (that is bundled within app itself in AppStore for example) is used. I went through variety of similar issues, most of them are related to React Native plugin. But bare in mind, that react native has update of JS Bundle (so there is correct codepush loaded version addressed).

Additional Information

I am using standard codePush.sync() method that runs on intro page of my app.

  • cordova-plugin-code-push version: 1.1.17

  • List of installed plugins: code-push 2.0.6 "CodePushAcquisition" cordova-android-support-gradle-release 1.4.7 "cordova-android-support-gradle-release" cordova-plugin-code-push 1.11.17 "CodePush" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-customurlscheme 4.3.0 "Custom URL scheme" cordova-plugin-device 2.0.2 "Device" cordova-plugin-dialogs 2.0.1 "Notification" cordova-plugin-file 4.3.3 "File" cordova-plugin-file-transfer 1.6.3 "File Transfer" cordova-plugin-inappbrowser 2.0.2 "InAppBrowser" cordova-plugin-ionic-webview 4.0.0 "cordova-plugin-ionic-webview" cordova-plugin-safariviewcontroller 1.5.4 "SafariViewController" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-statusbar 2.4.2 "StatusBar" cordova-plugin-whitelist 1.3.3 "Whitelist" cordova-plugin-zip 3.1.0 "cordova-plugin-zip"

  • Cordova version: 8.1.2

  • iOS/Android/Windows version: iOS 12.1.4

  • Does this reproduce on a debug build or release build? debug

  • Does this reproduce on a simulator, or only on a physical device? tested on physical device

As I was playing with CodePush approx. 2 weeks ago, it all worked well. I've tested it with various ionic-webview versions. (3.1.2 and 4.0.0 don't work, there is also a solution of trying v 1.1.2, but this is old and also only blank screen is shown instead of app itself).

Thank you for any kind of help 👍

marecektn avatar Feb 20 '19 14:02 marecektn

when using cordova-plugin-wkwebview-engine, codepush works fine.

marecektn avatar Feb 20 '19 15:02 marecektn

The issue might be in notifying application ready. After restart of app, I can see this on console log: XMLHttpRequest cannot load https://codepush.azurewebsites.net/reportStatus/deploy due to access control checks.

here is my Content-Security-Policy meta tag:

<meta http-equiv="Content-Security-Policy"
          content="default-src 'self' *.azurewebsites.net
               data: https://ssl.gstatic.com 'unsafe-inline' 'unsafe-eval';
               style-src 'self' 'unsafe-inline' http://fonts.googleapis.com ;
               script-src * 'unsafe-inline' 'unsafe-eval';
               font-src http://fonts.gstatic.com;
               connect-src *;
               media-src *;
               img-src 'self'
               content:;"/>

marecektn avatar Feb 22 '19 11:02 marecektn

duplicate of https://github.com/Microsoft/cordova-plugin-code-push/issues/498

marecektn avatar Feb 22 '19 11:02 marecektn