diff --git a/.changeset/google-play-commit-wait.md b/.changeset/google-play-commit-wait.md new file mode 100644 index 0000000000..4aa6402f57 --- /dev/null +++ b/.changeset/google-play-commit-wait.md @@ -0,0 +1,5 @@ +--- +'@expo/build-tools': patch +--- + +Wait up to five minutes for Google Play to finish processing an uploaded bundle before giving up on the edit commit. diff --git a/packages/build-tools/src/steps/utils/android/GooglePlayUtils.ts b/packages/build-tools/src/steps/utils/android/GooglePlayUtils.ts index effd2a8ccf..4dd612ee4b 100644 --- a/packages/build-tools/src/steps/utils/android/GooglePlayUtils.ts +++ b/packages/build-tools/src/steps/utils/android/GooglePlayUtils.ts @@ -196,7 +196,7 @@ export namespace GooglePlayUtils { signal?.throwIfAborted(); return isUploadStillProcessing(error); }, - { retries: 5, factor: 2, minTimeout: 2000, maxTimeout: 32_000 }, + { retries: 13, factor: 2, minTimeout: 2000, maxTimeout: 32_000 }, ({ attemptNumber, maxAttemptsCount }) => { logger.warn( `Google Play is still processing the uploaded bundle. Retrying the same edit commit (attempt ${attemptNumber}/${maxAttemptsCount}).` @@ -206,7 +206,7 @@ export namespace GooglePlayUtils { } catch (error) { if (isUploadStillProcessing(error)) { throw new SystemError( - `Google Play did not finish processing the uploaded bundle for ${packageName} after six commit attempts. Wait a few minutes, then check the release at https://play.google.com/console/ before submitting again.`, + `Google Play did not finish processing the uploaded bundle for ${packageName} within five minutes. Wait a few minutes, then check the release at https://play.google.com/console/ before submitting again.`, { cause: error, metadata: GooglePlayApiError.getErrorMetadata(error) } ); } diff --git a/packages/build-tools/src/steps/utils/android/__tests__/GooglePlaySubmission.test.ts b/packages/build-tools/src/steps/utils/android/__tests__/GooglePlaySubmission.test.ts index 271b0bda43..ee0233e103 100644 --- a/packages/build-tools/src/steps/utils/android/__tests__/GooglePlaySubmission.test.ts +++ b/packages/build-tools/src/steps/utils/android/__tests__/GooglePlaySubmission.test.ts @@ -110,12 +110,12 @@ it.each([false, true])( } ); -it('stops waiting for bundle processing after six attempts', async () => { +it('stops waiting for bundle processing after 14 attempts', async () => { mockToken(); api() .post(`${editPath}:commit`) .query({}) - .times(6) + .times(14) .reply(400, { error: { message: pendingUploadMessage } }); const error = await commit().catch(error => error); expect(GooglePlayUtils.mapGooglePlayError(error, packageName)).toMatchObject({