0
votes

I have an app which uploads multimedia files to drive account of the user. Everything is working fine in Debug build. I am facing below exception in release build

06-22 09:24:10.393 2172-4905/? W/Auth: [GetToken] GetToken failed with status code: Unknown 06-22 09:24:10.395 21497-22181/? W/System.err: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException 06-22 09:24:10.395 21497-22181/? W/System.err: at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:286) 06-22 09:24:10.395 21497-22181/? W/System.err: at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859) 06-22 09:24:10.395 21497-22181/? W/System.err: at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410) 06-22 09:24:10.395 21497-22181/? W/System.err: at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343) 06-22 09:24:10.395 21497-22181/? W/System.err: at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)

More Details about the project

I have 1 app with 3 flavors suppose com.a,com.b and com.pro.

So for all flavors i have created 1 project in firebase and 3 apps inside this project.

Now when i enable Drive api from Google API console it is showing oAuth Client ID for all the apps. I have already replaced google-services.json in respective apps flavor folder.

Any of the flavor in release mode is not able to upload files to drive and showing same error. I have tried deleting , creating project on api console. I can't delete project from firebase as it is already serving data to apps live on playstore. Any help will be highly appreciable.

1
Some kind of firewall issue? Is the difference between 'debug' and 'release' the app binary, or is it the environment it's running in? If both, try running the debug app in the release environment and vice versa.Edmund Johnson
Also, look at the mapping file to find out what the stacktrace really is, i.e. what things like "com.google.a.a.b.a.a.b.a.b" map to.Edmund Johnson
Also if minification is enabled for the release build, try turning this off, in case the optimiser is removing parts of the app which are necessary but only used via reflection.Edmund Johnson
@EdmundJohnson Turning minifyenabled false didnt work , I am updating the logs.SimpleCoder

1 Answers

1
votes

I have faced the same problem. The reason was in applicationId in the app build.gradle. It was not the same as in Google console for this app.