guness / bitrise-step-firebase-app-distribution

Upload your apps to Firebase and sends email to your testers.
MIT License
37 stars 27 forks source link

Uploading takes too long and fails, add retry mechanism ? #39

Closed QuentinFarizon closed 3 years ago

QuentinFarizon commented 3 years ago

Hello

I regularly (1 in 10 times) get this issue when uploading AAB to Firebase :

App path contains a file, great!! 👍
-- Checking for existing firebase-tools on PATH...
Your machine has firebase-tools@9.16.0 installed.
If you would like to upgrade your install run: curl -sL firebase.tools | upgrade=true bash
Deploying build to Firebase
  firebase appdistribution:distribute "/Users/vagrant/deploy/app-release.aab" --app "1:588<redacted>"
i  uploading distribution...
Error: failed to upload distribution. it took longer than expected to process your binary, please try again
|                                                                              |
+---+---------------------------------------------------------------+----------+
| ! | firebase-app-distribution@0 (exit code: 1)                    | 2.8 min  |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...b.com/guness/bitrise-step-firebase-app-distribution/issues |
| Source: https://github.com/guness/bitrise-step-firebase-app-distribution     |
+---+---------------------------------------------------------------+----------+

This is an issue on Firebase side, but it would be useful to retry at least once, since this is very temprary.

Thanks !

guness commented 3 years ago

I agree that this is on Firebase side. Since there is no easy way to understand why firebase fails (maybe wrong keys or service unavailable), basic retry will not be helpful. It is better if you can just create this issue on firebase and provide them sample APK file, maybe they will find the root cause and fix it.

QuentinFarizon commented 3 years ago

I think retry will work, because when it fails I just download the AAB and upload it manually and it works.

I have also created an issue on Firebase side, but optionnaly retrying once or twice after 1 minute wouldn't hurt.

guness commented 3 years ago

You are already able to add a retry mechanism thanks to Bitrise. Just add a copy of the step in the workflow and make sure Run if previous Step failed flag is checked on second one. Here is more details:

https://devcenter.bitrise.io/steps-and-workflows/disable-a-step-by-condition/#running-a-step-only-if-the-build-failed