From 69e7a555c9b3650b1e27ee097fffdf82dc64f4c4 Mon Sep 17 00:00:00 2001 From: Hossain Khan Date: Sat, 28 Jun 2025 12:19:14 -0400 Subject: [PATCH 1/2] [ADDED] More keystore debugging steps for workflow --- .github/workflows/test-keystore.yml | 60 +++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/.github/workflows/test-keystore.yml b/.github/workflows/test-keystore.yml index 78273c2..70c71c3 100644 --- a/.github/workflows/test-keystore.yml +++ b/.github/workflows/test-keystore.yml @@ -225,3 +225,63 @@ jobs: name: keystore-diagnostic-files path: keystore-test-artifacts/ retention-days: 1 # Only keep for a day since it contains diagnostic info + + - name: Debug Secret Values (Redacted) + run: | + echo "Debugging secret configuration (values redacted for security):" + echo "KEYSTORE_PASSWORD length: $(echo '${{ secrets.KEYSTORE_PASSWORD }}' | wc -c)" + echo "KEY_PASSWORD length: $(echo '${{ secrets.KEY_PASSWORD }}' | wc -c)" + echo "KEY_ALIAS length: $(echo '${{ secrets.KEY_ALIAS }}' | wc -c)" + echo "KEY_ALIAS value: '${{ secrets.KEY_ALIAS }}'" + + # Check if any secrets are empty + if [[ -z "${{ secrets.KEYSTORE_PASSWORD }}" ]]; then + echo "❌ KEYSTORE_PASSWORD is empty or not set" + fi + if [[ -z "${{ secrets.KEY_PASSWORD }}" ]]; then + echo "❌ KEY_PASSWORD is empty or not set" + fi + if [[ -z "${{ secrets.KEY_ALIAS }}" ]]; then + echo "❌ KEY_ALIAS is empty or not set" + fi + + - name: Test Key Password Specifically + if: always() + run: | + echo "Testing if the key password works for the private key..." + + # Try to change the key password (this requires the current key password to work) + keytool -keypasswd -keystore keystore-test/release.keystore \ + -storepass "${{ secrets.KEYSTORE_PASSWORD }}" \ + -alias "${{ secrets.KEY_ALIAS }}" \ + -keypass "${{ secrets.KEY_PASSWORD }}" \ + -new "${{ secrets.KEY_PASSWORD }}" > keystore-test/keypasswd.txt 2>&1 || true + + if grep -q "Warning" keystore-test/keypasswd.txt || grep -q "keystore password was incorrect" keystore-test/keypasswd.txt; then + echo "❌ Key password is incorrect for the private key" + echo "Key password test output:" + cat keystore-test/keypasswd.txt + else + echo "✅ Key password appears to be correct" + fi + + - name: Verify Keystore Entry Type + if: always() + run: | + echo "Checking the exact type of entry in the keystore..." + keytool -list -v -keystore keystore-test/release.keystore \ + -storepass "${{ secrets.KEYSTORE_PASSWORD }}" \ + -alias "${{ secrets.KEY_ALIAS }}" > keystore-test/entry-details.txt 2>&1 || true + + if grep -q "Entry type: PrivateKeyEntry" keystore-test/entry-details.txt; then + echo "✅ Entry is correctly a PrivateKeyEntry" + echo "Key details:" + grep -A 5 -B 5 "Entry type:" keystore-test/entry-details.txt + elif grep -q "Entry type: trustedCertEntry" keystore-test/entry-details.txt; then + echo "❌ Entry is a trustedCertEntry (certificate only, no private key)" + echo "This explains why signing fails - you only have a certificate, not a private key" + else + echo "❓ Could not determine entry type" + echo "Full entry details:" + cat keystore-test/entry-details.txt + fi From e82eb0c4c1968a6e8af2034df782fdd5bb7a0307 Mon Sep 17 00:00:00 2001 From: Hossain Khan Date: Sat, 28 Jun 2025 12:21:13 -0400 Subject: [PATCH 2/2] [REMOVED] Tests for f-droid, already checked in core app CI --- .github/workflows/fdroid-build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/fdroid-build.yml b/.github/workflows/fdroid-build.yml index 3d168dd..0ac056a 100644 --- a/.github/workflows/fdroid-build.yml +++ b/.github/workflows/fdroid-build.yml @@ -25,9 +25,6 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 - - - name: Run F-Droid Tests - run: ./gradlew testFdroidDebugUnitTest - name: Build F-Droid APK run: ./gradlew buildFDroid