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

App freezes on the 2nd startup after code push works.

Open CharlieAndLouise opened this issue 5 years ago • 1 comments

console.log("start"); codePush.checkForUpdate( (result)=>{ if (!result) { console.log("This app is the latest one."); runApp(); } else { console.log(result); codePush.sync( ()=> { console.log("ready"); }, { updateDialog: true, installMode: window["InstallMode"].IMMEDIATE } ); } }, (error)=>{ console.log("Codepush service is down!"); runApp(); } ); console.log("end");

function runApp() { enableProdMode(); platformBrowserDynamic().bootstrapModule(AppModule).then(()=>{ if (!!window["_paq"]) { window["_paq"].push(["enableJSErrorTracking"]); } }); }

Environment: iPhone simulator XCode Safari "code-push": "^2.0.6", "cordova-plugin-code-push": "^1.11.18"

Repeat the issue:

  1. Start app by XCode.
  2. App is updated and restarted as expected.
  3. Shut down the app by Home + swipe up
  4. reopen app or start app by XCode
  5. freeze on splashing screen. (Issue)
  6. Cannot see "start" or "end" in console (Safari)
  7. Manually run codePush.restartApplication() then app can run properly.

CharlieAndLouise avatar Jul 25 '19 04:07 CharlieAndLouise

I am having a similar issue: https://github.com/microsoft/cordova-plugin-code-push/issues/558

In my case the app does not freeze but all the updates are lost.

gabriele-sacchi avatar Aug 01 '19 23:08 gabriele-sacchi