[CodePush] Update is invalid - A JS bundle file named "null" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary
qimengfeidiao opened this issue · 2 comments
Steps to Reproduce
private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
@OverRide
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@OverRide
protected String getJSBundleFile() {
return CodePush.getJSBundleFile();
}
@OverRide
protected List getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List packages = new PackageList(this).getPackages();
packages.add(new WeChatPackage()); // Add this line
new CodePush(
"xxxxxxx",
MainApplication.this,
BuildConfig.DEBUG,
"http://192.168.1.1:3000/"
);
return packages;
}
};
Expected Behavior
[CodePush] After downloading, the following error is reported
How can I solve it? Thanks
Actual Behavior
What actually happens?
[CodePush] Update is invalid - A JS bundle file named "null" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary
Environment
- react-native": "0.63.5",
- react-native-code-push": "6.4.1",
- code-push-server :0.5.4
- code-push-cli@2.1.9
- Android
Hello @qimengfeidiao thank you for reaching out. Could you please share the logs from logcat? Please double-check your configuration of react-native-code-push since you are using 0.63.5 version this is how your config should look like https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-android.md#plugin-installation-and-configuration-for-react-native-060-version-and-above-android
thank you for your answer I changed to strings.xml settings Then it will be fine