FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
123 stars 20 forks source link

Custom Keystore not taken into account in the generated AAB file #3940

Closed vianneypercq closed 2 weeks ago

vianneypercq commented 3 weeks ago

Can we access your project?

Current Behavior

Context: I developed a new version of my app using Flutterflow, which I want to deploy on Google Play Console as an internal test. My app already exists on Google Play Console under an older version (not developed with Flutterflow).

Steps Taken:

  1. I reset the upload key on Google Play Console, which became effective on September 28, 2024, at 1:53 PM UTC. The new expected key has the following SHA-1 fingerprint: 51:A5:D7:65:28:6A:CB:BA:58:47:7A:E4:5A:4B:5B:AB:FC:79:FD:B7.
  2. I generated a new Keystore (upload-keystore-ep2024.jks) using the keytool command.
  3. I verified the key match: Using keytool, I confirmed that the SHA-1 fingerprint of the key in the Keystore matches the expected fingerprint from Google Play Console (51:A5:D7:65:28:6A:CB:BA:58:47:7A:E4:5A:4B:5B:AB:FC:79:FD:B7).
  4. I used the “Upload Keystore” feature in Flutterflow to upload the Keystore file with the correct alias (ep2024) and the correct password. I double-checked the configuration.
  5. I regenerated a new AAB file from Flutterflow, but when uploading this file to Google Play Console, I am still getting the following error: Your Android App Bundle was signed with the wrong key. Make sure your app bundle is signed with the correct key and try again. The app bundle you uploaded should be signed with the certificate associated with the fingerprint SHA1: 51:A5:D7:65:28:6A:CB:BA:58:47:7A:E4:5A:4B:5B:AB:FC:79:FD:B7, but the certificate used has the fingerprint SHA1: 26:A7:01:DD:34:B3:33:C0:DF:87:AF:EF:8B:BB:60:3A:7A:B4:F3:8D.

Suspected Issue: Despite the correct Keystore configuration and matching SHA-1 fingerprints, Flutterflow seems to not use the correct Keystore when signing the AAB file, or the generated AAB file is not signed properly.

Expected Behavior

The AAB file should contain the correct key from the customized Keystore.

Steps to Reproduce

1- Activate the “Upload Keystore” function 2- Enter the Keystore Alias 3- Upload the Keystore file 4- Enter Keystore file password (same for alias) 5-Download AAB file 6- Submit AAB file to Google Play Console

Reproducible from Blank

Bug Report Code (Required)

IT4sk+fqy5dOmMNc1qrubMdB/SoRQ0Q8R4Issct/cxQcB4j4PYoHPs6lYkxtOdSzaH9UEWGggmYC097JjeHxEPYoBzGZfoBl/rgBSRPPbGOuMZjTCbmOdkFCRMFbG0iD5LervwhRPbF1R3wZ2V6qN9+Rbz2Cf9qOYwx5e6fDbOY=

Visual documentation

CleanShot 2024-09-30 at 15 36 24

The "Failed status" is normal regarding the official Flutterflow tutorial (https://youtu.be/kLfcAzAHA6o?si=jdRRXX357JmvpGmD) for the first submission. I notice that in the log there is this mention: "Failed to read key ** from store "/tmp/keystore.keystore": keystore password was incorrect"** But it's certain that the password entered is correct, I checked it with the terminal:

vianneypercq@MacBook-Pro-de-Vianney-2 ~ % keytool -list -v -keystore ~/Downloads/upload-keystore-ep2024.jks
Enter keystore password:  
Keystore type: PKCS12
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: ep2024
Creation date: 26 sept. 2024
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=ElevateSAS, OU=epansement, O=epansement, L=Nyons, ST=Drome, C=FR
Issuer: CN=ElevateSAS, OU=epansement, O=epansement, L=Nyons, ST=Drome, C=FR
Serial number: 539b64f9aba1cb75
Valid from: Thu Sep 26 15:50:54 CEST 2024 until: Mon Feb 12 14:50:54 CET 2052
Certificate fingerprints:
     SHA1: 51:A5:D7:65:28:6A:CB:BA:58:47:7A:E4:5A:4B:5B:AB:FC:79:FD:B7
     SHA256: EE:4E:F3:DA:E7:4F:19:FE:BD:9D:CF:CD:56:59:9D:DF:2D:03:C3:E4:15:CA:8E:6E:E6:4A:A0:5A:8C:D5:C8:96
Signature algorithm name: SHA384withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3

Extensions: 

#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: E6 18 9F BD C2 4D 8F 56   BA 6D 04 3E F8 92 03 86  .....M.V.m.>....
0010: 77 D7 1D FA                                        w...
]
]

When the Keystore file was created, only a password was set for the file, and no password was set for the alias because it wasn't requested. In the Flutterflow interface, I checked “Same password” for both the Keystore and the alias.

And for completeness, here's the screenshot of the key expected by Google Play Console, where you can see that the key is identical to the one in my Keystore file. CleanShot 2024-10-01 at 10 28 20@2x

Environment

- FlutterFlow version: 5.0.1 (5.0.1)
- Platform: MacOS
- Browser name and version: Chrome  128.0.6613.85
- Operating system and version affected: macOS Sonoma 14.6.1 (23G93)

I use Flutterflow App

Additional Information

No response

Unity2Blender commented 2 weeks ago

I hope the flutterflow team fixes this soon.

Alezanello commented 2 weeks ago

Hello!

It looks like this issue might be specific to your project. We recommend reaching out to our support team via the in-app chat or by emailing support@flutterflow.io, so they can assist you more effectively with this.

Best regards,
Azanello

vianneypercq commented 2 weeks ago

Hi there! After several attempts to generate a Keystore file with the keytool command from the MacOS Terminal, and despite the certainty of not having a password problem, Fluttefflow (via "Advanced settings / Upload Keystore" functionnality) transmits neither the correct password nor the correct keys in the generated AAB file. The solution that worked for me was to use the Keystore Explorer application, which generates a Keystore file correctly integrated by Flutterflow.