shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.36k stars 143 forks source link

fix: Patch Release Fails with Status Code 70 in Android #2642

Closed abhinand-kv closed 1 day ago

abhinand-kv commented 4 days ago

App ID: (854e665c-8871-4210-8b1a-b983515164f1)

Attempting a patch release using Shorebird failed with status code 70 in Android but iOS is working fine. Below are the details of the error and the attached log for reference. log: 13.txt

Addititionally I have noticed something, the patch is being created using Flutter 3.24.5, as indicated in the logs:

stdout: origin/flutter_release/3.24.5 ⠋ Building patch with Flutter 3.24.5 (e8206cf2e7).. However, the release build was created with Flutter 3.22.2. Ideally, the patch should also use Flutter 3.22.2 to maintain compatibility.

command used for the patch: shorebird patch android --allow-native-diffs --allow-asset-diffs -v --flavor $(build_env) -- -t lib/main_$(build_env).dart

bryanoltman commented 4 days ago

Shorebird needs you to tell it which release version you wish to patch. If you don't provide --release-version to the patch command (presuming you're on CI), it will first build the app with the most recent version of Flutter, read the version number from the compiled app, and target the release with that version number.

Does your app compile with Flutter (not shorebird) 3.24.5?

abhinand-kv commented 1 day ago

@bryanoltman No my app is compiled with Flutter 3.22.2.

Are you saying it’s necessary to specify the --release-version when building a patch?

abhinand-kv commented 1 day ago

@bryanoltman Specifying the --release-version resolves my issue. Thank you!