Rup Sarma
Rup Sarma

Reputation: 41

Firebase Notification (http v1 API) shows error when I set Minify Enable = true, Access token failed: com.google.auth.oauth2

I am using Firebase Notification for my my chat Application for android. all code works fine if i set isMinifyEnabled = false but when I set isMinifyEnabled = true; like this then notification fail to show up in other user device

 buildTypes {
        debug {
            isShrinkResources = true
            isMinifyEnabled = true
            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
        }
    }

in logcat io exception return below error

Error:- Access token failed: com.google.auth.oauth2. GoogleAuthException:

Error getting access token for service account: 400 Bad Request

Upvotes: 0

Views: 122

Answers (1)

Rup Sarma
Rup Sarma

Reputation: 41

I have found fix for my question

Fix:-- Add this line of rules to Proguard-rules in Gradle script. It worked in my case

-keep class com.google.api.** { *; }

Upvotes: 0

Related Questions