Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

[iOS] CodePush updated failed and rolled back , log "An update is available, but it is being ignored due to having been previously rolled back" #1134

@GideonLiu

Description

@GideonLiu

Current behavior
1.I had updated sucess once on my device using codepush
2. Than I deleted and reinstall my app many times ,it will log "An update is available, but it is being ignored due to having been previously rolled back" (delete and reinstall many times is the most important operation , because first time install is updated Successful )
3.I downloaded container from my iPhone ,and there is only "assets" fold ,no "main.jsbundle"
4.Sometimes,it logs "Sending CodePushDownloadProgress with no listeners registered.","[CodePush] 未能移除“unzipped”,因为您没有访问它的权限。","[SSZipArchive] Set attributes failed for directory: /var/mobile/Containers/Data/Application/3A09BB31-977D-4E50-97AE-E07929FD7BBA/Library/Application Support/CodePush/unzipped/RN/main.jsbundle.meta." ,"[CodePush] Update is invalid - A JS bundle file named "main.jsbundle" could not be found within the downloaded contents. Please ensure that your app is syncing with the correct deployment and that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary."

CodePush
codePush.sync({
updateDialog: false,
installMode: codePush.InstallMode.IMMEDIATE
},(sycnStatus)=>{
if(codePush.SyncStatus.UPDATE_INSTALLED==sycnStatus){

        }
    });

iOS Code
NSURL* jsCodeLocation = [CodePush bundleURLForResource:@"main" withExtension:@"jsbundle" subdirectory:@"RNBundle"];
// NSURL* jsCodeLocation = [JJReactNativeManager getRNURL];
self.rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"memberCenter" initialProperties:nil launchOptions:nil];
self.view = self.rootView;

CodePush Realease
code-push release jjtravel /Users/Gideon/Desktop/RN/ 6.1.5 --deploymentName Staging --description “test” --mandatory true
Upload progress:[==================================================] 100% 0.0s
Successfully released an update containing the "/Users/Gideon/Desktop/RN/" directory to the "Staging" deployment of the "jjtravel" app.

It's has been happened in Production environment

Environment

  • react-native-code-push version:5.2.1
  • react-native version:0.47.1
  • iOS version:11.2.1
  • Does this reproduce on a debug build or release build? both on debug and release
  • Does this reproduce on a simulator, or only on a physical device? both on simulator and physical device

Thanks very much!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions