Open Anikets08 opened 1 week ago
[ ] Execution failed for task ':app:signDevReleaseBundle'.
[ ] > A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
[ ] > java.lang.NullPointerException (no error message)
This appears as though you have not properly configured the keystore used to sign release builds. Take a look at the official documentation that explains how to do so.
I'm signing the app properly using this action
name: Download Android keystore id: android_keystore uses: timheuer/base64-to-file@v1.2 with: fileName: android-keystore.keystore encodedString: ${{ inputs.signingKeyStore }}
name: Create key.properties run: | echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties echo "storePassword=${{ inputs.storePassword }}" >> android/key.properties echo "keyAlias=${{ inputs.keyAlias }}" >> android/key.properties echo "keyPassword=${{ inputs.keyPassword }}" >> android/key.properties shell: bash
name: Setup Version And Buildnumber run: bash ./.github/scripts/version_buildnumber.sh shell: bash
run: flutter upgrade --force shell: bash
name: Update Shorebird run: shorebird upgrade shell: bash
run: flutter --version shell: bash
run: flutter clean shell: bash
name: Install Flutter dependencies run: flutter pub get shell: bash
name: Build Release run: | source ~/.bash_profile echo "SHOREBIRD_TOKEN=${{ inputs.SHOREBIRD_TOKEN }}" if [[ "${{ inputs.environment }}" == "dev" && "${{ inputs.bundleType }}" != "appbundle" ]]; then export SHOREBIRD_TOKEN=${{ inputs.SHOREBIRD_API_KEY }} && shorebird release android ${{ inputs.bundleType != 'appbundle' && format('--artifact {0}', inputs.bundleType) || '' }} --flavor ${{ inputs.environment }} --build-number=${{ github.run_number }} --dart-define=flavor=${{ inputs.environment }} -- --release elif [[ "${{ inputs.environment }}" == "qa" && "${{ inputs.bundleType }}" != "appbundle" ]]; then export SHOREBIRD_TOKEN=${{ inputs.SHOREBIRD_API_KEY }} && shorebird release android ${{ inputs.bundleType != 'appbundle' && format('--artifact {0}', inputs.bundleType) || '' }} --flavor ${{ inputs.environment }} --build-number=${{ github.run_number }} --dart-define=flavor=${{ inputs.environment }} -- --release elif [[ "${{ inputs.environment }}" != "dev" && "${{ inputs.environment }}" != "qa" && "${{ inputs.bundleType }}" == "appbundle" ]]; then export SHOREBIRD_TOKEN=${{ inputs.SHOREBIRD_API_KEY }} && shorebird release android ${{ inputs.bundleType != 'appbundle' && format('--artifact {0}', inputs.bundleType) || '' }} --flavor ${{ inputs.environment }} --build-number=${{ github.run_number }} --dart-define=flavor=${{ inputs.environment }} -- --release else flutter build ${{ inputs.bundleType }} --release --dart-define=flavor=${{ inputs.environment }} --flavor ${{ inputs.environment }} --build-number=${{ github.run_number }} fi shell: bash
and just after this i have an action to create patch to previous version
- name: Build Android Patch
run: |
export SHOREBIRD_TOKEN="${{ inputs.SHOREBIRD_API_KEY }}"
yes | shorebird patch android --release-version ${{ inputs.TAG_VERSION }} --flavor ${{ inputs.FLAVOR }} -- --dart-define=flavor=${{ inputs.FLAVOR }}
shell: bash
- name: Build iOS Patch
run: |
export SHOREBIRD_TOKEN="${{ inputs.SHOREBIRD_API_KEY }}"
yes | shorebird patch ios --release-version ${{ inputs.TAG_VERSION }} --flavor ${{ inputs.FLAVOR }} -- --dart-define=flavor=${{ inputs.FLAVOR }}
shell: bash
If you force the flutter build
command in the Build Release to execute, does it succeed?
yes before shorebird we were using flutter build command and it was working fine
[ ] Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
Which presumably is gradle trying to run bundle-tool. Not sure why bundle-tool would fail (this is presumably gradle fetching a copy of bundle-tool rather than the one we fetch for shorebird.
Oh, I see @bryanoltman commented above, that this is a keystore issue. That they may be set up correctly for debug builds but not release builds.
Can you please confirm that flutter build aab
works for you? If it doesn't, fixing that first is required for Shorebird to work.
command used:
shorebird patch android --release-version 0.062.99+1559 --flavor dev -- --dart-define=flavor=dev
i have added log below
1728643449267_shorebird.log