microsoft / react-native-code-push

React Native module for CodePush
http://appcenter.ms
Other
8.99k stars 1.48k forks source link

[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 #2755

Closed qimengfeidiao closed 1 month ago

qimengfeidiao commented 2 months ago

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

DordeDimitrijev commented 2 months ago

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

qimengfeidiao commented 2 months ago

thank you for your answer I changed to strings.xml settings Then it will be fine