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

Commit 30bc337

Browse files
committed
Merge pull request #262 from Microsoft/fix_error_message
Fix error message
2 parents ad17216 + 236b3ff commit 30bc337

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

android/app/src/main/java/com/microsoft/codepush/react/CodePushPackage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public void downloadPackage(ReadableMap updatePackage, String expectedBundleFile
246246
String relativeBundlePath = CodePushUpdateUtils.findJSBundleInUpdateContents(newUpdateFolderPath, expectedBundleFileName);
247247

248248
if (relativeBundlePath == null) {
249-
throw new CodePushInvalidUpdateException("Update is invalid - no files with extension .bundle, .js or .jsbundle were found in the update package.");
249+
throw new CodePushInvalidUpdateException("Update is invalid - A JS bundle file named \"" + expectedBundleFileName + "\" 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.");
250250
} else {
251251
if (FileUtils.fileAtPathExists(newUpdateMetadataPath)) {
252252
File metadataFileFromOldUpdate = new File(newUpdateMetadataPath);

ios/CodePush/CodePushPackage.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ + (void)downloadPackage:(NSDictionary *)updatePackage
207207
if (relativeBundlePath) {
208208
[mutableUpdatePackage setValue:relativeBundlePath forKey:RelativeBundlePathKey];
209209
} else {
210-
error = [CodePushErrorUtils errorWithMessage:@"Update is invalid - no files with extension .jsbundle or .bundle were found in the update package."];
210+
NSString *errorMessage = [NSString stringWithFormat:@"Update is invalid - A JS bundle file named \"%@\" 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.", expectedBundleFileName];
211+
212+
error = [CodePushErrorUtils errorWithMessage:errorMessage];
211213

212214
failCallback(error);
213215
return;

0 commit comments

Comments
 (0)