fix: retry AAB upload on httplib2 RedirectMissingLocation error #44

Merged
guettlibot merged 1 commits from fix/playstore-redirect-retry into main 2026-05-14 08:20:26 +00:00
guettlibot commented 2026-05-14 08:20:21 +00:00 (Migrated from codeberg.org)

Resumable AAB uploads to the Play Store occasionally fail with
httplib2.error.RedirectMissingLocation — the server returns a 3xx
redirect without a Location header during the large-file PUT. This is a
transient network/server error (seen in run 119).

num_retries=3 on .execute() only handles server errors (5xx); it
does not catch httplib2 transport-level exceptions. This PR adds an
explicit retry loop (up to 3 attempts, 10 s / 20 s backoff) around the
bundles().upload() call specifically for this error class.

Each retry creates a fresh MediaFileUpload object so the resumable
upload session is reset cleanly.

Resumable AAB uploads to the Play Store occasionally fail with `httplib2.error.RedirectMissingLocation` — the server returns a 3xx redirect without a Location header during the large-file PUT. This is a transient network/server error (seen in run 119). `num_retries=3` on `.execute()` only handles server errors (5xx); it does not catch `httplib2` transport-level exceptions. This PR adds an explicit retry loop (up to 3 attempts, 10 s / 20 s backoff) around the `bundles().upload()` call specifically for this error class. Each retry creates a fresh `MediaFileUpload` object so the resumable upload session is reset cleanly.
Sign in to join this conversation.