1

I have developed a mobile application with Android Studio that still works by downloading it from the Play Store. The application uses the authentication provided by Firebase and I have added the sha1 from Google Play Console, therefore it works fine. When I want to distribute using Firebase App Distribution, I can't get authentication to work.

This is my build.gradle (app):

    apply plugin: 'com.android.application'

apply plugin: 'com.google.firebase.appdistribution'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "..."
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 3
        versionName "1.2.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    signingConfigs {
        release {
            ...
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            firebaseAppDistribution {
                releaseNotesFile = "app/release_notes.txt"
                testers = "****@gmail.com"
            }
            signingConfig signingConfigs.release
        }
    }
    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }
    splits { abi { enable false } }
}

ext {
    ...
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    ...

    implementation 'com.google.firebase:firebase-core:17.2.3'
    implementation 'com.google.firebase:firebase-auth:19.3.0'
    implementation 'com.google.firebase:firebase-messaging:20.1.2'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'

    ...

    // Analytics
    implementation 'com.google.firebase:firebase-analytics:17.2.1'

}
apply plugin: 'com.google.gms.google-services'

And this is my build.gradle (proyect):

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.2'
        classpath 'com.google.gms:google-services:4.3.3'
        classpath 'com.google.firebase:firebase-appdistribution-gradle:1.4.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven{url 'https://jitpack.io'}
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

I am loading the application in Firebase App Distribution through the Android Studio terminal with this command:

gradlew assembleRelease appDistributionUploadRelease --stacktrace

And it works just fine, except that when i download the app, the authentification doesn't work.

What am I missing?

kenny_k
  • 3,831
  • 5
  • 30
  • 41

1 Answers1

0

Chintan from Firebase here. Can you reach out to Firebase support with this issue and a link to this Stack Overflow post?

Chintan
  • 651
  • 4
  • 15