Skip to content

fix(shorebird_cli): skip missing-arch libapp.so on Android upload and patch#3793

Merged
bdero merged 1 commit into
mainfrom
bdero/android-skip-missing-arch-uploads
May 20, 2026
Merged

fix(shorebird_cli): skip missing-arch libapp.so on Android upload and patch#3793
bdero merged 1 commit into
mainfrom
bdero/android-skip-missing-arch-uploads

Conversation

@bdero
Copy link
Copy Markdown
Member

@bdero bdero commented May 20, 2026

Summary

Why now

This was masked pre-Flutter 3.44 because gen_snapshot --strip caused AGP to skip its strip task, falling back to a path that contained every arch regardless of filters. PR #3758 stopped passing --strip on 3.44+, so AGP now runs its strip task and only emits directories for archs that pass the project's filters. Filtered projects upgrading to 3.44 hit the crash on the next release/patch.

Test plan

  • Added unit test: release upload skips the missing arch and uploads the rest.
  • Added unit test: release upload exits with code 70 + clear message when every arch is missing.
  • Added unit test: patch flow skips the missing arch.
  • Added unit test: patch flow exits with code 70 + clear message when every arch is missing.
  • Full dart test suite passes (2053 tests).

… patch

When AGP filters an ABI via ndk.abiFilters, splits.abi, or jniLibs.excludes,
the strip task omits the directory entry, so the upload and patch loops
crash with PathNotFoundException on the first missing arch (issue #3388).
This was masked pre-Flutter 3.44 because gen_snapshot --strip caused AGP
to skip its strip task, falling back to a path that did contain every
arch. Now that 3.44 hands stripping to AGP, the bug is reachable for any
filtered project on the upgrade path.

Skip arches with no libapp.so on disk in both the release upload loop
(code_push_client_wrapper.dart) and the patch diff loop
(android_patcher.dart). Error out clearly if every arch is missing.
Copy link
Copy Markdown
Contributor

@nickshorebird nickshorebird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@bdero bdero merged commit 6ddb854 into main May 20, 2026
28 checks passed
@bdero bdero deleted the bdero/android-skip-missing-arch-uploads branch May 20, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants