Hi, my app is in debug mode, and I add this to app/build.gradle
project.ext.react = [
bundleInDebug: true
]
1.app check update and the update is installed
ReactNativeJS: [CodePush] Checking for update.
ReactNativeJS: [CodePush] Awaiting user action.
ReactNativeJS: [CodePush] Downloading package.
ReactNative: [CodePush] Applying full update.
ReactNativeJS: [CodePush] Installing update.
ReactNativeJS: [CodePush] Update is installed and will be run on the next app restart.
update can apply to my app
update not work
project integrates react-native and react-native-navigation v2 into existing native app
My GlobalApplication.java:
GlobalApplication extends NavigationApplication {
//---------- other code above ---------------
@Override
public boolean isDebug() {
return BuildConfig.DEBUG;
}
@Nullable
@Override
public List<ReactPackage> createAdditionalReactPackages() {
return Arrays.asList(
new MainReactPackage(),
new CodePush(CODE_PUSH_DEPLOYMENT_KEY, getApplicationContext(), isDebug()),
new ReactPackage() {
@Nonnull
@Override
public List<NativeModule> createNativeModules(@Nonnull ReactApplicationContext reactContext) {
return Arrays.asList(new ReactModule(reactContext));
}
@Nonnull
@Override
public List<ViewManager> createViewManagers(@Nonnull ReactApplicationContext reactContext) {
return Collections.EMPTY_LIST;
}
});
}
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
@Override
protected ReactGateway createReactGateway() {
ReactNativeHost host = new NavigationReactNativeHost(this, isDebug(), createAdditionalReactPackages()) {
@Override
protected String getJSMainModuleName() {
return "index";
}
@javax.annotation.Nullable
@Override
protected String getJSBundleFile() {
return CodePush.getJSBundleFile();
}
};
return new ReactGateway(this, isDebug(), host);
}
}
Hi @dreamhb
Thanks for reporting!
I found this issue in your logs: [CodePush] Update did not finish loading the last time, rolling back to a previous version.. It can be the reason for your issue with opening index.android.bundle.
I'm not sure what can be a reason for this main issue. Could you please try to make a new release. If this issue will be here could you please provide some dummy project with reproducing issue and reprosteps? I would like to debug it.
And could you please try to test CodePush app with release mode? It should resolve this issue.
Hi,
Thanks for response!
I've tried release build and bundled a Production bundle, but it's still the same error.
[CodePush] Update did not finish loading the last time, rolling back to a previous version.
[CodePush] Loading JS bundle from "assets://index.android.bundle"
And I use this command to bundle a bundle:
appcenter codepush release-react -a ***/*** --debug -d Production
I find there is only one file codepush.json under
/data/user/0/pkgName/files/CodePush/
So where is the index.android.bundle ?
index.android.bundle is missed because your app has some issue with downloading an update as your logs have [CodePush] Update did not finish loading the last time, rolling back to a previous version.. I'm not sure what is the real reason for the issue.
Could you please provide some dummy project with reproducing issue and reprosteps? I would like to debug it.
Thanks, now it works!
Thanks, now it works!
How it works brother? I face with same issue. What did you change, would you share it please? @dreamhb
How it works brother? I face with same issue. What did you change, would you share it please? @dreamhb
How it works brother? I face with same issue. What did you change, would you share it please? @dreamhb
+1
How it works brother? I face with same issue. What did you change, would you share it please? @dreamhb
Most helpful comment
How it works brother? I face with same issue. What did you change, would you share it please? @dreamhb