-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The update not installed, keeps rolled back or throwing an exception #2639
Comments
I have the exact same issue. Did you ever have |
No, I'm not using expo. It is configured with react-native-cli. |
Similar issue: #2598 |
I finally fix this issue. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:self.moduleName
initialProperties:self.initialProps
launchOptions:launchOptions];
...
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
...
return [super application:application didFinishLaunchingWithOptions:launchOptions];
} I suspect the cause of the issue is that it creates a new rootView again during the process of checking for codepush updates, downloading the latest jsbundle, and installing it, causing an interruption in the middle. So I made the following modification and codepush update installed normally and works as intended.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[super application:application didFinishLaunchingWithOptions:launchOptions];
# NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
# RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
# moduleName:self.moduleName
# initialProperties:self.initialProps
# launchOptions:launchOptions];
# self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
# UIViewController *rootViewController = [UIViewController new];
# rootViewController.view = rootView;
# self.window.rootViewController = rootViewController;
# [self.window makeKeyAndVisible];
...
return YES;
} |
Can you share the full snippet of AppDelegate.mm please. |
pls check this i had this issue which was solved. #2529 (comment) |
Every updates are not installed and keep rolled back or throwing an exception on iOS.
I started facing this issue after upgrading RN 0.68.7 -> 0.72.7 and code-push 7.1.0 -> 8.1.0.
Steps to Reproduce
Expected Behavior
The update is installed
Actual Behavior
The update keeps rolled back, not installed on iOS. AOS is fine. I observed symptoms in two cases. It works fine on the previous versions.
1. Auto update
This case cause the exception when I ran the app through the xcode to get an error stack.
Thread 3: "Error when sending event: CodePushDownloadProgress with body: {\n receivedBytes = 8914917;\n totalBytes = 8914917;\n}. RCTCallableJSModules is not set. This is probably because you've explicitly synthesized the RCTCallableJSModules in CodePush, even though it's inherited from RCTEventEmitter."
2. Manual update
This case doesn't cause the exception, but the sync call is not working as intended. When the sync is called, it logs
Even if you check the app center dashboard, all updates are rolled back and not installed.
Reproducible Demo
Environment
The text was updated successfully, but these errors were encountered: