diff --git a/CHANGELOG.md b/CHANGELOG.md index d786f46a10..7ad9043c76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This is the log of notable changes to Expo CLI and related packages. ### 🎉 New features - [xdl] Log output from Gradle Wrapper is a lot cleaner now. It doesn't print dots when the appropriate Gradle version is being downloaded ([#2355](https://github.com/expo/expo-cli/pull/2355)). +- [expo-cli] expo upload:android - Add better error messages when downloading archive file failed [#2384](https://github.com/expo/expo-cli/pull/2384). ### 🐛 Bug fixes diff --git a/packages/expo-cli/src/commands/upload/submission-service/utils/errors.ts b/packages/expo-cli/src/commands/upload/submission-service/utils/errors.ts index 337acc3c06..030f3d329c 100644 --- a/packages/expo-cli/src/commands/upload/submission-service/utils/errors.ts +++ b/packages/expo-cli/src/commands/upload/submission-service/utils/errors.ts @@ -2,6 +2,8 @@ import { SubmissionError } from '../SubmissionService.types'; import log from '../../../../log'; enum SubmissionErrorCode { + ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR = 'SUBMISSION_SERVICE_COMMON_ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR', + ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR = 'SUBMISSION_SERVICE_COMMON_ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR', ANDROID_UNKNOWN_ERROR = 'SUBMISSION_SERVICE_ANDROID_UNKNOWN_ERROR', ANDROID_FIRST_UPLOAD_ERROR = 'SUBMISSION_SERVICE_ANDROID_FIRST_UPLOAD_ERROR', ANDROID_OLD_VERSION_CODE_ERROR = 'SUBMISSION_SERVICE_ANDROID_OLD_VERSION_CODE_ERROR', @@ -9,6 +11,10 @@ enum SubmissionErrorCode { } const SubmissionErrorMessages: Record = { + [SubmissionErrorCode.ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR]: + "Failed to download the archive file (Response code: 404 Not Found). Please make sure the URL you've provided is correct.", + [SubmissionErrorCode.ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR]: + 'Failed to download the archive file (Response code: 403 Forbidden). This is most probably caused by trying to upload an expired build artifact. All Expo build artifacts expire after 30 days.', [SubmissionErrorCode.ANDROID_UNKNOWN_ERROR]: "We couldn't figure out what went wrong. Please see logs to learn more.", [SubmissionErrorCode.ANDROID_FIRST_UPLOAD_ERROR]: