Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
saurabh-619 opened this issue Aug 14, 2024 · 2 comments

Comments

@saurabh-619
Copy link

saurabh-619 commented Aug 14, 2024

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}}```
@SugarCoach
Copy link

I just have the same issue

@HoseinHaqiqian
Copy link

HoseinHaqiqian commented Sep 23, 2024

I guess before creating a release you need to do the following:

    release {
        // remove this line on build process //
        signingConfig signingConfigs.debug

        minifyEnabled true
        shrinkResources true

        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }

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

No branches or pull requests

3 participants