Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Firebase app distribution - Service credentials file does not exist. Please check the service credentials path and try again

I'm trying to migrate from Crashlytics Beta to Firebase App Distribution. CircleCi in the Middle.

The build failes in CircleCi with the following error:

  • What went wrong: Execution failed for task ':FiverrApp:appDistributionUploadRelease'. Service credentials file does not exist. Please check the service credentials path and try again

Here is how i'm configuring serviceCredentialsFile variable In my build.gradle:

        release {
        buildConfigField "boolean", "FORCE_LOGS", "true"

        firebaseAppDistribution {
            releaseNotes="Notes\n" + getCommitMessages()
            groups="android-testers"
            serviceCredentialsFile="/api-project-xxx-yyy.json"
        }
    }

the file api-project-xxx-yyy.json is in the same folder with build.gradle file. I've also tried:

serviceCredentialsFile="api-project-xxx-yyy.json"
serviceCredentialsFile='api-project-xxx-yyy.json'

And still no luck... Would appreciate if someone can help me.

like image 221
Udi Oshi Avatar asked Nov 07 '19 07:11

Udi Oshi


2 Answers

Try to use $rootDir to get a path. For example if you pass you credentials file api-project-xxx-yyy.json to root directory than you can take it something like this:

    firebaseAppDistribution {
        ...
        serviceCredentialsFile="$rootDir/api-project-xxx-yyy.json"
    }
like image 194
cosic Avatar answered Sep 20 '22 12:09

cosic


Try using a relative path instead:

serviceCredentialsFile = "./api-project-xxx-yyy.json"

Most likely your api-project-xxx-yyy.json is not in your root directory but you want to use the project's directory.

like image 35
osipovaleks Avatar answered Sep 17 '22 12:09

osipovaleks