What did you expect to happen?
Code push should update the app after the user closes the App and restart manually. Then only the update will show up in the App.
What actually happens?
It restarts the App immediately with update.
(The more info the faster we will be able to address it!)
class App extends Component {}
App = codePush({ checkFrequency: codePush.CheckFrequency.ON_APP_START, installMode: codePush.InstallMode.ON_NEXT_RESTART })(App);
export default App;
Hi @ashokadichill,
Thanks for reporting!
That's strange. I just tested your case and all works correct for me.
Could you please share your logs during update?
Hi @ashokadichill,
Thanks for reporting!That's strange. I just tested your case and all works correct for me.
Could you please share your logs during update?
I/ReactNativeJS: [CodePush] Checking for update.
I/ReactNativeJS: [CodePush] Reporting binary update (1.0)
I/ReactNativeJS: [CodePush] Downloading package.
D/ReactNative: [CodePush] Applying full update.
I/ReactNativeJS: [CodePush] Installing update.
D/ReactNative: [CodePush] Loading JS bundle from "/data/user/0/com.yyyy.yyyy/files/CodePush/secretkey/CodePush/index.android.bundle"
D/ReactNative: ReactInstanceManager.recreateReactContextInBackgroundInner()
I/ReactNativeJS: [CodePush] Restarting app
See This video for reference.
(https://drive.google.com/file/d/1RnPsftUh2YgwIZ-fRZraPuOcSyXvXMO-/view?usp=sharing)
I have the same problem (though I do not explicitly define installMode as I understand from the documentation that ON_NEXT_RESTART is the default).
Have you managed to resolve this?
@cubabit Still I don't have any solution to resolve this. I am depending on the Code Push team to look into it.
I found a way to tackle this problem
componentWillMount() {
codePush.disallowRestart();
}
Adding this (App.js) will avoid force restart. Once User manually closes the App and start again the updated bundle will be shown up.
I found a way to tackle this problem
componentWillMount() { codePush.disallowRestart(); }Adding this (App.js) will avoid force restart. Once User manually closes the App and start again the updated bundle will be shown up.
thanks this is solved my issue
Most helpful comment
I found a way to tackle this problem
componentWillMount() { codePush.disallowRestart(); }Adding this (App.js) will avoid force restart. Once User manually closes the App and start again the updated bundle will be shown up.