getToken() failed. Status BAD_AUTHENTICATION error
I've found the following error when running my android application in android studio. app couldn't get installed on my device because of this error. Didn't find the solution :( please help
Auth: [GoogleAccountDataServiceImpl] getToken() failed. Status BAD_AUTHENTICATION, Account: , App:com.android.vending, Service: androidmarket com.google.android.gms.auth.be.account.b.d: Long live credential not available.
Solution 1:
I had the same issue what helped me was that I had wrong credentials in my google-services.json
file and after getting a new file my problem was fixed.
in the process of resolving this issue I also updated my google play services but I do not think this is necessary .
Solution 2:
I got this error when tried to install app directly from Android Studio.
It was due to certificate mismatch, since I used release certificate for setting up the app in Play Console, while Android Studio signs the app with debug certificate by default.
Installing app via adb resolved the error.
https://developers.google.com/games/services/android/quickstart#step_4_test_your_game
Make sure to run an APK that you exported and signed with a certificate that matches one of the certificates you used during the application setup in Google Play Console.
Solution 3:
I have the same problem some days ago. I just compile my whole code in a new project and Problem Solved!!.
Don't know what was the real problem. There is an issue filed here, with no solution.