From f970c43560ba110c28504cf04e8831a71178f105 Mon Sep 17 00:00:00 2001 From: Dominik Sokal Date: Wed, 22 Jul 2020 12:34:45 +0200 Subject: [PATCH 1/4] [expo-cli] add better error messages for issues with downloading archive file --- .../src/commands/upload/submission-service/utils/errors.ts | 6 ++++++ 1 file changed, 6 insertions(+) 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..804ed49364 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. All Expo builds 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]: From d664ed5045a8e83b910037bbe5f682e9fa426360 Mon Sep 17 00:00:00 2001 From: Dominik Sokal Date: Wed, 22 Jul 2020 12:39:09 +0200 Subject: [PATCH 2/4] update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d786f46a10..121acea362 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 erro messages when downloading archive file failed [#2384](https://github.com/expo/expo-cli/pull/2384). ### 🐛 Bug fixes From 240bf7b0120fd392f4dc5848e32ae3b9cacdb603 Mon Sep 17 00:00:00 2001 From: Dominik Sokal Date: Wed, 22 Jul 2020 17:02:46 +0200 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 121acea362..7ad9043c76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +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 erro messages when downloading archive file failed [#2384](https://github.com/expo/expo-cli/pull/2384). +- [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 From 2635cdd1a1269107678f52393bc88fef48c645e3 Mon Sep 17 00:00:00 2001 From: Dominik Sokal Date: Wed, 22 Jul 2020 17:03:53 +0200 Subject: [PATCH 4/4] Update packages/expo-cli/src/commands/upload/submission-service/utils/errors.ts Co-authored-by: Wojciech Kozyra --- .../src/commands/upload/submission-service/utils/errors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 804ed49364..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 @@ -14,7 +14,7 @@ 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. All Expo builds expire after 30 days.', + '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]: