react-native-code-push icon indicating copy to clipboard operation
react-native-code-push copied to clipboard

install update correctly after app installed,but It always rollback after restart the app

Open Mlobaievskyi opened this issue 7 years ago • 23 comments

Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Steps to Reproduce

  1. Configure coodepush correctly
  2. Push update to production branch
  3. Immediate update don't work so update on app resume
  4. Hard close app and open again

Expected Behavior

Update from codepush already present

Actual Behavior

App rolled back to initial state and codepush doesn't apply anymore unless new update uploaded too codepush

Environment

  • react-native-code-push version: 5.7.0
  • react-native version: 0.61.4
  • iOS/Android/Windows version: iOS 13
  • Release
  • Physical device (iPhone X, Xs, 11)

Mlobaievskyi avatar Nov 15 '19 12:11 Mlobaievskyi

See https://github.com/microsoft/react-native-code-push/issues/1704

There's other similar issues too. I haven't found a solution.

ahartzog avatar Nov 15 '19 15:11 ahartzog

Having the same issue here.

seamereth avatar Nov 18 '19 18:11 seamereth

Same exact issue here.

dwilt avatar Nov 26 '19 02:11 dwilt

@dwilt - try removing the --development flag from your codepush appcenter-cli build command. That resolved the issue for me.

ahartzog avatar Nov 26 '19 13:11 ahartzog

@ahartzog I'm not using --development flag

Mlobaievskyi avatar Nov 26 '19 17:11 Mlobaievskyi

code-push release-react <prodIOSBranch> ios -d Production --privateKeyPath ./private.pem --plistFile <pathToPlistFile>

Mlobaievskyi avatar Nov 26 '19 17:11 Mlobaievskyi

@ahartzog thanks for the reply, but as @Mlobaievskyi, I'm not using the development flag either

dwilt avatar Nov 26 '19 18:11 dwilt

Ah, must be some other issue going on as well then.

ahartzog avatar Nov 26 '19 18:11 ahartzog

I am also facing the same issue, I'm not using --development flag. Any update on this issue?

sivakumar-cf avatar Nov 29 '19 06:11 sivakumar-cf

removing the --development flag fixes the issue of app crashing immediately following an update, however this issue (which exists for us as well) is that after a successful update and relaunching of the app it rolls itself back to the previous version.

luskin avatar Nov 29 '19 20:11 luskin

I had same issue, but now it is well then. this is my solution.

ios/<app_name>/AppDelegate.m

// add
#import <CodePush/CodePush.h>

and change

// before
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

// after
return [CodePush bundleURL];

Environment

  • react-native-code-push version: 5.7.0
  • react-native version: 0.61.5
  • iOS/Android/Windows version: iOS 13
  • Physical device (iPhone Xs Max)

https://docs.microsoft.com/en-us/appcenter/distribution/codepush/react-native#plugin-configuration-ios

zezest avatar Dec 04 '19 05:12 zezest

@zezest - yes, this will seem to work but if you close the app and then re-open it (don't rebuild) it will revert back to initial bundle. If it is somehow working for you across multiple opens of the app on the same build then good for you, but for the rest of us it reverts.

luskin avatar Dec 04 '19 15:12 luskin

@zezest yes, it work for me also. Not sure when that code was deleted from my app, probably when I upgraded to the new react-native version. I followed back this instructions and it work again https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-ios.md

Mlobaievskyi avatar Dec 06 '19 15:12 Mlobaievskyi

Probably issue not with code-push but with configuration

Mlobaievskyi avatar Dec 06 '19 15:12 Mlobaievskyi

Any updates on this?

mcruz20 avatar Jan 31 '20 11:01 mcruz20

Hi @Mlobaievskyi , Thank you for reporting!

As I can see, you are using react-native v0.61.4 and react-native-code-push v5.7.0 but these are incompatible versions, you can take a look at supporting CodePush versions here: https://github.com/microsoft/react-native-code-push#supported-react-native-platforms

Not so long ago we released a new version of Code Push which supports react-native v0.60-v0.61. All steps for installing the latest version of the plugin are described in our documentation: https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-ios.md

I'm going to close this issue for now. Please let me know if you have any other questions.

andreidubov avatar Feb 12 '20 10:02 andreidubov

this issue is still there? Has anyone figured out a solution

Saurabh4626 avatar Jun 08 '24 18:06 Saurabh4626

Hello @Saurabh4626 thank you for reaching out, could you please tell me which react-native-code-push and react-native version are you using?

DordeDimitrijev avatar Jun 13 '24 08:06 DordeDimitrijev

@DordeDimitrijev, here you go "react-native": "^0.72.6", "react-native-code-push": "^8.1.0"

Saurabh4626 avatar Jun 13 '24 08:06 Saurabh4626

Hello @Saurabh4626 could you try using react-native 0.71.X version since there might be compatability issues with codepush and 0.72 react-native version, and let me know if the issue is still ocurring?

DordeDimitrijev avatar Jun 25 '24 09:06 DordeDimitrijev