fix(shorebird_cli): skip missing-arch libapp.so on Android upload and patch#3793
Merged
Conversation
… 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.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
libapp.soon disk in both the release upload loop (code_push_client_wrapper.dart) and the patch diff loop (android_patcher.dart), and error out clearly when every arch is missing.ndk.abiFilters/splits.abi/jniLibs.excludes, which were crashing withPathNotFoundExceptionon the first missing arch (issue fix: PathNotFoundException :shorebird releaseignores filtered architectures for Android project (abiFilters) #3388).Why now
This was masked pre-Flutter 3.44 because
gen_snapshot --stripcaused AGP to skip its strip task, falling back to a path that contained every arch regardless of filters. PR #3758 stopped passing--stripon 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
dart testsuite passes (2053 tests).