Android CI fails when SDK or Robolectric downloads arrive corrupt
@TheoGoulart333 is already working on this.
Since Nov 7, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start by reading .github/workflows/e2e.yml, .github/workflows/release-builds.yml, and the native-android workflow job to find where the emulator and Robolectric dependencies are installed. Check the Android emulator runner README for its AVD cache and snapshot setup. Done means cold caches work, warm runs skip system image and Robolectric jar downloads, and the existing shards pass unchanged.
Written by the indexing model from the issue text.
Description
Android CI jobs sometimes fail before any test runs because a download from Google or Maven Central arrives corrupt. Rerunning the job passes, but the E2E workflow has about 15 Android shards per push, so a push hits this fairly often.
What happens
reactivecircus/android-emulator-runner installs the emulator and the system image with sdkmanager on every job. Now and then the archive is corrupt:
Warning: An error occurred while preparing SDK package Intel x86_64 Atom System Image: Error reading Zip content from a SeekableByteChannel.
...
error: could not connect to TCP port 5554: Connection refused
The emulator never starts, and the job fails in "Build, install, and run E2E tests" (or "Run the release configuration" in release-builds.yml) after about a minute.
native-android has the same problem with Robolectric, which downloads its android-all jar from Maven Central at test time. When that fails, every Robolectric test fails with AssertionError at MavenArtifactFetcher.java caused by an IOException.
How often
Out of about 395 Android jobs between Oct 9 and Nov 4, 2026:
| Date | Branch | Job | Cause |
|---|---|---|---|
| Oct 27 | claude/pythonnative-architecture-analysis-5b85ba |
e2e-android (hooks-b) |
Android Emulator archive corrupt ("Error on ZipFile unknown archive") |
| Nov 3 | feat/production-platform |
e2e-android (misc) |
Android Emulator archive corrupt |
| Nov 3 | feat/production-platform |
native-android |
Robolectric jar download failed |
| Nov 4 | feat/production-platform |
e2e-android (capabilities) |
System image archive corrupt |
In the same period, the emulator also went offline mid-run twice (main on Nov 2, and Oct 23). That's the instability the sharding in e2e.yml already works around, so it's out of scope here.
Suggested fix
- Cache the AVD between runs, as the runner's README describes: an
actions/cachestep for~/.android/avd/*and~/.android/adb*, keyed on the API level and arch, plus a step that creates the snapshot when the cache misses. Cached runs then skip the system image download. Apply it to bothe2e.ymlandrelease-builds.yml. - Cache
~/.m2/repository/org/robolectricin thenative-androidjob, so Robolectric reads its jar from the cache instead of downloading it. - Optionally, retry the emulator step once when its log shows an SDK download error, for whatever the cache doesn't cover.
Done means a cold cache still works, a warm cache downloads no system image or Robolectric jar, and the existing shards pass unchanged.
- Dominant language
- Python
- Stars
- 131
- Forks
- 22
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pythonnative/pythonnative
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pythonnative/pythonnative#125 ·
-
Add an API reference page for QueryClient and QuerySnapshotPossibly taken @glenlouis8 claimed this 17 days ago. Opendocumentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
pythonnative/pythonnative#95 · 1 comment · 1 assignee ·
-
Cover diagnostic warning retention and reset behavior with testsPossibly taken @glenlouis8 claimed this 17 days ago. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pythonnative/pythonnative#94 · 1 comment · 1 assignee ·
-
Test icon generation fallbacks when Pillow is unavailablePossibly taken @glenlouis8 claimed this 17 days ago. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pythonnative/pythonnative#93 · 1 comment · 1 assignee ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
pythonnative/pythonnative#122 ·
All issues in pythonnative/pythonnative
Similar issues
-
plot_graph crashes when a mesh node has no m2m edgePossibly taken @tygvi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
mllam/neural-lam#883 · 1 comment ·
Maintainers usually reply within 2 days
-
enhancement possible-duplicate
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/PictoPy#1715 · 2 comments ·
Maintainers usually reply within 6 days
-
SQLite connector omits generated columns from the catalog, and drops relationships sourced on themOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NVIDIA/auto-ontology#511 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ethereum/execution-specs#3996 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
cpp-best-practices/project_validator#267 ·
Maintainers usually reply within 1 day