React-native-code-push: Code Push roll backs on app restart on RN 0.57.8

Created on 17 Dec 2018  路  5Comments  路  Source: microsoft/react-native-code-push

Steps to Reproduce

  1. react-native init CodePushTest --version 0.57.8
  2. integrate CodePush via code-push-cli (not tested on appcenter-cli)
  3. publish new release, apply it and restart the application

Expected Behavior

New release will be kept on next app start.

Actual Behavior

What actually happens?

s1
before updates
s2
while updating
s3
after update (install IMMEDIATE)
s4
when app restarts, automatically rolled back to prev version that build & installed by Xcode.

Reproducible Demo

Environment

  • react-native-code-push version: ^5.5.0
  • react-native version: 0.57.8
  • iOS/Android/Windows version: ios 12.1
  • Does this reproduce on a debug build or release build? release
  • Does this reproduce on a simulator, or only on a physical device? both of all

(The more info the faster we will be able to address it!)

bug compatibility

Most helpful comment

Hi @2hyjun and @tanmaybhatt,

Fix already in Master and in new Release: https://github.com/Microsoft/react-native-code-push/releases/tag/v5.5.1
So, I'm going to close this issue. Please feel free to reopen it if you have any questions or face this issue again.

Thanks,
Alexander

All 5 comments

I think this PR on react-native is the problem.
So after upgrading to react-native 0.57.8 and react-native link this happens in AppDelegate.m

  #ifdef DEBUG

    #ifdef DEBUG
        jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
    #else
        jsCodeLocation = [CodePush bundleURL];
    #endif
  #else
    jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  #endif

As far as I can see, this will never load the latest bundle.

Hi @tanmaybhatt,
Thanks for reporting!

Yeah, you are right. I reproduced it. Working on fix. Thanks.

It's happening to me but on 0.56.0, is it normal?

@joaovpmamede, No, It isn't. I see that you opened new issue for this: https://github.com/Microsoft/react-native-code-push/issues/1483
Let's continue our conversation there.

Hi @2hyjun and @tanmaybhatt,

Fix already in Master and in new Release: https://github.com/Microsoft/react-native-code-push/releases/tag/v5.5.1
So, I'm going to close this issue. Please feel free to reopen it if you have any questions or face this issue again.

Thanks,
Alexander

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ninjz picture ninjz  路  4Comments

vira-khdr picture vira-khdr  路  3Comments

SudoPlz picture SudoPlz  路  4Comments

osdnk picture osdnk  路  3Comments

kevando picture kevando  路  4Comments