sign-android-release icon indicating copy to clipboard operation
sign-android-release copied to clipboard

Your Android App Bundle has more than 1 certificate chain. Ensure your App Bundle has only 1 certificate chain and try again.

Open saurabh-619 opened this issue 6 months ago • 2 comments

I'm using react native Expo to develop the app but not the expo build to save some reasons. So I've written my own CICD where I'm generating the android artifacts on the fly with expo prebuild and then building the release version with gradle. I've created my local keystore(upload keystore) and uses it to sign my release build. But when I try to upload this signed .aab file to my project in playstore, I get the following error -

Screenshot 2024-08-15 at 12 08 32 AM

 

Command used to create local keystore (only prompts for keyStorePassword not for keyPassword, so using same for both) -

$ keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000

 

github action -

name: Build and deploy

on:
  workflow_dispatch:
    inputs:
      tag-suffix:
        description: "Tag suffix"
        required: false
        type: string
      release-title:
        description: "Release Title"
        required: true
        type: string
        default: Build

jobs:
  build-android:
   runs-on: ubuntu-latest
   steps:
     - uses: actions/checkout@v2
       
     - name: Install pnpm
       uses: pnpm/action-setup@v4
       with:
        version: 9

     - name: Set up nodejs
       uses: actions/setup-node@v3
       with:
         node-version: '18.x'
         cache: 'pnpm'

     - name: Set up JDK
       uses: actions/setup-java@v3
       with:
         distribution: 'temurin'
         java-version: '17'

     - name: Install dependencies
       run: pnpm install

     - name: Cache pnpm dependencies
       uses: actions/cache@v4
       with:
         path: ~/.pnpm-store
         key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
         restore-keys: |
           ${{ runner.os }}-pnpm-

     - name: Cache Gradle packages
       uses: actions/cache@v4
       with:
         path: |
           ~/.gradle/caches
           ~/.gradle/wrapper
         key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
         restore-keys: |
           ${{ runner.os }}-gradle-
     - name: Android prebuild
       run: npx expo prebuild --platform android
    
     - name: Build the Android Bundle
       run: |
         cd android
         ./gradlew clean
         ./gradlew bundleRelease
        
     - name: Sign the Android app
       uses: r0adkll/sign-android-release@v1
       id: sign_app
       with:
         releaseDirectory: android/app/build/outputs/bundle/release
         signingKeyBase64: ${{ secrets.SIGNING_KEY }}
         keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
         alias: ${{ secrets.ANDROID_KEY_ALIAS }}
         keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
       env:
         BUILD_TOOLS_VERSION: "34.0.0"
     
     - name: Upload Artifact
       uses: actions/upload-artifact@v3
       with:
         name: app-release.aab
         path: ${{steps.sign_app.outputs.signedReleaseFile}}```

saurabh-619 avatar Aug 14 '24 18:08 saurabh-619